@@ -116,18 +116,31 @@ jobs:
116
116
matrix :
117
117
go-version : ${{fromJson(inputs.go-version)}}
118
118
privilege-level : ${{fromJson(inputs.privilege-level)}}
119
- build-id : ${{fromJson(inputs.build-id)}}
120
- arch : ["aarch64"]
121
- name : " golang ${{ matrix.go-version }} privilege ${{ matrix.privilege-level }}"
119
+ arch : ["arm64"]
120
+ name : " golang ${{ matrix.go-version }} privilege ${{ matrix.privilege-level }} arch ${{ matrix.arch }}"
122
121
steps :
123
122
- uses : actions/checkout@v3
124
123
-
uses :
benjlevesque/[email protected]
125
124
id : short-sha
125
+ - name : Setup Environment
126
+ run : |
127
+ gopath=$PWD/.build/gopath
128
+ echo "GOPATH=$gopath" >> $GITHUB_ENV
129
+ echo "GOCACHE=$gopath/gocache" >> $GITHUB_ENV
130
+ echo "PATH=$gopath/bin:$PATH" >> $GITHUB_ENV
131
+ echo "SLOW_TEST=${{inputs.slow-test}}" >> $GITHUB_ENV
132
+ if [ "${{ matrix.arch }}" == "arm64" ]; then
133
+ echo "QEMU_ARCH=aarch64" >> $GITHUB_ENV
134
+ echo "BASE_IMAGE=docker://arm64v8/alpine:edge" >> $GITHUB_ENV
135
+ fi
136
+
137
+ echo "PWD=$PWD"
138
+ cat "$GITHUB_ENV"
126
139
- uses : uraimo/run-on-arch-action@v2
127
140
name : Build for ${{ matrix.arch }}
128
141
id : runcmd
129
142
with :
130
- arch : ${{ matrix.arch }}
143
+ arch : ${{ env.QEMU_ARCH }}
131
144
distro : ubuntu22.04
132
145
133
146
# Not required, but speeds up builds by storing container images in
@@ -137,15 +150,15 @@ jobs:
137
150
dockerRunArgs : -v $GITHUB_WORKSPACE:/src --cgroupns=host
138
151
139
152
# Set an output parameter `uname` for use in subsequent steps
140
- run : |
153
+ install : |
141
154
uname -a
142
155
echo ::set-output name=uname::$(uname -a)
143
156
# setup golang
144
157
apt-get update
145
158
apt-get install -yy wget curl tar software-properties-common git pkgconf build-essential
146
159
cd /tmp
147
- wget -N https://go.dev/dl/go1.20.5.linux-arm64 .tar.gz
148
- rm -rf /usr/local/go && tar -C /usr/local -xzf go1.20.5.linux-arm64 .tar.gz
160
+ wget -N https://go.dev/dl/go1.20.5.linux-${{ matrix.arch }} .tar.gz
161
+ rm -rf /usr/local/go && tar -C /usr/local -xzf go1.20.5.linux-${{ matrix.arch }} .tar.gz
149
162
export PATH=$PATH:/usr/local/go/bin
150
163
# install dependencies
151
164
export GOPATH=/src
@@ -155,11 +168,12 @@ jobs:
155
168
GO111MODULE=off go get github.com/opencontainers/umoci/cmd/umoci
156
169
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin
157
170
apt-get install -yy autoconf automake make autogen autoconf libtool binutils git squashfs-tools libcryptsetup-dev libdevmapper-dev cryptsetup-bin squashfuse
171
+ run : |
158
172
cd /src
159
173
make go-download
160
174
make show-info
161
175
make stacker-dynamic VERSION_FULL=${{ matrix.build-id }}
162
- make stacker VERSION_FULL=${{ matrix.build-id }} STACKER_BUILD_BASE_IMAGE=docker://arm64v8/alpine:edge
176
+ make stacker VERSION_FULL=${{ matrix.build-id }} STACKER_BUILD_BASE_IMAGE="$BASE_IMAGE"
163
177
- name : Get the output
164
178
# Echo the `uname` output parameter from the `runcmd` step
165
179
run : |
0 commit comments