Add ARM testing to workflow #1782
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
branches: [ main ] | |
paths: | |
- '**' | |
- '!docs/**' # ignore docs changes | |
- '!**.md' # ignore markdown changes | |
pull_request: | |
branches: [ main ] | |
paths: | |
- '**.go' | |
- 'go.*' | |
- 'cmd/go.*' | |
- 'Makefile' | |
- 'Dockerfile' | |
- 'integration/**' | |
- 'scripts/**' | |
env: | |
GO_VERSION: '1.20.6' | |
jobs: | |
test: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- run: make | |
- run: make test | |
integration: | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
containerd: ["1.6.19", "1.7.0"] | |
env: | |
DOCKER_BUILD_ARGS: "CONTAINERD_VERSION=${{ matrix.containerd }}" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- run: make integration | |
integration-arm64: | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
containerd: ["1.7.0"] | |
arch: ["arm64"] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: uraimo/[email protected] | |
id: integration-tests-arm64 | |
with: | |
arch: aarch64 | |
distro: ubuntu20.04 | |
env: | | |
DOCKER_BUILD_ARGS: "CONTAINERD_VERSION=${{ matrix.containerd }}" | |
dockerRunArgs: | | |
-v /tmp:/tmp | |
-v ${{ github.workspace }}:/soci-snapshotter | |
shell: /bin/bash | |
install: | | |
apt-get update | |
apt-get -y install curl gcc git make libz-dev wget | |
wget -nv https://go.dev/dl/go${{ env.GO_VERSION }}.linux-arm64.tar.gz | |
rm -rf /usr/local/go && tar -C /usr/local -xzf go${{ env.GO_VERSION }}.linux-arm64.tar.gz | |
curl -fsSL https://get.docker.com -o get-docker.sh | |
sh ./get-docker.sh --version | |
curl -SL https://github.com/docker/compose/releases/download/v2.19.0/docker-compose-linux-aarch64 -o /usr/local/bin/docker-compose | |
chmod +x /usr/local/bin/docker-compose | |
run: | | |
echo ${{ github.workspace }} | |
dpkg --add-architecture arm64 | |
export PATH=$PATH:/usr/local/go/bin | |
uname -m | |
go version | |
docker info | |
docker-compose --version | |
containerd --version | |
cd /soci-snapshotter | |
STATIC=1 GOFLAGS="-buildvcs=false" make integration |