ci: distribute the compiled integration test binary

This commit is contained in:
Kristoffer Dalby
2026-10-07 14:30:37 +00:00
parent bcc71f9b57
commit c9852c43da
3 changed files with 16 additions and 13 deletions
+7 -12
View File
@@ -46,14 +46,14 @@ jobs:
if: steps.changed-files.outputs.files == 'true'
- uses: Mic92/hestia@dfed9ced335d28978ba74e513939a10db1f71025 # v3.1.0
if: steps.changed-files.outputs.files == 'true'
- name: Build binaries and warm Go cache
- name: Build binaries
if: steps.changed-files.outputs.files == 'true'
run: |
# Build all Go binaries in one nix shell to maximize cache reuse
# Build once for the native worker architecture. Static binaries
# also run in the minimal Headscale image without a Go toolchain.
go build -o hi ./cmd/hi
CGO_ENABLED=0 GOOS=linux go build -o headscale ./cmd/headscale
# Build integration test binary to warm the cache with all dependencies
go test -c ./integration -o /dev/null 2>/dev/null || true
CGO_ENABLED=0 GOOS=linux go test -c ./integration -o integration.test
- name: Upload hi binary
if: steps.changed-files.outputs.files == 'true'
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
@@ -61,17 +61,12 @@ jobs:
name: hi-binary
path: hi
retention-days: 10
- name: Package Go cache
if: steps.changed-files.outputs.files == 'true'
run: |
# Package Go module cache and build cache
tar -czf go-cache.tar.gz -C ~ go .cache/go-build
- name: Upload Go cache
- name: Upload integration test binary
if: steps.changed-files.outputs.files == 'true'
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: go-cache
path: go-cache.tar.gz
name: integration-test-binary
path: integration.test
retention-days: 10
- name: Force overlay2 storage driver
if: steps.changed-files.outputs.files == 'true'