Skip to content

Commit 4ed2f3c

Browse files
authored
Rewrite CI
actions-rs is unmaintained and runners include rustup now, therefore the actions are now plain commands. CI is now done for both ec4rs and ec4rs_glob separately. CI runs more selectively in PRs than before, based on which files change.
1 parent 6e6d13a commit 4ed2f3c

File tree

4 files changed

+132
-92
lines changed

4 files changed

+132
-92
lines changed

.github/workflows/check-ctest.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Check Compliance
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- '**.rs'
7+
- '.github/workflows/check-ctest.yml'
8+
push:
9+
branches:
10+
- main
11+
12+
jobs:
13+
compliance:
14+
name: Check Compliance
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v5
19+
with:
20+
submodules: true
21+
- name: Install Rust
22+
run: "rustup toolchain install --profile minimal stable"
23+
- name: Build
24+
run: "cargo build -p ec4rs_tools"
25+
- name: Core Tests
26+
shell: bash
27+
run: |
28+
cd tests
29+
cmake -DEDITORCONFIG_CMD="$PWD/../target/debug/ec4rs-parse" .
30+
ctest .

.github/workflows/check-glob.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Check ec4rs_glob
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'glob/**.rs'
7+
- 'glob/Cargo.toml'
8+
- '.github/workflows/check-glob.yml'
9+
push:
10+
branches:
11+
- main
12+
13+
jobs:
14+
test:
15+
name: MSRV Tests (glob)
16+
runs-on: ${{ matrix.os }}
17+
strategy:
18+
matrix:
19+
build: [linux, windows]
20+
include:
21+
- build: linux
22+
os: ubuntu-latest
23+
- build: windows
24+
os: windows-latest
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v5
28+
- name: Install MSRV Rust
29+
run: "rustup toolchain install --profile minimal 1.56"
30+
- name: Build (glob)
31+
run: "cargo build -p ec4rs_glob"
32+
- name: Unit Tests (glob)
33+
run: "cargo test -p ec4rs_glob"
34+
quality:
35+
name: Check Quality (glob)
36+
runs-on: ubuntu-latest
37+
steps:
38+
- name: Checkout
39+
uses: actions/checkout@v5
40+
- name: Install Rust
41+
run: |
42+
rustup toolchain install --profile minimal
43+
rustup component add clippy
44+
rustup component add rustfmt
45+
- name: Check Clippy
46+
run: "cargo clippy -p ec4rs_glob"
47+
- name: Check Docs
48+
run: "cargo doc --no-deps -p ec4rs_glob"
49+
- name: Check Style
50+
run: "cargo fmt --check -p ec4rs_glob"

.github/workflows/check-lib.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Check ec4rs
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'src/**.rs'
7+
- 'Cargo.toml'
8+
- '.github/workflows/check-lib.yml'
9+
push:
10+
branches:
11+
- main
12+
13+
jobs:
14+
test:
15+
name: MSRV Tests (library)
16+
runs-on: ${{ matrix.os }}
17+
strategy:
18+
matrix:
19+
build: [linux, windows]
20+
include:
21+
- build: linux
22+
os: ubuntu-latest
23+
- build: windows
24+
os: windows-latest
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v5
28+
- name: Install MSRV Rust
29+
run: "rustup toolchain install --profile minimal 1.56"
30+
- name: Build (library)
31+
run: "cargo build -p ec4rs"
32+
- name: Unit Tests (library)
33+
run: "cargo test -p ec4rs"
34+
- name: Unit Tests (library, all-features)
35+
run: "cargo test -p ec4rs --all-features"
36+
quality:
37+
name: Code Quality (library)
38+
runs-on: ubuntu-latest
39+
steps:
40+
- name: Checkout
41+
uses: actions/checkout@v5
42+
- name: Install Rust
43+
run: |
44+
rustup toolchain install --profile minimal
45+
rustup component add clippy
46+
rustup component add rustfmt
47+
- name: Check Clippy
48+
run: "cargo clippy -p ec4rs"
49+
- name: Check Docs
50+
run: "cargo doc --no-deps -p ec4rs"
51+
- name: Check Style
52+
run: "cargo fmt --check -p ec4rs"

.github/workflows/ci.yml

Lines changed: 0 additions & 92 deletions
This file was deleted.

0 commit comments

Comments
 (0)