Files
OxideJS-New/.github/workflows/ci.yml
T

43 lines
972 B
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- uses: Swatinem/rust-cache@v2
# .cargo/config.toml 依赖 sccache(rustc-wrapper)与 mold(-fuse-ld=mold),
# 两者均在 Ubuntu 仓库中。CI 同样受益:sccache 配合 rust-cache 命中缓存,
# mold 并行链接。
- name: Install sccache and mold
run: sudo apt-get update -y && sudo apt-get install -y sccache mold
- name: Check formatting
run: cargo fmt --all -- --check
- name: Clippy
run: cargo clippy --all-targets -- -D warnings
- name: Build
run: cargo build --verbose
- name: Test
run: cargo test --verbose