Skip to content

Commit

Permalink
Go 1.21.6 1.21.7 1.21.8 1.22.0 1.22.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabio1988 committed May 5, 2024
1 parent 2874dd3 commit b51d40b
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 21 deletions.
22 changes: 7 additions & 15 deletions .github/workflows/image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ env:
DOCKERHUB_SLUG: crazymax/xgo
GHCR_SLUG: ghcr.io/crazy-max/xgo
PLATFORMS: linux/amd64,linux/arm64
LATEST_CURRENT: 1.21.5
LATEST_PREVIOUS: 1.20.12
LATEST_CURRENT: 1.22.1
LATEST_PREVIOUS: 1.21.8

jobs:
prepare:
Expand Down Expand Up @@ -58,25 +58,17 @@ jobs:
fail-fast: false
matrix:
go_version:
- 1.20.0
- 1.20.1
- 1.20.2
- 1.20.3
- 1.20.4
- 1.20.5
- 1.20.6
- 1.20.7
- 1.20.8
- 1.20.9
- 1.20.10
- 1.20.11
- 1.20.12
- 1.21.0
- 1.21.1
- 1.21.2
- 1.21.3
- 1.21.4
- 1.21.5
- 1.21.6
- 1.21.7
- 1.21.8
- 1.22.0
- 1.22.1
steps:
-
name: Checkout
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ jobs:
fail-fast: false
matrix:
go_version:
- 1.21.5
- 1.20.12
- 1.22.1
- 1.21.8
case:
- c
- cpp
Expand Down
13 changes: 10 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
# syntax=docker/dockerfile:1

ARG GO_VERSION="1.21.5"
ARG GO_VERSION="1.22.1"
ARG OSXCROSS_VERSION="11.3"
ARG GHQ_VERSION="1.6.1"
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
FROM --platform=$BUILDPLATFORM golang:1.20-alpine${ALPINE_VERSION} AS base
FROM --platform=$BUILDPLATFORM golang:1.22-alpine${ALPINE_VERSION} AS base
COPY --from=xx / /
ENV CGO_ENABLED=0
RUN apk add --no-cache file git
WORKDIR /src

FROM base AS ghq
ARG GHQ_VERSION
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
Expand Down Expand Up @@ -100,6 +106,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"
Expand Down
2 changes: 1 addition & 1 deletion rootfs/usr/local/bin/xgo-build
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 3 additions & 0 deletions tests/c/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module tests/c

go 1.22
3 changes: 3 additions & 0 deletions tests/cpp/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module tests/cpp

go 1.22

0 comments on commit b51d40b

Please sign in to comment.