Skip to content

Commit

Permalink
Run Gauntlet validation and Ubuntu 18 build/test as nightly actions.
Browse files Browse the repository at this point in the history
  • Loading branch information
fruffy committed Aug 13, 2023
1 parent 624c6be commit 1b9c9f6
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 35 deletions.
31 changes: 0 additions & 31 deletions .github/workflows/ci-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/ci-ubuntu-18-nightly.yml
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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:
Expand Down

0 comments on commit 1b9c9f6

Please sign in to comment.