Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-organise Github Actions workflows. #833

Merged
merged 1 commit into from
Aug 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 0 additions & 26 deletions .github/workflows/clippy.yml

This file was deleted.

70 changes: 70 additions & 0 deletions .github/workflows/on_target_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
on: [push, pull_request]
name: Check on-target-tests
env:
PACKAGE: on-target-tests
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
target: thumbv6m-none-eabi
- name: Install cargo-hack
run: |
curl -sSL https://github.com/taiki-e/cargo-hack/releases/download/v0.6.17/cargo-hack-x86_64-unknown-linux-gnu.tar.gz | tar xvzf - -C ~/.cargo/bin
- name: Build
run: cd ${PACKAGE} && cargo hack build --optional-deps --each-feature
udeps:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2024-01-30
target: thumbv6m-none-eabi
- name: Install cargo-hack
run: |
curl -sSL https://github.com/taiki-e/cargo-hack/releases/download/v0.6.17/cargo-hack-x86_64-unknown-linux-gnu.tar.gz | tar xvzf - -C ~/.cargo/bin
- name: Install cargo-udeps
run: |
curl -sSL https://github.com/est31/cargo-udeps/releases/download/v0.1.45/cargo-udeps-v0.1.45-x86_64-unknown-linux-gnu.tar.gz | tar xvzf - --strip-components=2 -C ~/.cargo/bin ./cargo-udeps-v0.1.45-x86_64-unknown-linux-gnu/cargo-udeps
- name: Run cargo-udeps
run: cd ${PACKAGE} && cargo hack udeps --optional-deps --each-feature
msrv:
name: Verify build on MSRV
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.77
target: thumbv6m-none-eabi
- name: Install cargo-hack
run: |
curl -sSL https://github.com/taiki-e/cargo-hack/releases/download/v0.6.17/cargo-hack-x86_64-unknown-linux-gnu.tar.gz | tar xvzf - -C ~/.cargo/bin
- name: Build on-target-tests (on MSRV)
run: cd ${PACKAGE} && cargo hack build --optional-deps --each-feature
fmt:
runs-on: ubuntu-20.04
env:
RUSTFLAGS: "-D warnings"
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: Check format
run: cd ${PACKAGE} && cargo fmt -- --check
clippy:
runs-on: ubuntu-20.04
env:
RUSTFLAGS: "-D warnings"
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
target: thumbv6m-none-eabi
components: clippy
- name: Run cargo clippy
run: cd ${PACKAGE} && cargo clippy
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
on: [push, pull_request]
name: Build and Test check
name: Check rp2040-hal
env:
PACKAGE: rp2040-hal
jobs:
rp2040-hal-builds:
name: Build rp2040-hal's features
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
Expand All @@ -13,17 +14,10 @@ jobs:
run: |
curl -sSL https://github.com/taiki-e/cargo-hack/releases/download/v0.6.17/cargo-hack-x86_64-unknown-linux-gnu.tar.gz | tar xvzf - -C ~/.cargo/bin
- name: Build rp2040-hal
run: cd rp2040-hal && cargo hack build --optional-deps --each-feature --target=thumbv6m-none-eabi
run: cd ${PACKAGE} && cargo hack build --optional-deps --each-feature --target=thumbv6m-none-eabi
- name: Build rp2040-hal-macros
run: cd rp2040-hal-macros && cargo hack build --optional-deps --each-feature
- name: Build on-target-tests
run: cd on-target-tests && cargo hack build --optional-deps --each-feature
- name: Build rp2040-hal-examples
run: cd rp2040-hal-examples && cargo hack build --optional-deps --each-feature
- name: Build rp-binary-info
run: cd rp-binary-info && cargo hack build --optional-deps --each-feature
tests:
name: Execute host-runable tests
run: cd ${PACKAGE}-macros && cargo hack build --optional-deps --each-feature
test:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
Expand All @@ -34,19 +28,14 @@ jobs:
run: |
curl -sSL https://github.com/taiki-e/cargo-hack/releases/download/v0.6.17/cargo-hack-x86_64-unknown-linux-gnu.tar.gz | tar xvzf - -C ~/.cargo/bin
- name: Test rp2040-hal
run: cd rp2040-hal && cargo hack test --optional-deps --each-feature --tests --features critical-section-impl
run: cd ${PACKAGE} && cargo hack test --optional-deps --each-feature --tests --features critical-section-impl
- name: Test rp2040-hal docs
run: cd rp2040-hal && cargo hack test --optional-deps --each-feature --doc --features critical-section-impl
run: cd ${PACKAGE} && cargo hack test --optional-deps --each-feature --doc --features critical-section-impl
- name: Test rp2040-hal-macros
run: cd rp2040-hal-macros && cargo hack test --optional-deps --tests --each-feature
run: cd ${PACKAGE}-macros && cargo hack test --optional-deps --tests --each-feature
- name: Test rp2040-hal-macros docs
run: cd rp2040-hal-macros && cargo hack test --optional-deps --doc --each-feature
- name: Test rp-binary-info
run: cd rp-binary-info && cargo hack test --optional-deps --each-feature --tests
- name: Test rp-binary-info docs
run: cd rp-binary-info && cargo hack test --optional-deps --each-feature --doc
run: cd ${PACKAGE}-macros && cargo hack test --optional-deps --doc --each-feature
udeps:
name: Check rp2040-hal for unused dependencies
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
Expand All @@ -60,16 +49,10 @@ jobs:
- name: Install cargo-udeps
run: |
curl -sSL https://github.com/est31/cargo-udeps/releases/download/v0.1.45/cargo-udeps-v0.1.45-x86_64-unknown-linux-gnu.tar.gz | tar xvzf - --strip-components=2 -C ~/.cargo/bin ./cargo-udeps-v0.1.45-x86_64-unknown-linux-gnu/cargo-udeps
- name: Check unused deps in rp2040-hal
run: cd rp2040-hal && cargo hack udeps --optional-deps --each-feature --target=thumbv6m-none-eabi
- name: Check unused deps in rp2040-hal-macros
run: cd rp2040-hal-macros && cargo hack udeps --optional-deps --each-feature
- name: Check unused deps in rp2040-hal-examples
run: cd rp2040-hal-examples && cargo hack udeps --optional-deps --each-feature
- name: Check unused deps in on-target-tests
run: cd on-target-tests && cargo hack udeps --optional-deps --each-feature
- name: Check unused deps in rp-binary-info
run: cd rp-binary-info && cargo hack udeps --optional-deps --each-feature
- name: Run cargo-udeps on rp2040-hal
run: cd ${PACKAGE} && cargo hack udeps --optional-deps --each-feature --target=thumbv6m-none-eabi
- name: Run cargo-udeps on rp2040-hal-macros
run: cd ${PACKAGE}-macros && cargo hack udeps --optional-deps --each-feature
msrv:
name: Verify build on MSRV
runs-on: ubuntu-20.04
Expand All @@ -83,14 +66,33 @@ jobs:
run: |
curl -sSL https://github.com/taiki-e/cargo-hack/releases/download/v0.6.17/cargo-hack-x86_64-unknown-linux-gnu.tar.gz | tar xvzf - -C ~/.cargo/bin
- name: Use older version of regex
run: cd rp2040-hal-examples && cargo update -p regex --precise 1.9.3
run: cd ${PACKAGE}-examples && cargo update -p regex --precise 1.9.3
- name: Build rp2040-hal (on MSRV)
run: cd rp2040-hal && cargo hack build --optional-deps --each-feature --target=thumbv6m-none-eabi
run: cd ${PACKAGE} && cargo hack build --optional-deps --each-feature --target=thumbv6m-none-eabi
- name: Build rp2040-hal-macros (on MSRV)
run: cd rp2040-hal-macros && cargo hack build --optional-deps --each-feature
- name: Build on-target-tests (on MSRV)
run: cd on-target-tests && cargo hack build --optional-deps --each-feature
- name: Build rp2040-hal-examples (on MSRV)
run: cd rp2040-hal-examples && cargo hack build --optional-deps --each-feature
- name: Build rp-binary-info (on MSRV)
run: cd rp-binary-info && cargo hack build --optional-deps --each-feature
run: cd ${PACKAGE}-macros && cargo hack build --optional-deps --each-feature
fmt:
runs-on: ubuntu-20.04
env:
RUSTFLAGS: "-D warnings"
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: Check format of rp2040-hal
run: cd ${PACKAGE} && cargo fmt -- --check
- name: Check format of rp2040-hal-macros
run: cd ${PACKAGE}-macros && cargo fmt -- --check
clippy:
runs-on: ubuntu-20.04
env:
RUSTFLAGS: "-D warnings"
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
target: thumbv6m-none-eabi
components: clippy
- name: Run cargo clippy
run: cd ${PACKAGE} && cargo clippy --target=thumbv6m-none-eabi
72 changes: 72 additions & 0 deletions .github/workflows/rp2040_hal_examples.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
on: [push, pull_request]
name: Check rp2040-hal-examples
env:
PACKAGE: rp2040-hal-examples
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
target: thumbv6m-none-eabi
- name: Install cargo-hack
run: |
curl -sSL https://github.com/taiki-e/cargo-hack/releases/download/v0.6.17/cargo-hack-x86_64-unknown-linux-gnu.tar.gz | tar xvzf - -C ~/.cargo/bin
- name: Build
run: cd ${PACKAGE} && cargo hack build --optional-deps --each-feature
udeps:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2024-01-30
target: thumbv6m-none-eabi
- name: Install cargo-hack
run: |
curl -sSL https://github.com/taiki-e/cargo-hack/releases/download/v0.6.17/cargo-hack-x86_64-unknown-linux-gnu.tar.gz | tar xvzf - -C ~/.cargo/bin
- name: Install cargo-udeps
run: |
curl -sSL https://github.com/est31/cargo-udeps/releases/download/v0.1.45/cargo-udeps-v0.1.45-x86_64-unknown-linux-gnu.tar.gz | tar xvzf - --strip-components=2 -C ~/.cargo/bin ./cargo-udeps-v0.1.45-x86_64-unknown-linux-gnu/cargo-udeps
- name: Run cargo-udeps
run: cd ${PACKAGE} && cargo hack udeps --optional-deps --each-feature
msrv:
name: Verify build on MSRV
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.77
target: thumbv6m-none-eabi
- name: Install cargo-hack
run: |
curl -sSL https://github.com/taiki-e/cargo-hack/releases/download/v0.6.17/cargo-hack-x86_64-unknown-linux-gnu.tar.gz | tar xvzf - -C ~/.cargo/bin
- name: Use older version of regex
run: cd ${PACKAGE} && cargo update -p regex --precise 1.9.3
- name: Build on MSRV
run: cd ${PACKAGE} && cargo hack build --optional-deps --each-feature
fmt:
runs-on: ubuntu-20.04
env:
RUSTFLAGS: "-D warnings"
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: Check format
run: cd ${PACKAGE} && cargo fmt -- --check
clippy:
runs-on: ubuntu-20.04
env:
RUSTFLAGS: "-D warnings"
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
target: thumbv6m-none-eabi
components: clippy
- name: Run cargo clippy
run: cd ${PACKAGE} && cargo clippy
77 changes: 77 additions & 0 deletions .github/workflows/rp_binary_info.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
on: [push, pull_request]
name: Check rp-binary-info
env:
PACKAGE: rp-binary-info
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Install cargo-hack
run: |
curl -sSL https://github.com/taiki-e/cargo-hack/releases/download/v0.6.17/cargo-hack-x86_64-unknown-linux-gnu.tar.gz | tar xvzf - -C ~/.cargo/bin
- name: Build
run: cd ${PACKAGE} && cargo hack build --optional-deps --each-feature
test:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Install cargo-hack
run: |
curl -sSL https://github.com/taiki-e/cargo-hack/releases/download/v0.6.17/cargo-hack-x86_64-unknown-linux-gnu.tar.gz | tar xvzf - -C ~/.cargo/bin
- name: Test
run: cd ${PACKAGE} && cargo hack test --optional-deps --each-feature --tests
- name: Test docs
run: cd ${PACKAGE} && cargo hack test --optional-deps --each-feature --doc
udeps:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2024-01-30
- name: Install cargo-hack
run: |
curl -sSL https://github.com/taiki-e/cargo-hack/releases/download/v0.6.17/cargo-hack-x86_64-unknown-linux-gnu.tar.gz | tar xvzf - -C ~/.cargo/bin
- name: Install cargo-udeps
run: |
curl -sSL https://github.com/est31/cargo-udeps/releases/download/v0.1.45/cargo-udeps-v0.1.45-x86_64-unknown-linux-gnu.tar.gz | tar xvzf - --strip-components=2 -C ~/.cargo/bin ./cargo-udeps-v0.1.45-x86_64-unknown-linux-gnu/cargo-udeps
- name: Run cargo-udeps
run: cd ${PACKAGE} && cargo hack udeps --optional-deps --each-feature
msrv:
name: Verify build on MSRV
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.77
- name: Install cargo-hack
run: |
curl -sSL https://github.com/taiki-e/cargo-hack/releases/download/v0.6.17/cargo-hack-x86_64-unknown-linux-gnu.tar.gz | tar xvzf - -C ~/.cargo/bin
- name: Build on MSRV
run: cd ${PACKAGE} && cargo hack build --optional-deps --each-feature
fmt:
runs-on: ubuntu-20.04
env:
RUSTFLAGS: "-D warnings"
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: Check format
run: cd ${PACKAGE} && cargo fmt -- --check
clippy:
runs-on: ubuntu-20.04
env:
RUSTFLAGS: "-D warnings"
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Run cargo clippy
run: cd ${PACKAGE} && cargo clippy
24 changes: 0 additions & 24 deletions .github/workflows/rustfmt.yml

This file was deleted.