Skip to content

Commit 675f493

Browse files
committed
Use ARM64 hosted runners for ARM64 builds, unit tests, and integration tests.
Signed-off-by: Felix Fontein <[email protected]>
1 parent af8a349 commit 675f493

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

.github/workflows/cli.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ permissions:
1414
jobs:
1515
build:
1616
name: Build and test ${{ matrix.os }} ${{ matrix.arch }} ${{ matrix.go-version }}
17-
runs-on: ubuntu-latest
17+
runs-on: ${{ matrix.arch == 'arm64' && 'ubuntu-24.04-arm' || 'ubuntu-latest' }}
1818
strategy:
1919
matrix:
2020
os: [linux, darwin, windows]
@@ -66,6 +66,9 @@ jobs:
6666
- name: Import test GPG keys
6767
run: for i in 1 2 3 4 5; do gpg --import pgp/sops_functional_tests_key.asc && break || sleep 15; done
6868

69+
- name: Show docker contexts
70+
run: docker context ls --format json
71+
6972
- name: Test
7073
run: make test
7174

@@ -84,11 +87,12 @@ jobs:
8487
path: sops-${{ matrix.go-version }}-${{ matrix.os }}-${{ github.sha }}
8588
test:
8689
name: Functional tests
87-
runs-on: ubuntu-latest
90+
runs-on: ${{ matrix.arch == 'arm64' && 'ubuntu-24.04-arm' || 'ubuntu-latest' }}
8891
needs: [build]
8992
strategy:
9093
matrix:
9194
go-version: ['1.22']
95+
arch: [amd64, arm64]
9296
env:
9397
VAULT_VERSION: "1.14.0"
9498
VAULT_TOKEN: "root"
@@ -110,16 +114,16 @@ jobs:
110114

111115
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
112116
with:
113-
name: sops-${{ matrix.go-version }}-linux-amd64-${{ github.sha }}
117+
name: sops-${{ matrix.go-version }}-linux-${{ matrix.arch }}-${{ github.sha }}
114118

115119
- name: Move SOPS binary
116-
run: mv sops-${{ matrix.go-version }}-linux-amd64-${{ github.sha }} ./functional-tests/sops
120+
run: mv sops-${{ matrix.go-version }}-linux-${{ matrix.arch }}-${{ github.sha }} ./functional-tests/sops
117121

118122
- name: Make SOPS binary executable
119123
run: chmod +x ./functional-tests/sops
120124

121125
- name: Download Vault
122-
run: curl -O "https://releases.hashicorp.com/vault/${VAULT_VERSION}/vault_${VAULT_VERSION}_linux_amd64.zip" && sudo unzip vault_${VAULT_VERSION}_linux_amd64.zip -d /usr/local/bin/
126+
run: curl -O "https://releases.hashicorp.com/vault/${VAULT_VERSION}/vault_${VAULT_VERSION}_linux_${{ matrix.arch }}.zip" && sudo unzip vault_${VAULT_VERSION}_linux_${{ matrix.arch }}.zip -d /usr/local/bin/
123127

124128
- name: Start Vault server
125129
run: vault server -dev -dev-root-token-id="$VAULT_TOKEN" &

0 commit comments

Comments
 (0)