Skip to content

Commit be2c681

Browse files
committed
cicd: updates rust_ci.yml workflow to take in consideration lib, simulation and esp
1 parent a9060af commit be2c681

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

.github/workflows/rust_ci.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,37 @@ jobs:
2121
action:
2222
- command: build
2323
args: --release
24+
package: your-life-in-x
25+
- command: build
26+
args: --release
27+
package: simulation
28+
- command: build
29+
args: --release
30+
directory: esp
2431
- command: fmt
2532
args: --all -- --check --color always
2633
- command: clippy
2734
args: --all-features --workspace -- -D warnings
2835
steps:
2936
- name: Checkout repository
3037
uses: actions/checkout@v4
38+
3139
- name: Setup Rust
3240
uses: dtolnay/rust-toolchain@v1
3341
with:
3442
target: riscv32imc-unknown-none-elf
3543
toolchain: stable
3644
components: rust-src, rustfmt, clippy
45+
3746
- name: Enable caching
3847
uses: Swatinem/rust-cache@v2
48+
3949
- name: Run command
40-
run: cargo ${{ matrix.action.command }} ${{ matrix.action.args }}
50+
run: |
51+
if [[ -n "${{ matrix.action.package }}" ]]; then
52+
cargo ${{ matrix.action.command }} --package ${{ matrix.action.package }} ${{ matrix.action.args }}
53+
elif [[ -n "${{ matrix.action.directory }}" ]]; then
54+
cd ${{ matrix.action.directory }} && cargo ${{ matrix.action.command }} ${{ matrix.action.args }}
55+
else
56+
cargo ${{ matrix.action.command }} ${{ matrix.action.args }}
57+
fi

0 commit comments

Comments
 (0)