build(deps): bump docker/build-push-action from 6 to 7 #72
Workflow file for this run
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: CI | |
| on: | |
| push: | |
| branches: | |
| - "**" | |
| - "!dependabot/**" | |
| pull_request: | |
| branches: [main] | |
| workflow_call: | |
| jobs: | |
| nesquic: | |
| name: Test Nesquic [${{ matrix.rust }}, ${{ matrix.profile }}}] | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| rust: [stable, nightly] | |
| profile: [dev, release] | |
| exclude: | |
| - rust: nightly | |
| profile: release | |
| # Anything nightly is treated as informational-only. | |
| continue-on-error: ${{ matrix.rust == 'nightly' }} | |
| steps: | |
| - name: "Set environmental variables" | |
| shell: bash | |
| run: | | |
| #RUST_BACKTRACE_nightly='1' | |
| #CFLAGS_nightly='-fsanitize=leak' | |
| #CXXFLAGS_nightly='-fsanitize=leak' | |
| #RUSTFLAGS_nightly='-Zsanitizer=leak' | |
| # A function for defining a variable conditional on the toolchain in | |
| # use. | |
| tc_var() { | |
| # Replace any dots in the toolchain name with underscores. Necessary | |
| # due to shell imposed variable naming restrictions. | |
| var="${1}_$(echo ${{ matrix.rust }} | tr . _)" | |
| echo "${1}=${!var}" >> ${GITHUB_ENV} | |
| } | |
| tc_var RUST_BACKTRACE | |
| tc_var RUSTFLAGS | |
| tc_var CFLAGS | |
| tc_var CXXFLAGS | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: ${{ matrix.rust }} | |
| components: rustfmt | |
| - uses: awalsh128/cache-apt-pkgs-action@latest | |
| with: | |
| packages: clang-18 libelf-dev zlib1g-dev libnuma-dev | |
| version: latest | |
| - name: Configure LLVM | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install --yes --no-install-recommends linux-headers-$(uname -r) | |
| sudo ln -s /usr/include/asm-generic /usr/include/asm | |
| sudo rm -f /bin/clang && sudo ln -s /usr/bin/clang-18 /bin/clang && sudo ln -s /usr/bin/llvm-strip-18 /bin/llvm-strip | |
| git clone --recurse-submodules https://github.com/libbpf/bpftool.git | |
| cd bpftool/src && make && sudo make install | |
| - name: Dump BTF | |
| run: | | |
| mkdir -p include | |
| bpftool btf dump file /sys/kernel/btf/vmlinux format c > include/vmlinux.h | |
| - name: Run tests | |
| run: cargo test --bin nesquic --locked --verbose | |
| - uses: Swatinem/rust-cache@v2 | |
| base: | |
| name: Build base images | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build base rust image | |
| uses: docker/build-push-action@v7 | |
| with: | |
| context: . | |
| file: docker/Dockerfile.rust | |
| tags: nesquic/rust | |
| load: true | |
| cache-from: type=gha,scope=rust | |
| cache-to: type=gha,mode=max,scope=rust | |
| - name: Build mahimahi image | |
| uses: docker/build-push-action@v7 | |
| with: | |
| context: . | |
| file: docker/Dockerfile.mahimahi | |
| tags: nesquic/mahimahi | |
| load: true | |
| cache-from: type=gha,scope=mahimahi | |
| cache-to: type=gha,mode=max,scope=mahimahi | |
| - name: Export base images | |
| run: docker save nesquic/rust nesquic/mahimahi -o base-images.tar | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: base-images | |
| path: base-images.tar | |
| libraries: | |
| name: Test ${{ matrix.library }} | |
| needs: base | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| library: [quinn, quiche, neqo, noq, msquic] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: base-images | |
| - name: Load base images | |
| run: docker load -i base-images.tar | |
| - name: Build library image | |
| run: docker build -f docker/Dockerfile.${{ matrix.library }} -t nesquic/${{ matrix.library }} . | |
| - name: Test | |
| run: script/test.sh ${{ matrix.library }} |