ci: merge fast_checks into full_rust_checks
It's not necessary to have two separate linting workflows as the full lints themselves are very quick.
This commit is contained in:
parent
1d8975319c
commit
b122c59ca3
4 changed files with 38 additions and 75 deletions
18
.github/workflows/CICD.yml
vendored
18
.github/workflows/CICD.yml
vendored
|
|
@ -40,37 +40,31 @@ jobs:
|
|||
|| github.ref
|
||||
}}
|
||||
|
||||
fast_checks:
|
||||
name: Fast checks
|
||||
uses: ./.github/workflows/fast_checks.yml
|
||||
|
||||
full_checks:
|
||||
name: Full Rust checks
|
||||
needs: fast_checks
|
||||
uses: ./.github/workflows/full_rust_checks.yml
|
||||
checks:
|
||||
uses: ./.github/workflows/checks.yml
|
||||
|
||||
min_version:
|
||||
name: Minimum supported rust version
|
||||
needs: fast_checks
|
||||
needs: checks
|
||||
uses: ./.github/workflows/msrv.yml
|
||||
with:
|
||||
package: tree-sitter-cli
|
||||
|
||||
sanitize:
|
||||
name: Sanitize
|
||||
needs: [init, fast_checks]
|
||||
needs: [init, checks]
|
||||
uses: ./.github/workflows/sanitize.yml
|
||||
|
||||
build:
|
||||
name: Build & Test
|
||||
needs: [init, fast_checks]
|
||||
needs: [init, checks]
|
||||
uses: ./.github/workflows/build.yml
|
||||
with:
|
||||
ref: ${{ needs.init.outputs.ref }}
|
||||
|
||||
release:
|
||||
name: Release
|
||||
needs: [init, fast_checks, full_checks, min_version, build, sanitize]
|
||||
needs: [init, checks, min_version, build, sanitize]
|
||||
if: >
|
||||
github.event_name == 'pull_request' &&
|
||||
startsWith(github.head_ref, 'release/v') &&
|
||||
|
|
|
|||
32
.github/workflows/checks.yml
vendored
Normal file
32
.github/workflows/checks.yml
vendored
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
name: Full Rust codebase checks
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
RUSTFLAGS: "-D warnings"
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
|
||||
jobs:
|
||||
run:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Install rust toolchain
|
||||
uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
toolchain: stable
|
||||
components: clippy, rustfmt
|
||||
|
||||
- run: cargo fmt -- --check
|
||||
- run: cargo check --workspace --examples --tests --benches --bins
|
||||
|
||||
check_c_warnings:
|
||||
name: Check C warnings
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Make C library to check that it's able to compile without warnings
|
||||
run: make -j CFLAGS="-Werror"
|
||||
31
.github/workflows/fast_checks.yml
vendored
31
.github/workflows/fast_checks.yml
vendored
|
|
@ -1,31 +0,0 @@
|
|||
name: Fast checks to fail fast on any simple code issues
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
RUSTFLAGS: "-D warnings"
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
|
||||
jobs:
|
||||
check_rust_formatting:
|
||||
name: Check Rust formating
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- name: Checkout source code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Run cargo fmt
|
||||
run: cargo fmt -- --check
|
||||
|
||||
check_c_warnings:
|
||||
name: Check C warnings
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- name: Checkout source code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Make C library to check that it's able to compile without warnings
|
||||
run: make -j CFLAGS="-Werror"
|
||||
32
.github/workflows/full_rust_checks.yml
vendored
32
.github/workflows/full_rust_checks.yml
vendored
|
|
@ -1,32 +0,0 @@
|
|||
name: Full Rust codebase checks
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
RUSTFLAGS: "-D warnings"
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
|
||||
jobs:
|
||||
run:
|
||||
name: Run checks
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- name: Checkout source code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install rust toolchain
|
||||
uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
toolchain: stable
|
||||
components: clippy, rustfmt
|
||||
|
||||
- name: Run cargo fmt
|
||||
run: cargo fmt -- --check
|
||||
|
||||
# - name: Run clippy
|
||||
# run: cargo clippy --all-targets
|
||||
|
||||
- name: Run cargo check
|
||||
run: cargo check --workspace --examples --tests --benches --bins
|
||||
Loading…
Add table
Add a link
Reference in a new issue