Fixing Compiler bug (#5557) #5539
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
| name: "test-p4c-mac" | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| merge_group: | |
| branches: [main] | |
| # Cancel any preceding run on the pull request. | |
| concurrency: | |
| group: test-p4c-mac-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
| jobs: | |
| # Build and test p4c on latest MacOS | |
| test-mac-os: | |
| runs-on: macos-latest | |
| env: | |
| CTEST_PARALLEL_LEVEL: 4 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: recursive | |
| - name: ccache | |
| uses: hendrikmuhs/ccache-action@v1 | |
| with: | |
| key: test-${{ runner.os }} | |
| max-size: 1000M | |
| - name: Get brew cache dir | |
| id: brew-cache | |
| run: | | |
| echo "dir=$(brew --prefix)" >> $GITHUB_OUTPUT | |
| - name: Cache Homebrew Packages | |
| id: cache-homebrew-packages | |
| uses: actions/cache@v5 | |
| env: | |
| cache-name: homebrew-packages | |
| with: | |
| path: ${{ steps.brew-cache.outputs.dir }} | |
| key: ${{ runner.os }}-${{ hashFiles('tools/install_mac_deps.sh') }} | |
| - name: Install dependencies (MacOS) | |
| run: | | |
| tools/install_mac_deps.sh | |
| - name: Build (MacOS) | |
| run: | | |
| source ~/.bash_profile | |
| ./bootstrap.sh -DENABLE_GC=ON -DCMAKE_BUILD_TYPE=Release \ | |
| -DCMAKE_UNITY_BUILD=ON -DENABLE_TEST_TOOLS=ON -DENABLE_WERROR=ON --build-generator "Ninja" | |
| cmake --build build -- -j $(nproc) | |
| - name: Run tests (MacOS) | |
| run: | | |
| source ~/.bash_profile | |
| uv run ctest --output-on-failure --schedule-random -E "ubpf|testgen|smith" | |
| working-directory: ./build |