-
Notifications
You must be signed in to change notification settings - Fork 293
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
79 additions
and
21 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,14 +34,20 @@ jobs: | |
max-parallel: 2 | ||
matrix: | ||
go: ["stable"] | ||
toolchain: | ||
- { goarch: amd64, cc: gcc } | ||
- { goarch: arm64, cc: aarch64-linux-gnu-gcc } | ||
steps: | ||
- name: Clone code | ||
uses: actions/checkout@v4 | ||
- name: Set up environment | ||
uses: ./.github/workflows/env | ||
- name: Build | ||
run: | | ||
echo $PATH | ||
export GOARCH=${{ matrix.toolchain.goarch }} | ||
export CC=${{ matrix.toolchain.cc }} | ||
export OBJCOPY=llvm-objcopy # works cross-arch | ||
export CGO_ENABLED=1 | ||
make test | ||
- name: Tests | ||
run: | | ||
|
@@ -51,18 +57,28 @@ jobs: | |
name: Build integration test binaries | ||
runs-on: ubuntu-24.04 | ||
timeout-minutes: 10 | ||
strategy: | ||
matrix: | ||
toolchain: | ||
- { goarch: amd64, cc: gcc } | ||
- { goarch: arm64, cc: aarch64-linux-gnu-gcc } | ||
steps: | ||
- name: Clone code | ||
uses: actions/checkout@v4 | ||
- name: Set up environment | ||
uses: ./.github/workflows/env | ||
- name: Prepare integration test binaries for qemu tests | ||
run: | | ||
export GOARCH=${{ matrix.toolchain.goarch }} | ||
export CC=${{ matrix.toolchain.cc }} | ||
export OBJCOPY=llvm-objcopy # works cross-arch | ||
export CGO_ENABLED=1 | ||
make integration-test-binaries | ||
- name: Upload integration test binaries | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: integration-test-binaries | ||
name: integration-test-binaries-${{ matrix.toolchain.goarch }} | ||
path: support/*.test | ||
|
||
integration-tests: | ||
|
@@ -71,6 +87,9 @@ jobs: | |
needs: build-integration-test-binaries | ||
strategy: | ||
matrix: | ||
toolchain: | ||
- { arch: x86, goarch: amd64, cc: gcc } | ||
- { arch: aarch64, goarch: arm64, cc: aarch64-linux-gnu-gcc } | ||
kernel-version: | ||
- "4.19.314" | ||
- "5.4.276" | ||
|
@@ -87,19 +106,21 @@ jobs: | |
uses: ./.github/workflows/env | ||
- name: Install dependencies | ||
run: | | ||
sudo apt-get -y install qemu-system-x86 | ||
sudo apt-get -y install qemu-system-${{ matrix.toolchain.arch }} | ||
go install github.com/florianl/[email protected] | ||
sudo mv ~/go/bin/bluebox /usr/local/bin/. | ||
- name: Fetch integration test binaries | ||
uses: actions/download-artifact@v4 | ||
with: { name: integration-test-binaries } | ||
with: { name: integration-test-binaries-${{ matrix.toolchain.goarch }} } | ||
- name: Fetch precompiled kernels | ||
run: | | ||
install -d ci-kernels | ||
echo "FROM ghcr.io/cilium/ci-kernels:${{ matrix.kernel-version }}" \ | ||
| docker buildx build --quiet --pull --output="ci-kernels" - | ||
| docker buildx build --platform linux/${{ matrix.toolchain.goarch }} \ | ||
--quiet --pull --output="ci-kernels" - | ||
mv ci-kernels/boot/ ci-kernels/${{ matrix.kernel-version }}/ | ||
- name: Test on kernel ${{ matrix.kernel-version }} | ||
run: | | ||
chmod a+rx *.test | ||
export QEMU_ARCH=${{ matrix.toolchain.arch}} | ||
support/run-tests.sh ${{ matrix.kernel-version }} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
.PHONY: all | ||
|
||
CC=gcc | ||
CFLAGS=-Wl,--build-id | ||
CC ?= cc | ||
CFLAGS = -Wl,--build-id | ||
|
||
all: test | ||
|
||
|
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
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