-
-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Go 1.21.6, 1.21.7, 1.21.8, 1.22.0, 1.22.1 #123
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
cc @crazy-max |
I believe those are false positives? Rerun should pass the test |
I don't think so: https://github.com/crazy-max/xgo/actions/runs/8278490599/job/22671620226?pr=123#step:5:200
Seems changes are needed since Go 1.22 |
https://go.dev/doc/go1.22#go-command tl;dr: |
might be related to this commit? 607610c |
We might need to refactor the |
Sorry I have no clue to achieve this, I thought it might be easy to update version to get my application workflow executable again. I updated already to 1.22. I guess I need to wait then :) |
🤔 I'll take a look later. |
Note: need to somehow add ghq to the base image. (either through Alpine's testing repo or diff --git a/rootfs/usr/local/bin/xgo-build b/rootfs/usr/local/bin/xgo-build
index 1780139..50de89f 100755
--- a/rootfs/usr/local/bin/xgo-build
+++ b/rootfs/usr/local/bin/xgo-build
@@ -99,7 +99,7 @@ else
# Otherwise download the canonical import path (may fail, don't allow failures beyond)
echo "Fetching main repository $1..."
- GO111MODULE=off go get -v -d "$1"
+ GHQ_ROOT=$GOPATH_ROOT ghq get "$1"
set -e
cd "$GOPATH_ROOT/$1"
diff --git a/tests/c/go.mod b/tests/c/go.mod
new file mode 100644
index 0000000..8740bd4
--- /dev/null
+++ b/tests/c/go.mod
@@ -0,0 +1,3 @@
+module tests/c
+
+go 1.22.1
diff --git a/tests/cpp/go.mod b/tests/cpp/go.mod
new file mode 100644
index 0000000..ba3cd35
--- /dev/null
+++ b/tests/cpp/go.mod
@@ -0,0 +1,3 @@
+module tests/cpp
+
+go 1.22.1 |
so we need to adapt goxx image? |
do you guys have a discord server for discussion or contact possibilities? also willed to donate to you :) |
Will try to find a time to implement this. I think it's fine to |
But do I think the right way that this needs fixing in goxx? Or what do you mean with go install? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
diff --git a/Dockerfile b/Dockerfile
index 0a72b9a..238e25e 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -3,7 +3,7 @@
ARG GO_VERSION="1.22.1"
ARG OSXCROSS_VERSION="11.3"
ARG XX_VERSION="1.3.0"
-ARG ALPINE_VERSION="3.18"
+ARG ALPINE_VERSION="3.19"
ARG PLATFORMS="linux/386 linux/amd64 linux/arm64 linux/arm/v5 linux/arm/v6 linux/arm/v7 linux/mips linux/mipsle linux/mips64 linux/mips64le linux/ppc64le linux/riscv64 linux/s390x windows/386 windows/amd64"
FROM --platform=$BUILDPLATFORM tonistiigi/xx:${XX_VERSION} AS xx
@@ -13,6 +13,11 @@ ENV CGO_ENABLED=0
RUN apk add --no-cache file git
WORKDIR /src
+FROM base AS ghq
+ARG GHQ_VERSION="1.5.0"
+RUN --mount=type=cache,target=/go/pkg/mod \
+ go install github.com/x-motemen/ghq@v${GHQ_VERSION}
+
FROM base AS version
RUN --mount=target=. \
echo $(git describe --match 'v[0-9]*' --dirty='.m' --always --tags) | tee /tmp/.version
@@ -100,6 +105,7 @@ EOT
FROM crazymax/osxcross:${OSXCROSS_VERSION} AS osxcross
FROM goxx-base
COPY --from=build /usr/bin/xgo /usr/local/bin/xgo
+COPY --from=ghq /go/bin/ghq /usr/local/bin/ghq
COPY --from=osxcross /osxcross /osxcross
ENV XGO_IN_XGO="1"
diff --git a/rootfs/usr/local/bin/xgo-build b/rootfs/usr/local/bin/xgo-build
index 1780139..50de89f 100755
--- a/rootfs/usr/local/bin/xgo-build
+++ b/rootfs/usr/local/bin/xgo-build
@@ -99,7 +99,7 @@ else
# Otherwise download the canonical import path (may fail, don't allow failures beyond)
echo "Fetching main repository $1..."
- GO111MODULE=off go get -v -d "$1"
+ GHQ_ROOT=$GOPATH_ROOT ghq get "$1"
set -e
cd "$GOPATH_ROOT/$1"
diff --git a/tests/c/go.mod b/tests/c/go.mod
new file mode 100644
index 0000000..8740bd4
--- /dev/null
+++ b/tests/c/go.mod
@@ -0,0 +1,3 @@
+module tests/c
+
+go 1.22.1
diff --git a/tests/cpp/go.mod b/tests/cpp/go.mod
new file mode 100644
index 0000000..ba3cd35
--- /dev/null
+++ b/tests/cpp/go.mod
@@ -0,0 +1,3 @@
+module tests/cpp
+
+go 1.22.1
Thanks a lot.. applied diff and cleaned up commits :) |
cc'ing @crazy-max for this. |
If you found my works useful, please consider donating to sekai instead: https://github.com/sponsors/nekohasekai. |
Sure done, already sponsored crazy-max as well. Great work :) |
any chance we can run the github actions on this change pls? should be safe regarding to https://github.com/mcha-forks/xgo/actions/runs/8865942312/job/24342766269 :) @crazy-max |
Thanks for the review, will Squash commits later |
thanks so the last piece was that the test files used go 1.22 instead of 1.21? does this even matter for the tests? :) |
Yes it matters as 1.22 toolchain is not available with Go 1.21. |
I tried to follow last update, hopefully everything covered
also removed go 1.20 version to not exceed 360 minutes building time of github actions
this needs crazy-max/goxx#70