diff --git a/.github/workflows/ci-test.yml b/.github/workflows/ci-test.yml index f7f1fe672a8..2f4e91d642f 100644 --- a/.github/workflows/ci-test.yml +++ b/.github/workflows/ci-test.yml @@ -108,37 +108,6 @@ jobs: run: sudo -E ctest --output-on-failure --schedule-random working-directory: ./build - # Build with gcc and test p4c on Ubuntu 18.04. - test-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 - # Build and test p4c on Fedora. test-fedora-linux: strategy: diff --git a/.github/workflows/ci-ubuntu-18-nightly.yml b/.github/workflows/ci-ubuntu-18-nightly.yml new file mode 100644 index 00000000000..feab1558ada --- /dev/null +++ b/.github/workflows/ci-ubuntu-18-nightly.yml @@ -0,0 +1,43 @@ +name: "test-p4c-ubuntu-18.04" + +on: + schedule: + # Every day on midnight UTC + - cron: '0 0 * * *' + +# Cancel any preceding run on the pull request. +concurrency: + group: test-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} + +jobs: + # Build with gcc and test p4c on Ubuntu 18.04. + test-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 diff --git a/.github/workflows/ci-validation.yml b/.github/workflows/ci-validation-nightly.yml similarity index 93% rename from .github/workflows/ci-validation.yml rename to .github/workflows/ci-validation-nightly.yml index dee4e98d0a0..ed5f308a4a8 100644 --- a/.github/workflows/ci-validation.yml +++ b/.github/workflows/ci-validation-nightly.yml @@ -1,10 +1,9 @@ name: "validate-p4c" on: - push: - branches: [ main ] - pull_request: - branches: [ main ] + schedule: + # Every day on midnight UTC + - cron: '0 0 * * *' # Cancel any preceding run on the pull request. concurrency: