Skip to content

Represent special filesystem path types #1268

Represent special filesystem path types

Represent special filesystem path types #1268

Workflow file for this run

name: CI
on:
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# Do not add permissions here! Configure them at the job level!
permissions: {}
jobs:
rust-version:
name: read Rust version
runs-on: ubuntu-24.04
outputs:
version: ${{ steps.read.outputs.version }}
steps:
- uses: actions/checkout@v7
- id: read
run: |
version=$(sed -n 's/^channel = "\(.*\)".*/\1/p' rust-toolchain.toml)
echo "version=$version" >> "$GITHUB_OUTPUT"
validate:
name: validate sources
needs: rust-version
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v7
- uses: mlugg/setup-zig@8d6198c65fb0feaa111df26e6b467fea8345e46f # ratchet:mlugg/setup-zig@v2.0.5
with:
version: 0.16.0
- uses: roc-lang/setup-roc@cbe782d6f165b89c87d99f50a59ac4f5f73b4427 # ratchet:roc-lang/setup-roc@v0.3.0
with:
version: nightly-new-compiler
- name: Install Rust toolchain
run: |
rustup toolchain install "${{ needs.rust-version.outputs.version }}" --profile minimal --target x86_64-unknown-linux-musl --component llvm-tools-preview
rustup default "${{ needs.rust-version.outputs.version }}"
- name: Format, check, and test examples
run: ./scripts/test.py --operation validate
validate-windows:
name: validate sources (windows)
needs: rust-version
runs-on: windows-2025
steps:
- uses: actions/checkout@v7
- uses: roc-lang/setup-roc@cbe782d6f165b89c87d99f50a59ac4f5f73b4427 # ratchet:roc-lang/setup-roc@v0.3.0
with:
version: nightly-new-compiler
- name: Install Rust toolchain
shell: bash
run: |
rustup toolchain install "${{ needs.rust-version.outputs.version }}" --profile minimal --target x86_64-pc-windows-msvc
rustup default "${{ needs.rust-version.outputs.version }}"
- name: Format, check, and test examples
shell: bash
run: ./scripts/test.py --operation validate
build-examples:
name: build examples (${{ matrix.target }})
needs: [rust-version, validate]
permissions:
contents: read
strategy:
fail-fast: false
matrix:
include:
- target: x64mac
os: macos-26-intel
rust_target: x86_64-apple-darwin
- target: arm64mac
os: macos-26
rust_target: aarch64-apple-darwin
- target: x64musl
os: ubuntu-24.04
rust_target: x86_64-unknown-linux-musl
- target: arm64musl
os: ubuntu-24.04-arm
rust_target: aarch64-unknown-linux-musl
- target: x64win
os: windows-2025
rust_target: x86_64-pc-windows-msvc
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v7
- name: Install Zig
if: runner.os != 'Windows'
uses: mlugg/setup-zig@8d6198c65fb0feaa111df26e6b467fea8345e46f # ratchet:mlugg/setup-zig@v2.0.5
with:
version: 0.16.0
- uses: roc-lang/setup-roc@cbe782d6f165b89c87d99f50a59ac4f5f73b4427 # ratchet:roc-lang/setup-roc@v0.3.0
with:
version: nightly-new-compiler
- name: Install Rust toolchain
shell: bash
run: |
rustup toolchain install "${{ needs.rust-version.outputs.version }}" --profile minimal --target ${{ matrix.rust_target }}
rustup default "${{ needs.rust-version.outputs.version }}"
- name: Install LLVM tools for Linux host stripping
if: endsWith(matrix.target, 'musl')
run: rustup component add llvm-tools-preview
- name: Cross-compile every example
shell: bash
run: ./scripts/test.py --operation build --target "${{ matrix.target }}" --artifact-dir dist/example-binaries
- name: Upload example binaries
uses: actions/upload-artifact@v7
with:
name: basic-cli-example-binaries-${{ matrix.target }}
path: dist/example-binaries/${{ matrix.target }}
if-no-files-found: error
run-examples:
name: run examples (${{ matrix.target }})
needs: [rust-version, build-examples]
strategy:
fail-fast: false
matrix:
include:
- target: x64mac
os: macos-26-intel
- target: arm64mac
os: macos-26
- target: x64musl
os: ubuntu-24.04
- target: arm64musl
os: ubuntu-24.04-arm
- target: x64win
os: windows-2025
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v7
- name: Install Rust toolchain
shell: bash
run: |
rustup toolchain install "${{ needs.rust-version.outputs.version }}" --profile minimal
rustup default "${{ needs.rust-version.outputs.version }}"
- name: Download native example binaries
uses: actions/download-artifact@v8
with:
name: basic-cli-example-binaries-${{ matrix.target }}
path: dist/example-binaries/${{ matrix.target }}
- name: Run native spec cases
shell: bash
run: ./scripts/test.py --operation run --target "${{ matrix.target }}" --artifact-dir dist/example-binaries