-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
These will run clippy, check code formatting, and build both ThreadX and a Rust binary.
- Loading branch information
1 parent
7babb31
commit 7f15fea
Showing
4 changed files
with
97 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# Copyright (c) 2023 Ferrous Systems | ||
# SPDX-License-Identifier: MIT OR Apache-2.0 | ||
|
||
name: workflow-build-everything | ||
run-name: Build Everything | ||
on: [push] | ||
jobs: | ||
job-build-threadx-staticlib: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: 'true' | ||
- name: Install tools | ||
run: | | ||
sudo apt-get update -y && sudo apt-get -y install cmake gcc gcc-arm-none-eabi build-essential ninja-build | ||
- name: Compile ThreadX for Cortex-M4 | ||
run: | | ||
cd threadx | ||
cmake -Bbuild_m4 -GNinja -DCMAKE_TOOLCHAIN_FILE=cmake/cortex_m4.cmake | ||
cmake --build ./build_m4 | ||
- name: Upload staticlib | ||
uses: actions/upload-artifact@master | ||
with: | ||
name: threadx-cm4 | ||
path: threadx/build_m4/libthreadx.a | ||
job-build-demo-app: | ||
runs-on: ubuntu-latest | ||
needs: job-build-threadx-staticlib | ||
steps: | ||
- name: Install tools | ||
run: | | ||
sudo apt-get update -y && sudo apt-get -y install gcc-arm-none-eabi | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: 'true' | ||
- name: Download staticlib | ||
uses: actions/download-artifact@master | ||
with: | ||
name: threadx-cm4 | ||
path: threadx/build/libthreadx.a # Where build.rs expects it | ||
- name: Add rustup target | ||
run: | | ||
rustup target add thumbv7em-none-eabi | ||
- name: Check Demo App | ||
run: | | ||
cd demo-app | ||
cargo check --target=thumbv7em-none-eabi | ||
- name: Build Demo App | ||
run: | | ||
cd demo-app | ||
cargo build --target=thumbv7em-none-eabi --release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Copyright (c) 2023 Ferrous Systems | ||
# SPDX-License-Identifier: MIT OR Apache-2.0 | ||
|
||
name: workflow-code-analysis | ||
run-name: Run code analysis | ||
on: [push] | ||
jobs: | ||
job-clippy-demo-app: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
- name: Install tools | ||
run: | | ||
sudo apt-get update -y && sudo apt-get -y install gcc-arm-none-eabi | ||
- name: Add rustup target | ||
run: | | ||
rustup target add thumbv7em-none-eabi | ||
- name: Check Clippy | ||
env: | ||
RUSTFLAGS: "-Dwarnings" | ||
run: | | ||
cd demo-app | ||
cargo clippy --all-features |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Copyright (c) 2023 Ferrous Systems | ||
# SPDX-License-Identifier: MIT OR Apache-2.0 | ||
|
||
# Builds ThreadX and then our Rust program | ||
|
||
name: workflow-code-format | ||
run-name: Check code formatting | ||
on: [push] | ||
jobs: | ||
job-format-demo-app: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
- name: Check Formatting | ||
run: | | ||
cd demo-app | ||
cargo fmt -- --check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters