-
Notifications
You must be signed in to change notification settings - Fork 18
91 lines (81 loc) · 2.4 KB
/
ci.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: CI
on:
push:
paths-ignore:
- "book/"
- "book/**"
- "**/README.md"
- ".github/workflows/wokwi_projects.yml"
pull_request:
paths-ignore:
- "book/"
- "book/**"
- "**/README.md"
- ".github/workflows/wokwi_projects.yml"
schedule:
- cron: "50 7 * * *"
env:
CARGO_TERM_COLOR: always
SSID: Wokwi-GUEST
PASSWORD: ""
jobs:
hello-world:
name: hello-world
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@v1
with:
target: riscv32imc-unknown-none-elf
toolchain: stable
components: rust-src
- run: cargo build --release
working-directory: intro/hello-world
- name: Wokwi CI check
if: github.actor == 'esp-rs'
uses: wokwi/wokwi-ci-action@v1
with:
token: ${{ secrets.WOKWI_CLI_TOKEN }}
path: intro/hello-world
timeout: 30000
scenario: ${{ github.workspace }}/.github/hello-world.test.yaml
fail_text: 'Error'
examples:
name: ${{ matrix.project.name }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
project:
- name: "blinky"
path: "intro/blinky"
- name: "button"
path: "intro/button"
- name: "button-interrupt"
path: "intro/button-interrupt"
- name: "panic"
path: "intro/panic"
- name: "http-client"
path: "intro/http-client"
- name: "defmt"
path: "intro/defmt"
- name: "stack-overflow-detection"
path: "advanced/stack-overflow-detection"
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@v1
with:
target: riscv32imc-unknown-none-elf
toolchain: nightly
components: rust-src
- run: cargo build --release --examples
working-directory: ${{ matrix.project.path }}
- name: Wokwi CI check
if: (matrix.project.name != 'stack-overflow-detection' || matrix.project.name != 'defmt') && github.actor == 'esp-rs'
uses: wokwi/wokwi-ci-action@v1
with:
token: ${{ secrets.WOKWI_CLI_TOKEN }}
path: ${{ matrix.project.path }}
timeout: 30000
scenario: ${{ github.workspace }}/.github/${{ matrix.project.name }}.test.yaml
fail_text: 'Error'