|
| 1 | +name: pony-compiler |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + types: [opened, synchronize, reopened, ready_for_review] |
| 6 | + paths: |
| 7 | + - 'src/libponyc/**' |
| 8 | + - 'tools/lib/ponylang/pony_compiler/**' |
| 9 | + - '.github/workflows/pr-pony-compiler.yml' |
| 10 | + |
| 11 | +concurrency: |
| 12 | + group: pr-pony-compiler-${{ github.ref }} |
| 13 | + cancel-in-progress: true |
| 14 | + |
| 15 | +permissions: |
| 16 | + packages: read |
| 17 | + |
| 18 | +jobs: |
| 19 | + linux: |
| 20 | + if: github.event.pull_request.draft == false |
| 21 | + runs-on: ubuntu-latest |
| 22 | + name: Linux |
| 23 | + container: |
| 24 | + image: ghcr.io/ponylang/ponyc-ci-alpine3.23-builder:20260201 |
| 25 | + options: --user pony |
| 26 | + steps: |
| 27 | + - name: Checkout |
| 28 | + uses: actions/checkout@v6.0.2 |
| 29 | + - name: Restore Libs Cache |
| 30 | + id: restore-libs |
| 31 | + uses: actions/cache/restore@v5.0.3 |
| 32 | + with: |
| 33 | + path: | |
| 34 | + build/libs |
| 35 | + lib/llvm/src/compiler-rt/lib/builtins |
| 36 | + key: libs-ghcr.io/ponylang/ponyc-ci-alpine3.23-builder:20260201-${{ hashFiles('Makefile', 'CMakeLists.txt', 'lib/CMakeLists.txt', 'lib/llvm/patches/*') }} |
| 37 | + - name: Build Libs |
| 38 | + if: steps.restore-libs.outputs.cache-hit != 'true' |
| 39 | + run: make libs build_flags=-j8 |
| 40 | + - name: Build |
| 41 | + run: | |
| 42 | + make configure config=debug |
| 43 | + make build config=debug |
| 44 | + - name: Test pony-compiler |
| 45 | + run: make test-pony-compiler config=debug |
| 46 | + |
| 47 | + macos: |
| 48 | + if: github.event.pull_request.draft == false |
| 49 | + runs-on: macos-26 |
| 50 | + |
| 51 | + name: macOS |
| 52 | + steps: |
| 53 | + - name: Checkout |
| 54 | + uses: actions/checkout@v6.0.2 |
| 55 | + - name: Restore Libs Cache |
| 56 | + id: restore-libs |
| 57 | + uses: actions/cache/restore@v5.0.3 |
| 58 | + with: |
| 59 | + path: | |
| 60 | + build/libs |
| 61 | + lib/llvm/src/compiler-rt/lib/builtins |
| 62 | + key: libs-arm64-macos-26-${{ hashFiles('Makefile', 'CMakeLists.txt', 'lib/CMakeLists.txt', 'lib/llvm/patches/*') }} |
| 63 | + - name: Build Libs |
| 64 | + if: steps.restore-libs.outputs.cache-hit != 'true' |
| 65 | + run: make libs build_flags=-j8 |
| 66 | + - name: Build |
| 67 | + run: | |
| 68 | + make configure arch=armv8 config=debug |
| 69 | + make build config=debug |
| 70 | + - name: Test pony-compiler |
| 71 | + run: make test-pony-compiler config=debug |
| 72 | + |
| 73 | + windows: |
| 74 | + if: github.event.pull_request.draft == false |
| 75 | + runs-on: windows-2025 |
| 76 | + defaults: |
| 77 | + run: |
| 78 | + shell: pwsh |
| 79 | + |
| 80 | + name: Windows |
| 81 | + steps: |
| 82 | + - name: Disable Windows Defender |
| 83 | + run: Set-MpPreference -DisableRealtimeMonitoring $true |
| 84 | + - name: Checkout |
| 85 | + uses: actions/checkout@v6.0.2 |
| 86 | + - name: Restore Libs Cache |
| 87 | + id: restore-libs |
| 88 | + uses: actions/cache/restore@v5.0.3 |
| 89 | + with: |
| 90 | + path: | |
| 91 | + build/libs |
| 92 | + lib/llvm/src/compiler-rt/lib/builtins |
| 93 | + key: libs-windows-2025-${{ hashFiles('make.ps1', 'CMakeLists.txt', 'lib/CMakeLists.txt', 'lib/llvm/patches/*') }} |
| 94 | + - name: Build Libs |
| 95 | + if: steps.restore-libs.outputs.cache-hit != 'true' |
| 96 | + run: .\make.ps1 -Command libs |
| 97 | + - name: Build |
| 98 | + run: | |
| 99 | + .\make.ps1 -Command configure -Config Debug |
| 100 | + .\make.ps1 -Command build -Config Debug |
| 101 | + - name: Test pony-compiler |
| 102 | + run: .\make.ps1 -Command test -Config Debug -TestsToRun pony-compiler-tests |
0 commit comments