Skip to content

chore(rust): bump nightly to 1.94.0 #676

chore(rust): bump nightly to 1.94.0

chore(rust): bump nightly to 1.94.0 #676

Workflow file for this run

name: CI
permissions:
# Doing it explicitly because the default permission only includes metadata: read.
contents: read
on:
workflow_dispatch:
pull_request:
types: [opened, synchronize]
push:
branches:
- main
paths-ignore:
- '**/*.md'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: ${{ github.ref_name != 'main' }}
defaults:
run:
shell: bash
jobs:
detect-changes:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
outputs:
code-changed: ${{ steps.filter.outputs.code }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: filter
with:
filters: |
code:
- '!**/*.md'
test:
needs: detect-changes
if: needs.detect-changes.outputs.code-changed == 'true'
name: Test
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
- os: windows-latest
target: x86_64-pc-windows-msvc
- os: macos-latest
target: aarch64-apple-darwin
- os: macos-latest
target: x86_64-apple-darwin
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
submodules: true
# Disable Windows Defender real-time scanning to speed up I/O-heavy builds (~30-50% faster)
- name: Disable Windows Defender
if: runner.os == 'Windows'
shell: powershell
run: Set-MpPreference -DisableRealtimeMonitoring $true
- uses: oxc-project/setup-rust@d286d43bc1f606abbd98096666ff8be68c8d5f57 # v1.0.0
with:
save-cache: ${{ github.ref_name == 'main' }}
cache-key: test
components: clippy
- run: rustup target add ${{ matrix.target }}
- run: rustup target add x86_64-unknown-linux-musl
if: ${{ matrix.os == 'ubuntu-latest' }}
- run: pip install cargo-zigbuild
if: ${{ matrix.os == 'ubuntu-latest' }}
- run: cargo check --locked --all-targets --all-features --target ${{ matrix.target }}
env:
RUSTFLAGS: '-D warnings --cfg tokio_unstable' # also update .cargo/config.toml
- name: Clippy
id: clippy
continue-on-error: true
run: cargo clippy --all-targets --all-features -- -D warnings
# For x86_64-apple-darwin on arm64 runner, install x64 node so fspy preload dylib
# (compiled for x86_64) can be injected into node processes running under Rosetta.
# oxc-project/setup-node doesn't support the architecture input, so use
# pnpm/action-setup + actions/setup-node directly.
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
if: ${{ matrix.target == 'x86_64-apple-darwin' }}
- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
node-version-file: .node-version
architecture: x64
if: ${{ matrix.target == 'x86_64-apple-darwin' }}
- uses: oxc-project/setup-node@fdbf0dfd334c4e6d56ceeb77d91c76339c2a0885 # v1.0.4
if: ${{ matrix.target != 'x86_64-apple-darwin' }}
# `pnpm install` prepares test bins used in snapshot tests
# Must run after setup-node so correct native binaries are installed
- run: pnpm install
- run: cargo test --target ${{ matrix.target }}
if: ${{ matrix.os != 'ubuntu-latest' }}
- run: cargo-zigbuild test --target x86_64-unknown-linux-gnu.2.17
if: ${{ matrix.os == 'ubuntu-latest' }}
- name: Check clippy result
if: ${{ steps.clippy.outcome == 'failure' }}
run: exit 1
fmt:
name: Format and Check Deps
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
submodules: true
- uses: oxc-project/setup-rust@d286d43bc1f606abbd98096666ff8be68c8d5f57 # v1.0.0
with:
save-cache: ${{ github.ref_name == 'main' }}
cache-key: fmt
tools: cargo-shear@1.11.1
components: clippy rust-docs rustfmt
- uses: oxc-project/setup-node@fdbf0dfd334c4e6d56ceeb77d91c76339c2a0885 # v1.0.4
- run: pnpm oxfmt --check
- run: cargo shear --deny-warnings
- run: cargo fmt --check
- run: RUSTDOCFLAGS='-D warnings' cargo doc --no-deps --document-private-items
- uses: crate-ci/typos@631208b7aac2daa8b707f55e7331f9112b0e062d # v1.44.0
with:
files: .
- name: Deduplicate dependencies
run: pnpm dedupe --check
done:
runs-on: ubuntu-latest
if: always()
needs:
- test
- fmt
steps:
- run: exit 1
# Thank you, next https://github.com/vercel/next.js/blob/canary/.github/workflows/build_and_test.yml#L379
if: ${{ always() && (contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')) }}