Skip to content

Commit

Permalink
Improve the CI script
Browse files Browse the repository at this point in the history
  • Loading branch information
Kerollmops committed Dec 6, 2024
1 parent 6ad1af2 commit 03f9888
Showing 1 changed file with 48 additions and 8 deletions.
56 changes: 48 additions & 8 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on: [pull_request]

name: Rust
jobs:
test:
heed-test:
name: Test the heed project
runs-on: ${{ matrix.os }}
strategy:
Expand All @@ -13,7 +13,30 @@ jobs:
- os: ubuntu-latest
- os: windows-latest
- os: macos-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Run cargo test
run: |
cargo clean
cargo test
heed3-test:
name: Test the heed3 project
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
include:
- os: ubuntu-latest
- os: windows-latest
- os: macos-latest
steps:
- uses: actions/checkout@v2
with:
Expand All @@ -26,6 +49,7 @@ jobs:
- name: Run cargo test
run: |
cargo clean
bash convert-to-heed3.sh
cargo test
check-heed3:
Expand All @@ -38,7 +62,6 @@ jobs:
- os: ubuntu-latest
- os: windows-latest
- os: macos-latest

steps:
- uses: actions/checkout@v2
with:
Expand All @@ -65,7 +88,6 @@ jobs:
include:
- os: ubuntu-latest
- os: macos-latest

steps:
- uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -100,7 +122,6 @@ jobs:
include:
- os: ubuntu-latest
- os: macos-latest

steps:
- uses: actions/checkout@v2
with:
Expand All @@ -125,7 +146,6 @@ jobs:
include:
- os: ubuntu-latest
- os: macos-latest

steps:
- uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -160,7 +180,6 @@ jobs:
include:
- os: ubuntu-latest
- os: macos-latest

steps:
- uses: actions/checkout@v2
with:
Expand All @@ -176,8 +195,26 @@ jobs:
bash convert-to-heed3.sh
cargo run --example 2>&1 | grep -E '^ '| xargs -n1 cargo run --example
clippy:
name: Ensure clippy is happy on heed and heed3
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Run the examples
run: |
cargo clippy --all-targets -- --deny warnings
bash convert-to-heed3.sh
cargo clippy --all-targets -- --deny warnings
fmt:
name: Ensure the heed project is formatted
name: Ensure the heed and heed3 project are formatted
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -188,7 +225,10 @@ jobs:
override: true
components: rustfmt
- name: Run cargo fmt
run: cargo fmt --check
run: |
cargo fmt --check
bash convert-to-heed3.sh
cargo fmt --check
no-heed3-in-heed-folder:
name: Ensure heed3 is not erasing heed
Expand Down

0 comments on commit 03f9888

Please sign in to comment.