Skip to content

Commit 61b1c89

Browse files
committed
Split github ci into muliple parts
This allows to filter jobs on type of file changes.
1 parent d4d1100 commit 61b1c89

File tree

6 files changed

+128
-41
lines changed

6 files changed

+128
-41
lines changed

.github/workflows/codegen.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Codegen CI
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
paths:
8+
- 'codegen/**'
9+
10+
jobs:
11+
codegen:
12+
name: Check Codegen
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
- uses: actions-rs/toolchain@v1
17+
with:
18+
toolchain: stable
19+
override: true
20+
profile: minimal
21+
components: rustfmt
22+
- run: cargo check --target "x86_64-unknown-linux-gnu" -p codegen

.github/workflows/ci.yml renamed to .github/workflows/hal.yml

Lines changed: 14 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
1-
name: CI
1+
name: HAL CI
22

33
on:
44
push:
55
branches: [master]
66
pull_request:
7+
paths:
8+
- 'Cargo.toml'
9+
- '.clippy.toml'
10+
- 'build.rs'
11+
- 'src/**'
12+
- 'examples/**'
13+
- '**.toml'
714

815
jobs:
916
check:
@@ -155,53 +162,19 @@ jobs:
155162
--features=stm32f303xc --lib --examples
156163
-- -D warnings
157164
158-
rustfmt:
159-
name: Rustfmt
165+
# This is only needed, becuase workflows can not trigger other workflows
166+
build-testsuite:
167+
name: Build Testsuite
160168
runs-on: ubuntu-latest
161169
steps:
162170
- uses: actions/checkout@v2
163171
- uses: actions-rs/toolchain@v1
164172
with:
165173
toolchain: stable
174+
target: thumbv7em-none-eabihf
166175
override: true
167176
profile: minimal
168-
components: rustfmt
169177
- uses: actions-rs/cargo@v1
170178
with:
171-
command: fmt
172-
args: --all -- --check
173-
174-
codegen:
175-
name: Check Codegen
176-
runs-on: ubuntu-latest
177-
steps:
178-
- uses: actions/checkout@v2
179-
- uses: actions-rs/toolchain@v1
180-
with:
181-
toolchain: stable
182-
override: true
183-
profile: minimal
184-
components: rustfmt
185-
- run: cargo check --target "x86_64-unknown-linux-gnu" -p codegen
186-
187-
markdown-lint:
188-
name: Markdown Lint
189-
runs-on: ubuntu-latest
190-
steps:
191-
- uses: actions/checkout@v2
192-
- uses: nosborn/[email protected]
193-
with:
194-
files: .
195-
config_file: .markdownlint.yml
196-
ignore_files: target/
197-
198-
link-checker:
199-
name: Link Checker
200-
runs-on: ubuntu-latest
201-
steps:
202-
- name: Checkout
203-
uses: actions/checkout@v2
204-
- name: Check URLs in documentation
205-
uses: lycheeverse/[email protected]
206-
with:
207-
args: --verbose --no-progress "**/*.md" "**/*.rs" "Cargo.toml" "**/Cargo.toml" -h accept=text/html
179+
command: test
180+
args: -p testsuite --no-run

.github/workflows/link-checker.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Link Checker CI
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
paths:
8+
- '**.md'
9+
- '**.rs'
10+
- '**.toml'
11+
12+
jobs:
13+
link-checker:
14+
name: Link Checker
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v2
19+
- name: Check URLs in documentation
20+
uses: lycheeverse/[email protected]
21+
with:
22+
args: --verbose --no-progress "**/*.md" "**/*.rs" "Cargo.toml" "**/Cargo.toml" -h accept=text/html

.github/workflows/markdown.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Markdown CI
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
paths:
8+
- '**.md'
9+
10+
jobs:
11+
markdown-lint:
12+
name: Markdown Lint
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
- uses: nosborn/[email protected]
17+
with:
18+
files: .
19+
config_file: .markdownlint.yml
20+
ignore_files: target/

.github/workflows/rust.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Rust CI
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
paths:
8+
- '**.rs'
9+
10+
jobs:
11+
rustfmt:
12+
name: Rustfmt
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
- uses: actions-rs/toolchain@v1
17+
with:
18+
toolchain: stable
19+
override: true
20+
profile: minimal
21+
components: rustfmt
22+
- uses: actions-rs/cargo@v1
23+
with:
24+
command: fmt
25+
args: --all -- --check

.github/workflows/testsuite.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Testsuite CI
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
paths:
8+
- 'testsuite/'
9+
10+
jobs:
11+
build-testsuite:
12+
name: Build Testsuite
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
- uses: actions-rs/toolchain@v1
17+
with:
18+
toolchain: stable
19+
target: thumbv7em-none-eabihf
20+
override: true
21+
profile: minimal
22+
- uses: actions-rs/cargo@v1
23+
with:
24+
command: test
25+
args: -p testsuite --no-run

0 commit comments

Comments
 (0)