diff --git a/.github/workflows/ci-test.yml b/.github/workflows/ci-test.yml index 4ae0a013d4..917a246d15 100644 --- a/.github/workflows/ci-test.yml +++ b/.github/workflows/ci-test.yml @@ -12,113 +12,148 @@ concurrency: cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} jobs: - # Build with gcc and test p4c on Ubuntu 22.04. - test-ubuntu22: - strategy: - fail-fast: false - runs-on: ubuntu-22.04 - env: - CTEST_PARALLEL_LEVEL: 4 - IMAGE_TYPE: test - steps: - - uses: actions/checkout@v3 - with: - submodules: recursive - fetch-depth: 0 - - - name: ccache - uses: hendrikmuhs/ccache-action@v1 - with: - key: test-${{ runner.os }}-gcc - max-size: 1000M + # # Build with gcc and test p4c on Ubuntu 22.04. + # test-ubuntu22: + # strategy: + # fail-fast: false + # runs-on: ubuntu-22.04 + # env: + # CTEST_PARALLEL_LEVEL: 4 + # IMAGE_TYPE: test + # steps: + # - uses: actions/checkout@v3 + # with: + # submodules: recursive + # fetch-depth: 0 + + # - name: ccache + # uses: hendrikmuhs/ccache-action@v1 + # with: + # key: test-${{ runner.os }}-gcc + # max-size: 1000M + + # - name: Build (Ubuntu 22.04, GCC) + # run: | + # tools/ci-build.sh + + # - name: Run tests (Ubuntu 22.04) + # # Need to use sudo for the eBPF kernel tests. + # run: sudo -E ctest --output-on-failure --schedule-random + # working-directory: ./build + + # # Build with gcc and test p4c on Ubuntu 20.04. + # test-ubuntu20: + # name: test-ubuntu20 (Unity ${{ matrix.unity }}) + # strategy: + # fail-fast: false + # matrix: + # unity: [ON, OFF] + # runs-on: ubuntu-20.04 + # env: + # CTEST_PARALLEL_LEVEL: 4 + # IMAGE_TYPE: test + # CMAKE_UNITY_BUILD: ${{ matrix.unity }} + # steps: + # - uses: actions/checkout@v3 + # with: + # submodules: recursive + # fetch-depth: 0 + + # - name: ccache + # uses: hendrikmuhs/ccache-action@v1 + # with: + # key: test-${{ matrix.unity }}-${{ runner.os }}-gcc + # max-size: 1000M + + # - name: Build (Ubuntu 20.04, GCC) + # run: | + # tools/ci-build.sh + + # - name: Run tests (Ubuntu 20.04) + # # Need to use sudo for the eBPF kernel tests. + # run: sudo -E ctest --output-on-failure --schedule-random + # working-directory: ./build + # if: matrix.unity == 'ON' + + # # Build and test p4c on Fedora. + # test-fedora-linux: + # strategy: + # fail-fast: false + # # This job runs in Fedora container that runs in Ubuntu VM. + # runs-on: ubuntu-latest + # container: + # image: registry.fedoraproject.org/fedora:latest + # options: --privileged + # env: + # CTEST_PARALLEL_LEVEL: 4 + # steps: + # # We need to install git here because it is not provided out of the box in Fedora container. + # - name: Install git + # run: dnf install -y -q git + + # - uses: actions/checkout@v3 + # with: + # submodules: recursive + + # - name: Install dependencies (Fedora Linux) + # run: tools/install_fedora_deps.sh + + # - name: ccache + # uses: hendrikmuhs/ccache-action@v1 + # with: + # key: fedora-test-${{ runner.os }} + # max-size: 1000M + + # - name: Build p4c (Fedora Linux) + # run: | + # ./bootstrap.sh -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_UNITY_BUILD=ON + # make -j2 -C build + + # - name: Run p4c tests (Fedora Linux) + # # Need to use sudo for the eBPF kernel tests. + # run: sudo -E ctest --output-on-failure --schedule-random + # working-directory: ./build - - name: Build (Ubuntu 22.04, GCC) - run: | - tools/ci-build.sh - - - name: Run tests (Ubuntu 22.04) - # Need to use sudo for the eBPF kernel tests. - run: sudo -E ctest --output-on-failure --schedule-random - working-directory: ./build - - # Build with gcc and test p4c on Ubuntu 20.04. - test-ubuntu20: - name: test-ubuntu20 (Unity ${{ matrix.unity }}) + # Build and test p4c on MacOS 12 + test-mac-os-m1: strategy: fail-fast: false - matrix: - unity: [ON, OFF] - runs-on: ubuntu-20.04 + runs-on: macos-13-xlarge env: CTEST_PARALLEL_LEVEL: 4 - IMAGE_TYPE: test - CMAKE_UNITY_BUILD: ${{ matrix.unity }} steps: - uses: actions/checkout@v3 with: submodules: recursive - fetch-depth: 0 - name: ccache uses: hendrikmuhs/ccache-action@v1 with: - key: test-${{ matrix.unity }}-${{ runner.os }}-gcc + key: test-${{ runner.os }} max-size: 1000M - - name: Build (Ubuntu 20.04, GCC) + - name: Install dependencies (MacOS) run: | - tools/ci-build.sh - - - name: Run tests (Ubuntu 20.04) - # Need to use sudo for the eBPF kernel tests. - run: sudo -E ctest --output-on-failure --schedule-random - working-directory: ./build - if: matrix.unity == 'ON' - - # Build and test p4c on Fedora. - test-fedora-linux: - strategy: - fail-fast: false - # This job runs in Fedora container that runs in Ubuntu VM. - runs-on: ubuntu-latest - container: - image: registry.fedoraproject.org/fedora:latest - options: --privileged - env: - CTEST_PARALLEL_LEVEL: 4 - steps: - # We need to install git here because it is not provided out of the box in Fedora container. - - name: Install git - run: dnf install -y -q git - - - uses: actions/checkout@v3 - with: - submodules: recursive - - - name: Install dependencies (Fedora Linux) - run: tools/install_fedora_deps.sh - - - name: ccache - uses: hendrikmuhs/ccache-action@v1 - with: - key: fedora-test-${{ runner.os }} - max-size: 1000M + tools/install_mac_deps.sh - - name: Build p4c (Fedora Linux) + - name: Build (MacOS) run: | - ./bootstrap.sh -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_UNITY_BUILD=ON - make -j2 -C build + source ~/.bash_profile + ./bootstrap.sh -DENABLE_GC=ON -DCMAKE_BUILD_TYPE=RELEASE \ + -DCMAKE_UNITY_BUILD=ON + make -Cbuild -j2 - - name: Run p4c tests (Fedora Linux) - # Need to use sudo for the eBPF kernel tests. - run: sudo -E ctest --output-on-failure --schedule-random + - name: Run tests (MacOS) + run: | + source ~/.bash_profile + ctest --output-on-failure --schedule-random -LE "bpf|ubpf" working-directory: ./build - # Build and test p4c on MacOS 12 + # Build and test p4c on MacOS 13 test-mac-os: strategy: fail-fast: false - runs-on: macos-13-xlarge + runs-on: macos-13 env: CTEST_PARALLEL_LEVEL: 4 steps: diff --git a/.github/workflows/ci-auto-release.yml b/.github/workflows/disabled/ci-auto-release.yml similarity index 100% rename from .github/workflows/ci-auto-release.yml rename to .github/workflows/disabled/ci-auto-release.yml diff --git a/.github/workflows/ci-bazel.yml b/.github/workflows/disabled/ci-bazel.yml similarity index 100% rename from .github/workflows/ci-bazel.yml rename to .github/workflows/disabled/ci-bazel.yml diff --git a/.github/workflows/ci-container-image.yml b/.github/workflows/disabled/ci-container-image.yml similarity index 100% rename from .github/workflows/ci-container-image.yml rename to .github/workflows/disabled/ci-container-image.yml diff --git a/.github/workflows/ci-lint.yaml b/.github/workflows/disabled/ci-lint.yaml similarity index 100% rename from .github/workflows/ci-lint.yaml rename to .github/workflows/disabled/ci-lint.yaml diff --git a/.github/workflows/ci-p4tools.yml b/.github/workflows/disabled/ci-p4tools.yml similarity index 100% rename from .github/workflows/ci-p4tools.yml rename to .github/workflows/disabled/ci-p4tools.yml diff --git a/.github/workflows/ci-ptf-kernels-weekly.yml b/.github/workflows/disabled/ci-ptf-kernels-weekly.yml similarity index 100% rename from .github/workflows/ci-ptf-kernels-weekly.yml rename to .github/workflows/disabled/ci-ptf-kernels-weekly.yml diff --git a/.github/workflows/ci-ptf.yml b/.github/workflows/disabled/ci-ptf.yml similarity index 100% rename from .github/workflows/ci-ptf.yml rename to .github/workflows/disabled/ci-ptf.yml diff --git a/.github/workflows/ci-release.yml b/.github/workflows/disabled/ci-release.yml similarity index 100% rename from .github/workflows/ci-release.yml rename to .github/workflows/disabled/ci-release.yml diff --git a/.github/workflows/ci-static-build-test.yml b/.github/workflows/disabled/ci-static-build-test.yml similarity index 100% rename from .github/workflows/ci-static-build-test.yml rename to .github/workflows/disabled/ci-static-build-test.yml diff --git a/.github/workflows/ci-ubuntu-18-nightly.yml b/.github/workflows/disabled/ci-ubuntu-18-nightly.yml similarity index 100% rename from .github/workflows/ci-ubuntu-18-nightly.yml rename to .github/workflows/disabled/ci-ubuntu-18-nightly.yml diff --git a/.github/workflows/ci-ubuntu-20-sanitizer-nightly.yml b/.github/workflows/disabled/ci-ubuntu-20-sanitizer-nightly.yml similarity index 100% rename from .github/workflows/ci-ubuntu-20-sanitizer-nightly.yml rename to .github/workflows/disabled/ci-ubuntu-20-sanitizer-nightly.yml diff --git a/.github/workflows/ci-validation-nightly.yml b/.github/workflows/disabled/ci-validation-nightly.yml similarity index 100% rename from .github/workflows/ci-validation-nightly.yml rename to .github/workflows/disabled/ci-validation-nightly.yml