19
19
CARGO_TERM_COLOR : always
20
20
RUST_LOG : debug
21
21
22
- # Cancel any currently running workflows from the same PR, branch, or
23
- # tag when a new workflow is triggered.
24
- #
25
- # https://stackoverflow.com/a/66336834
26
22
concurrency :
27
23
cancel-in-progress : true
28
24
group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
29
25
30
26
jobs :
31
27
build-espflash :
32
- name : Build espflash
33
- runs-on : ubuntu-22.04
34
- container :
35
- image : ubuntu:20.04
36
-
37
- steps :
38
- - uses : actions/checkout@v4
39
- with :
40
- repository : ${{ github.event.inputs.repository || github.repository }}
41
- ref : ${{ github.event.inputs.branch || github.ref }}
42
-
43
- - name : Install dependencies
44
- env :
45
- DEBIAN_FRONTEND : noninteractive
46
- run : apt-get update && apt-get -y install curl musl-tools pkg-config
47
-
48
- - name : Install toolchain
49
- run : curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
50
-
51
- - name : Build espflash
52
- run : $HOME/.cargo/bin/cargo build --release
53
- working-directory : espflash
54
-
55
- - uses : actions/upload-artifact@v4
56
- with :
57
- name : espflash
58
- path : target/release/espflash
59
- if-no-files-found : error
28
+ uses : ./.github/workflows/build-template.yml
29
+ with :
30
+ directory : espflash
31
+ artifact-name : espflash
32
+ binary-path : target/release/espflash
33
+ repository : ${{ github.event.inputs.repository || github.repository }}
34
+ ref : ${{ github.event.inputs.branch || github.ref }}
35
+
36
+ build-xtask :
37
+ uses : ./.github/workflows/build-template.yml
38
+ with :
39
+ directory : xtask
40
+ artifact-name : xtask
41
+ binary-path : target/release/xtask
42
+ repository : ${{ github.event.inputs.repository || github.repository }}
43
+ ref : ${{ github.event.inputs.branch || github.ref }}
60
44
61
45
run-target :
62
46
if : github.repository_owner == 'esp-rs'
63
47
name : ${{ matrix.board.mcu }}${{ matrix.board.freq }}
64
- needs : build-espflash
48
+ needs : [ build-espflash, build-xtask]
65
49
runs-on :
66
50
[
67
51
self-hosted,
@@ -99,43 +83,51 @@ jobs:
99
83
run : |
100
84
chmod +x espflash_app/espflash
101
85
echo "$PWD/espflash_app" >> "$GITHUB_PATH"
86
+ - uses : actions/download-artifact@v4
87
+ with :
88
+ name : xtask
89
+ path : xtask_app
102
90
91
+ - name : Set up xtask binary
92
+ run : |
93
+ chmod +x xtask_app/xtask
94
+ echo "$PWD/xtask_app" >> "$GITHUB_PATH"
103
95
- name : Run all tests
104
- run : cargo xtask run-tests --chip ${{ matrix.board.mcu }} -t 60
96
+ run : ./xtask_app/ xtask run-tests --chip ${{ matrix.board.mcu }} -t 60
105
97
106
- - name : board-info test
107
- run : cargo xtask run-tests --chip ${{ matrix.board.mcu }} -t 15 board-info
98
+ # - name: board-info test
99
+ # run: $HOME/.cargo/bin/ cargo xtask run-tests --chip ${{ matrix.board.mcu }} -t 15 board-info
108
100
109
- - name : flash test
110
- run : cargo xtask run-tests --chip ${{ matrix.board.mcu }} -t 90 flash
101
+ # - name: flash test
102
+ # run: $HOME/.cargo/bin/ cargo xtask run-tests --chip ${{ matrix.board.mcu }} -t 90 flash
111
103
112
- - name : monitor test
113
- run : cargo xtask run-tests --chip ${{ matrix.board.mcu }} -t 20 monitor
104
+ # - name: monitor test
105
+ # run: $HOME/.cargo/bin/ cargo xtask run-tests --chip ${{ matrix.board.mcu }} -t 20 monitor
114
106
115
- - name : erase-flash test
116
- run : cargo xtask run-tests --chip ${{ matrix.board.mcu }} -t 60 erase-flash
107
+ # - name: erase-flash test
108
+ # run: $HOME/.cargo/bin/ cargo xtask run-tests --chip ${{ matrix.board.mcu }} -t 60 erase-flash
117
109
118
- - name : save-image/write-bin test
119
- run : |
120
- cargo xtask run-tests --chip ${{ matrix.board.mcu }} -t 60 save-image_write-bin
110
+ # - name: save-image/write-bin test
111
+ # run:
112
+ # $HOME/.cargo/bin/ cargo xtask run-tests --chip ${{ matrix.board.mcu }} -t 60 save-image_write-bin
121
113
122
- - name : erase-region test
123
- run : cargo xtask run-tests --chip ${{ matrix.board.mcu }} -t 60 erase-region
114
+ # - name: erase-region test
115
+ # run: $HOME/.cargo/bin/ cargo xtask run-tests --chip ${{ matrix.board.mcu }} -t 60 erase-region
124
116
125
- - name : hold-in-reset test
126
- run : cargo xtask run-tests --chip ${{ matrix.board.mcu }} -t 10 hold-in-reset
117
+ # - name: hold-in-reset test
118
+ # run: $HOME/.cargo/bin/ cargo xtask run-tests --chip ${{ matrix.board.mcu }} -t 10 hold-in-reset
127
119
128
- - name : reset test
129
- run : cargo xtask run-tests --chip ${{ matrix.board.mcu }} -t 10 reset
120
+ # - name: reset test
121
+ # run: $HOME/.cargo/bin/ cargo xtask run-tests --chip ${{ matrix.board.mcu }} -t 10 reset
130
122
131
- - name : checksum-md5 test
132
- run : cargo xtask run-tests --chip ${{ matrix.board.mcu }} -t 10 checksum-md5
123
+ # - name: checksum-md5 test
124
+ # run: $HOME/.cargo/bin/ cargo xtask run-tests --chip ${{ matrix.board.mcu }} -t 10 checksum-md5
133
125
134
- - name : list-ports test
135
- run : cargo xtask run-tests --chip ${{ matrix.board.mcu }} -t 10 list-ports
126
+ # - name: list-ports test
127
+ # run: $HOME/.cargo/bin/ cargo xtask run-tests --chip ${{ matrix.board.mcu }} -t 10 list-ports
136
128
137
- - name : write-bin test
138
- run : cargo xtask run-tests --chip ${{ matrix.board.mcu }} -t 30 write-bin
129
+ # - name: write-bin test
130
+ # run: $HOME/.cargo/bin/ cargo xtask run-tests --chip ${{ matrix.board.mcu }} -t 30 write-bin
139
131
140
- - name : read-flash test
141
- run : cargo xtask run-tests --chip ${{ matrix.board.mcu }} -t 60 read-flash
132
+ # - name: read-flash test
133
+ # run: $HOME/.cargo/bin/ cargo xtask run-tests --chip ${{ matrix.board.mcu }} -t 60 read-flash
0 commit comments