-
Notifications
You must be signed in to change notification settings - Fork 10
55 lines (49 loc) · 1.73 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Release
on:
release:
types: [created]
env:
CARGO_TERM_COLOR: always
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
release:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
build:
[
{ chip: "esp32", target: "xtensa-esp32-none-elf" },
{ chip: "esp32c2", target: "riscv32imc-unknown-none-elf" },
{ chip: "esp32c3", target: "riscv32imc-unknown-none-elf" },
{ chip: "esp32c6", target: "riscv32imac-unknown-none-elf" },
{ chip: "esp32h2", target: "riscv32imac-unknown-none-elf" },
{ chip: "esp32s2", target: "xtensa-esp32s2-none-elf" },
{ chip: "esp32s3", target: "xtensa-esp32s3-none-elf" },
]
steps:
- uses: actions/checkout@v4
# RISC-V toolchain
- uses: dtolnay/rust-toolchain@v1
if: matrix.build.chip != 'esp32' && matrix.build.chip != 'esp32s2' && matrix.build.chip != 'esp32s3'
with:
target: ${{ matrix.build.target }}
toolchain: nightly
components: rust-src
# Xtensa toolchain
- uses: esp-rs/xtensa-toolchain@v1.5
if: matrix.build.chip == 'esp32' || matrix.build.chip == 'esp32s2' || matrix.build.chip == 'esp32s3'
with:
default: true
ldproxy: false
buildtargets: ${{ matrix.build.chip }}
- uses: Swatinem/rust-cache@v2
- name: build & wrap (${{ matrix.build.chip }})
working-directory: xtask
run: cargo run -- wrap ${{ matrix.build.chip }}
- uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ env.GITHUB_TOKEN }}
file: "${{ matrix.build.chip }}.*"
file_glob: true
tag: ${{ github.ref }}