test-p4c-ubuntu-18.04 #7
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
name: "test-p4c-ubuntu-18.04" | |
on: | |
schedule: | |
# Every day on midnight UTC | |
- cron: "0 0 * * *" | |
pull_request: | |
branches: [main] | |
jobs: | |
# Build with gcc and test p4c on Ubuntu 18.04. | |
test-ubuntu18: | |
# Only run on pull requests with the "run-ubuntu18" label. | |
if: contains(github.event.pull_request.labels.*.name, 'run-ubuntu18') | |
strategy: | |
fail-fast: false | |
runs-on: ubuntu-latest | |
env: | |
CTEST_PARALLEL_LEVEL: 4 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
fetch-depth: 0 | |
- name: ccache | |
uses: hendrikmuhs/ccache-action@v1 | |
with: | |
key: test-ubuntu-18.04-gcc | |
max-size: 1000M | |
- name: Build (Ubuntu 18.04, GCC) | |
run: | | |
docker build -t p4c --build-arg BASE_IMAGE=ubuntu:18.04 --build-arg IMAGE_TYPE=test \ | |
--build-arg ENABLE_TEST_TOOLS=OFF . | |
./tools/export_ccache.sh | |
# run with sudo (...) --privileged | |
# this is needed to create network namespaces for the ebpf tests. | |
- name: Run tests (Ubuntu 18.04) | |
run: | | |
sudo -E docker run --privileged -w /p4c/build -e $CTEST_PARALLEL_LEVEL p4c ctest --output-on-failure --schedule-random |