Skip to content

Commit 0d24211

Browse files
committed
CI/GHA: bump github actions used to latest versions
Since actions/setup-go@v4 it caches some go directories to speed up building, testing etc. Alas, we link our code against different libseccomp versions, and such caching my screw up builds. To fix this, add libseccomp version information to cache keys. The only way to do so in actions/setup-go is a file, so supply it with libseccomp.pc which contains libseccomp version and is otherwise rarely updated. Signed-off-by: Kir Kolyshkin <[email protected]>
1 parent 7111b41 commit 0d24211

File tree

2 files changed

+15
-9
lines changed

2 files changed

+15
-9
lines changed

.github/workflows/test.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,7 @@ jobs:
2121
steps:
2222

2323
- name: checkout
24-
uses: actions/checkout@v3
25-
26-
- name: install go ${{ matrix.go-version }}
27-
uses: actions/setup-go@v3
28-
with:
29-
go-version: ${{ matrix.go-version }}
24+
uses: actions/checkout@v4
3025

3126
- name: build libseccomp ${{ matrix.libseccomp }}
3227
run: |
@@ -69,6 +64,17 @@ jobs:
6964
# For TestExpectedSeccompVersion.
7065
echo "_EXPECTED_LIBSECCOMP_VERSION=$VER" >> $GITHUB_ENV
7166
67+
- name: install go ${{ matrix.go-version }}
68+
uses: actions/setup-go@v5
69+
with:
70+
go-version: ${{ matrix.go-version }}
71+
# Add libseccomp.pc path so that setup-go adds this file hash to cache key.
72+
# This way, we'll have different caches for different libseccomp versions.
73+
cache-dependency-path: |
74+
go.sum
75+
${{ env.PKG_CONFIG_LIBDIR }}/libseccomp.pc
76+
77+
7278
- name: build
7379
run: make check-build
7480

.github/workflows/validate.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,19 @@ jobs:
1414
lint:
1515
runs-on: ubuntu-20.04
1616
steps:
17-
- uses: actions/checkout@v3
17+
- uses: actions/checkout@v4
1818
- name: install deps
1919
run: |
2020
sudo apt -q update
2121
sudo apt -q install libseccomp-dev
22-
- uses: golangci/golangci-lint-action@v3
22+
- uses: golangci/golangci-lint-action@v6
2323
with:
2424
version: v1.60
2525

2626
codespell:
2727
runs-on: ubuntu-20.04
2828
steps:
29-
- uses: actions/checkout@v3
29+
- uses: actions/checkout@v4
3030
- name: install deps
3131
# Version of codespell bundled with Ubuntu is way old, so use pip.
3232
run: pip install codespell

0 commit comments

Comments
 (0)