rojo/.github/workflows/ci.yml
Joe 1f5dacd218 chore: update CI configuration and Rust settings
- Added support for `lld-link` as the linker for both x86_64 and aarch64 Windows targets in `.cargo/config.toml`.
- Updated CI workflows to use `Swatinem/rust-cache` for caching Rust dependencies, improving build efficiency.
- Consolidated build and test steps in CI workflows, enhancing clarity and reducing redundancy.
- Introduced a step to disable Windows Defender during CI runs on Windows to prevent interference with builds.
2026-03-12 20:41:34 -05:00

116 lines
2.3 KiB
YAML

name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
name: Build and Test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, windows-latest, macos-latest, windows-11-arm, ubuntu-22.04-arm]
steps:
- name: Disable Windows Defender
if: runner.os == 'Windows'
run: Set-MpPreference -DisableRealtimeMonitoring $true
- uses: actions/checkout@v4
with:
submodules: true
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Rust Cache
uses: Swatinem/rust-cache@v2
- name: Build and Test
env:
CARGO_TERM_VERBOSE: ${{ runner.debug && 'true' || 'false' }}
run: cargo test --locked --all-targets
build-vscode:
name: Build VS Code Extension
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install Dependencies
working-directory: vscode-rojo
run: npm ci
- name: Package Extension
working-directory: vscode-rojo
run: npx --yes @vscode/vsce package --no-dependencies
msrv:
name: Check MSRV
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install Rust
uses: dtolnay/rust-toolchain@1.88.0
- name: Rust Cache
uses: Swatinem/rust-cache@v2
- name: Build
env:
CARGO_TERM_VERBOSE: ${{ runner.debug && 'true' || 'false' }}
run: cargo build --locked
lint:
name: Rustfmt, Clippy, Stylua, & Selene
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Rust Cache
uses: Swatinem/rust-cache@v2
- name: Setup Rokit
uses: CompeyDev/setup-rokit@v0.1.2
with:
version: 'v1.1.0'
- name: Stylua
run: stylua --check plugin/src
- name: Selene
run: selene plugin/src
- name: Rustfmt
run: cargo fmt -- --check
- name: Clippy
run: cargo clippy