Skip to content

Commit 34abe95

Browse files
committed
ci: add ci
1 parent e2cae31 commit 34abe95

File tree

3 files changed

+52
-13
lines changed

3 files changed

+52
-13
lines changed

.github/workflows/ci-risc-v-imc.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
on:
2+
push:
3+
paths:
4+
- "esp32-c3-lcdkit/**"
5+
workflow_dispatch:
6+
inputs:
7+
release_name:
8+
description: 'Name of the GitHub Release'
9+
required: true
10+
default: 'v0.5.0'
11+
release_tag:
12+
description: 'Tag for the GitHub Release'
13+
required: true
14+
default: 'v0.5.0'
15+
prefix:
16+
description: 'Prefix for binary name'
17+
required: true
18+
default: 'esp32-conways-game-of-life'
19+
board:
20+
description: 'Target directory for the ESP32-C3 project (e.g. esp32-c3-lcdkit)'
21+
required: true
22+
default: 'esp32-c3-lcdkit'
23+
24+
env:
25+
CARGO_TERM_COLOR: always
26+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27+
28+
jobs:
29+
riscv-imc-release:
30+
name: RISC-V IMC CI (ESP32-C3 Projects)
31+
runs-on: ubuntu-latest
32+
steps:
33+
- name: Checkout Repository
34+
uses: actions/checkout@v4
35+
36+
- name: Setup Rust for RISC-V IMC
37+
uses: actions-rs/toolchain@v1
38+
with:
39+
toolchain: stable
40+
target: riscv32imc-unknown-none-elf
41+
42+
- name: Build ESP32-C3 Project and Collect Assets
43+
run: |
44+
cd "${{ github.event.inputs.board }}"
45+
cargo build --release
46+
cargo fmt --all -- --check --color always
47+
cargo clippy --all-features --workspace -- -D warnings

.github/workflows/ci-xtensa.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Release Xtensa
1+
name: CI Xtensa
22

33
on:
44
push:

.github/workflows/release-xtensa.yml

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -55,28 +55,20 @@ jobs:
5555

5656
- name: Build Xtensa Projects, Create Flashable Images, and Collect Assets
5757
run: |
58+
mkdir -p release_xtensa
59+
5860
# Build the box project.
5961
cd "${{ github.event.inputs.target_box }}"
6062
cargo build --release
6163
# Create flashable image for the box project.
62-
espflash save-image --output flash_image_box.bin target/xtensa-esp32s3-none-elf/release/esp32-conways-game-of-life-rs
6364
cd ..
6465
# Build the minimal project.
6566
cd "${{ github.event.inputs.target_minimal }}"
6667
cargo build --release
6768
# Create flashable image for the minimal project.
68-
espflash save-image --output flash_image_minimal.bin target/xtensa-esp32s3-none-elf/release/esp32-conways-game-of-life-rs-minimal
6969
cd ..
70-
# Create a folder to collect assets.
71-
mkdir -p release_xtensa
72-
cp "${{ github.event.inputs.target_box }}/flash_image_box.bin" release_xtensa/
73-
cp "${{ github.event.inputs.target_minimal }}/flash_image_minimal.bin" release_xtensa/
74-
75-
- name: Install GitHub CLI
76-
run: sudo apt-get install -y gh
77-
78-
- name: Authenticate GitHub CLI
79-
run: gh auth login --with-token <<< "${{ secrets.GITHUB_TOKEN }}"
70+
espflash save-image "${{ github.event.inputs.target_box }}/target/xtensa-esp32s3-none-elf/release/esp32-conways-game-of-life-rs" release_xtensa/esp32-conways-game-of-life-rs-${{ github.event.inputs.target_box }}
71+
espflash save-image "${{ github.event.inputs.target_minimal }}/target/xtensa-esp32s3-none-elf/release/esp32-conways-game-of-life-rs-minimal" release_xtensa/esp32-conways-game-of-life-rs-${{ github.event.inputs.target_minimal }}
8072
8173
- name: Check if Release Exists
8274
id: check_release

0 commit comments

Comments
 (0)