Update the docker image to Ubuntu 24. #250
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
| # SPDX-FileCopyrightText: 2022 VMware, Inc. | |
| # | |
| # SPDX-License-Identifier: Apache-2.0 | |
| name: Test | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| check-changes: | |
| name: Check whether tests need to be run based on diff | |
| runs-on: [ubuntu-latest] | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 | |
| - uses: antrea-io/has-changes@v2 | |
| id: check_diff | |
| with: | |
| paths-ignore: docs/* *.md bazel/* | |
| outputs: | |
| has_changes: ${{ steps.check_diff.outputs.has_changes }} | |
| test: | |
| needs: check-changes | |
| if: ${{ needs.check-changes.outputs.has_changes == 'yes' }} | |
| runs-on: [ubuntu-latest] | |
| strategy: | |
| matrix: | |
| include: | |
| - cxx: g++ | |
| cc: gcc | |
| - cxx: clang++-8 | |
| cc: clang-8 | |
| - cxx: clang++-10 | |
| cc: clang-10 | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| submodules: 'recursive' | |
| - name: Build test Docker image | |
| env: | |
| CC: ${{ matrix.cc }} | |
| CXX: ${{ matrix.cxx }} | |
| run: | | |
| docker build -t pi --build-arg IMAGE_TYPE=test --build-arg CC=$CC --build-arg CXX=$CXX -f Dockerfile.bmv2 . | |
| - name: Run unit tests | |
| run: | | |
| docker run -w /PI pi bash -c \ | |
| 'apt-get update && apt-get install -y python3-pip && \ | |
| python3 -m pip install ptf scapy grpcio googleapis-common-protos protobuf==3.20 && \ | |
| python3 ./proto/ptf/base_test.py' | |
| - name: Run tests | |
| run: | | |
| docker run -w /PI pi bash -c \ | |
| 'make check -j2 || (find . -name "test-suite.log" | xargs cat)' | |
| - name: Check style | |
| run: | | |
| docker run -w /PI pi ./tools/check_style.sh |