Migrate platform to the new Zig-based Roc compiler #567
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: CI | |
| on: | |
| pull_request: | |
| workflow_dispatch: | |
| # this cancels workflows currently in progress if you start a new one | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| # Do not add permissions here! Configure them at the job level! | |
| permissions: {} | |
| env: | |
| ROC: roc | |
| jobs: | |
| build-and-test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # x64 musl Linux (native target x64musl) and arm64 macOS (native target | |
| # arm64mac). arm64 musl Linux is omitted until its committed link inputs | |
| # (platform/targets/arm64musl/) are added. | |
| os: [ubuntu-24.04, macos-15] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install the new Zig-based Roc compiler | |
| uses: roc-lang/setup-roc@32db54b6716d13ba653f8b4073670572c980013c | |
| with: | |
| # Nightly build of the new (Zig-based) compiler. Hashes are not verified | |
| # because nightlies are updated regularly. | |
| version: nightly-new-compiler | |
| - run: roc version | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Install musl target (Ubuntu) | |
| if: startsWith(matrix.os, 'ubuntu-') | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y musl-tools | |
| rustup target add x86_64-unknown-linux-musl | |
| - name: Build host static library | |
| run: ./build.sh | |
| - name: Build and test examples | |
| run: ./ci/all_tests.sh |