Files
zen/.github/workflows/rust.yaml
Stefan f4bdae4e42 ci: pin Rust to 1.99.0
Rust 1.100 passes one -L dependency directory per dependency, which pushes the rustc command for zen-engine past the Windows command-line limit when sccache spawns it (os error 206). Every workflow that installed stable now installs 1.99.0; miri stays on nightly.
2026-11-19 14:48:47 +01:00

101 lines
2.5 KiB
YAML

name: Rust
permissions:
contents: read
id-token: write
on:
pull_request:
paths-ignore:
- 'bindings/**'
- 'examples/**'
- '.github/workflows/python.yaml'
- '.github/workflows/node.yaml'
push:
tags:
- 'zen-engine-v*'
env:
RUST_BACKTRACE: 1
RUSTUP_MAX_RETRIES: 10
defaults:
run:
shell: bash
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
test:
name: cargo test (${{ matrix.os }})
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Install Rust
run: |
rustup toolchain install 1.99.0 --profile minimal
rustup default 1.99.0
- uses: ./.github/actions/setup-rust
with:
shared-key: rust-test-${{ matrix.os }}
sccache-bucket: ${{ secrets.SCCACHE_S3_BUCKET }}
sccache-region: ${{ secrets.SCCACHE_AWS_REGION }}
sccache-role-arn: ${{ secrets.SCCACHE_AWS_ROLE_ARN }}
- run: cargo test --workspace --all-features --exclude zen-ffi --exclude zen-nodejs --exclude zen-python --locked
- name: Test without arbitrary_precision
run: cargo test --workspace --exclude zen-ffi --exclude zen-nodejs --exclude zen-python --locked
fmt:
name: Cargo FMT
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Rust
run: |
rustup toolchain install 1.99.0 --profile minimal --component rustfmt
rustup default 1.99.0
- run: cargo fmt --all -- --check
release:
name: Cargo Release
runs-on: ubuntu-latest
environment: release
if: "github.ref_type == 'tag'"
needs:
- test
- fmt
steps:
- uses: actions/checkout@v3
- name: Install Rust
run: |
rustup toolchain install 1.99.0 --profile minimal
rustup default 1.99.0
- name: Login to Crates.IO
run: cargo login ${{ secrets.CRATES_TOKEN }}
- name: Publish Macros
run: cd core/macros && cargo publish --locked
- name: Publish Types
run: cd core/types && cargo publish --locked
- name: Publish Expression
run: cd core/expression && cargo publish --locked
- name: Publish Template
run: cd core/template && cargo publish --locked
- name: Publish Engine
run: cd core/engine && cargo publish --locked