Fix install time error of glb-redirect on ubuntu noble (#194) #118
This file contains hidden or 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: Tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - master | |
| pull_request: | |
| branches: | |
| - main | |
| - master | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| build-images: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| distro: [focal, noble] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v7 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v4 | |
| - name: Build image | |
| run: | | |
| docker build --file script/Dockerfile.${{ matrix.distro }} --tag glb-director-build-${{ matrix.distro }}:latest . | |
| docker save glb-director-build-${{ matrix.distro }}:latest --output glb-director-build-${{ matrix.distro }}.tar | |
| - name: Upload image artifact | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: build-${{ matrix.distro }} | |
| path: glb-director-build-${{ matrix.distro }}.tar | |
| retention-days: 1 | |
| test: | |
| needs: build-images | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| test-suite: [director, director-xdp, healthcheck, redirect] | |
| distro: [focal, noble] | |
| exclude: | |
| # The DPDK-based glb-director only builds on focal (DPDK 17 / KNI). | |
| # On other distros the supported forwarder is glb-director-xdp, so | |
| # skip the director suite there. This mirrors the same exclusion in | |
| # script/test-local. | |
| - distro: noble | |
| test-suite: director | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v7 | |
| - name: Download image artifact | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: build-${{ matrix.distro }} | |
| - name: Load Docker image | |
| run: | | |
| docker load --input glb-director-build-${{ matrix.distro }}.tar | |
| - name: Run test suite in container | |
| run: | | |
| docker run --rm \ | |
| --privileged \ | |
| --volume $(pwd):/workspace \ | |
| --workdir /workspace \ | |
| glb-director-build-${{ matrix.distro }}:latest \ | |
| bash -c "cd /workspace/src/glb-${{ matrix.test-suite }} && script/test" |