|
| 1 | +name: Makefile |
| 2 | + |
| 3 | +env: |
| 4 | + LLVM_VERSION: '21' |
| 5 | + |
| 6 | +on: |
| 7 | + pull_request: |
| 8 | + types: [ opened, synchronize, reopened ] |
| 9 | + |
| 10 | +concurrency: |
| 11 | + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} |
| 12 | + cancel-in-progress: true |
| 13 | + |
| 14 | +jobs: |
| 15 | + build_make: |
| 16 | + name: build on ${{ matrix.os }} |
| 17 | + |
| 18 | + strategy: |
| 19 | + fail-fast: false |
| 20 | + matrix: |
| 21 | + os: |
| 22 | + - ubuntu-24.04 |
| 23 | + - macos-15 |
| 24 | + - macos-15-intel |
| 25 | + |
| 26 | + runs-on: ${{ matrix.os }} |
| 27 | + steps: |
| 28 | + - uses: actions/checkout@v6 |
| 29 | + |
| 30 | + - name: Install dependencies |
| 31 | + run: | |
| 32 | + if [ "$RUNNER_OS" = "Linux" ]; then |
| 33 | + wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc |
| 34 | + echo "deb http://apt.llvm.org/$(lsb_release -cs)/ llvm-toolchain-$(lsb_release -cs)-$LLVM_VERSION main" | sudo tee /etc/apt/sources.list.d/llvm-$LLVM_VERSION.list |
| 35 | + sudo apt-get update |
| 36 | + sudo apt-get install -y \ |
| 37 | + build-essential pkg-config libpng-dev libjpeg-turbo8-dev \ |
| 38 | + llvm-$LLVM_VERSION-dev clang-$LLVM_VERSION lld-$LLVM_VERSION liblld-$LLVM_VERSION-dev |
| 39 | + elif [ "$RUNNER_OS" = "macOS" ]; then |
| 40 | + brew install llvm@$LLVM_VERSION lld@$LLVM_VERSION libjpeg-turbo libpng pkgconf protobuf |
| 41 | + fi |
| 42 | +
|
| 43 | + - name: Set up environment |
| 44 | + run: | |
| 45 | + if [ "$RUNNER_OS" = "Linux" ]; then |
| 46 | + echo "LLVM_CONFIG=llvm-config-$LLVM_VERSION" | tee -a "$GITHUB_ENV" |
| 47 | + elif [ "$RUNNER_OS" = "macOS" ]; then |
| 48 | + echo "LLVM_CONFIG=$(brew --prefix llvm@$LLVM_VERSION)/bin/llvm-config" | tee -a "$GITHUB_ENV" |
| 49 | + fi |
| 50 | + echo "MAKEFLAGS=-j $(getconf _NPROCESSORS_ONLN)" | tee -a "$GITHUB_ENV" |
| 51 | +
|
| 52 | + - run: make build_tests |
| 53 | + |
| 54 | + - run: make test_internal |
| 55 | + continue-on-error: true |
| 56 | + |
| 57 | + - run: make test_correctness |
| 58 | + continue-on-error: true |
| 59 | + |
| 60 | + - run: make test_generator |
| 61 | + continue-on-error: true |
| 62 | + |
| 63 | + - run: make test_error |
| 64 | + continue-on-error: true |
| 65 | + |
| 66 | + - run: make test_warning |
| 67 | + continue-on-error: true |
| 68 | + |
| 69 | + - run: make test_apps |
| 70 | + continue-on-error: true |
| 71 | + |
| 72 | + - run: make test_tutorial |
| 73 | + continue-on-error: true |
0 commit comments