Skip to content

Commit

Permalink
Split github ci into muliple parts
Browse files Browse the repository at this point in the history
This allows to filter jobs on type of file
changes.
  • Loading branch information
Sh3Rm4n committed Aug 21, 2021
1 parent ca538b5 commit b010cf4
Show file tree
Hide file tree
Showing 6 changed files with 128 additions and 41 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/codegen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Codegen CI

on:
push:
branches: [master]
pull_request:
paths:
- 'codegen/**'

jobs:
codegen:
name: Check Codegen
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
profile: minimal
components: rustfmt
- run: cargo check --target "x86_64-unknown-linux-gnu" -p codegen
55 changes: 14 additions & 41 deletions .github/workflows/ci.yml → .github/workflows/hal.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
name: CI
name: HAL CI

on:
push:
branches: [master]
pull_request:
paths:
- 'Cargo.toml'
- '.clippy.toml'
- 'build.rs'
- 'src/**'
- 'examples/**'
- '**.toml'

jobs:
check:
Expand Down Expand Up @@ -155,53 +162,19 @@ jobs:
--features=stm32f303xc --lib --examples
-- -D warnings
rustfmt:
name: Rustfmt
# This is only needed, becuase workflows can not trigger other workflows
build-testsuite:
name: Build Testsuite
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: thumbv7em-none-eabihf
override: true
profile: minimal
components: rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check

codegen:
name: Check Codegen
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
profile: minimal
components: rustfmt
- run: cargo check --target "x86_64-unknown-linux-gnu" -p codegen

markdown-lint:
name: Markdown Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: nosborn/[email protected]
with:
files: .
config_file: .markdownlint.yml
ignore_files: target/

link-checker:
name: Link Checker
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Check URLs in documentation
uses: lycheeverse/[email protected]
with:
args: --verbose --no-progress "**/*.md" "**/*.rs" "Cargo.toml" "**/Cargo.toml" -h accept=text/html
command: test
args: -p testsuite --no-run
22 changes: 22 additions & 0 deletions .github/workflows/link-checker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Link Checker CI

on:
push:
branches: [master]
pull_request:
paths:
- '**.md'
- '**.rs'
- '**.toml'

jobs:
link-checker:
name: Link Checker
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Check URLs in documentation
uses: lycheeverse/[email protected]
with:
args: --verbose --no-progress "**/*.md" "**/*.rs" "Cargo.toml" "**/Cargo.toml" -h accept=text/html
20 changes: 20 additions & 0 deletions .github/workflows/markdown.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Markdown CI

on:
push:
branches: [master]
pull_request:
paths:
- '**.md'

jobs:
markdown-lint:
name: Markdown Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: nosborn/[email protected]
with:
files: .
config_file: .markdownlint.yml
ignore_files: target/
25 changes: 25 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Rust CI

on:
push:
branches: [master]
pull_request:
paths:
- '**.rs'

jobs:
rustfmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
profile: minimal
components: rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
25 changes: 25 additions & 0 deletions .github/workflows/testsuite.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Testsuite CI

on:
push:
branches: [master]
pull_request:
paths:
- 'testsuite/'

jobs:
build-testsuite:
name: Build Testsuite
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: thumbv7em-none-eabihf
override: true
profile: minimal
- uses: actions-rs/cargo@v1
with:
command: test
args: -p testsuite --no-run

0 comments on commit b010cf4

Please sign in to comment.