mirror of
https://github.com/leonardomso/rust-skills.git
synced 2026-09-14 19:33:21 +08:00
19d5cb385d
Add checks/check.sh as the single entrypoint CI and contributors both run. Pin the toolchain and compile target via checks/rust-toolchain.toml (Rust 1.95.0, x86_64-unknown-linux-gnu) and commit Cargo.lock so example checks are deterministic across machines. Baseline regenerated for the x86_64 target.
30 lines
679 B
YAML
30 lines
679 B
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
pull_request:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
checks:
|
|
name: Validate & compile-check
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.x"
|
|
# Toolchain/target are pinned by checks/rust-toolchain.toml (Rust 1.95.0).
|
|
- uses: dtolnay/rust-toolchain@1.95.0
|
|
with:
|
|
targets: x86_64-unknown-linux-gnu
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
workspaces: checks
|
|
# The exact same command contributors run locally.
|
|
- name: Run checks
|
|
run: bash checks/check.sh
|