|
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,
|
@@ -100,42 +84,58 @@ jobs:
|
100 | 84 | chmod +x espflash_app/espflash
|
101 | 85 | echo "$PWD/espflash_app" >> "$GITHUB_PATH"
|
102 | 86 |
|
| 87 | + - uses: actions/download-artifact@v4 |
| 88 | + with: |
| 89 | + name: xtask |
| 90 | + path: xtask_app |
| 91 | + |
| 92 | + - name: Set up xtask binary |
| 93 | + run: | |
| 94 | + chmod +x xtask_app/xtask |
| 95 | + echo "$PWD/xtask_app" >> "$GITHUB_PATH" |
| 96 | +
|
103 | 97 | - name: Run all tests
|
104 |
| - run: cargo xtask run-tests --chip ${{ matrix.board.mcu }} -t 60 |
| 98 | + run: | |
| 99 | + pwd |
| 100 | + ls -l xtask_app/xtask |
| 101 | + file xtask_app/xtask |
| 102 | + ldd xtask_app/xtask |
| 103 | + ./xtask_app/xtask --help |
| 104 | + # ./xtask_app/xtask run-tests --chip ${{ matrix.board.mcu }} -t 60 |
105 | 105 |
|
106 |
| - - name: board-info test |
107 |
| - run: cargo xtask run-tests --chip ${{ matrix.board.mcu }} -t 15 board-info |
| 106 | + # - name: board-info test |
| 107 | + # run: $HOME/.cargo/bin/cargo xtask run-tests --chip ${{ matrix.board.mcu }} -t 15 board-info |
108 | 108 |
|
109 |
| - - name: flash test |
110 |
| - run: cargo xtask run-tests --chip ${{ matrix.board.mcu }} -t 90 flash |
| 109 | + # - name: flash test |
| 110 | + # run: $HOME/.cargo/bin/cargo xtask run-tests --chip ${{ matrix.board.mcu }} -t 90 flash |
111 | 111 |
|
112 |
| - - name: monitor test |
113 |
| - run: cargo xtask run-tests --chip ${{ matrix.board.mcu }} -t 20 monitor |
| 112 | + # - name: monitor test |
| 113 | + # run: $HOME/.cargo/bin/cargo xtask run-tests --chip ${{ matrix.board.mcu }} -t 20 monitor |
114 | 114 |
|
115 |
| - - name: erase-flash test |
116 |
| - run: cargo xtask run-tests --chip ${{ matrix.board.mcu }} -t 60 erase-flash |
| 115 | + # - name: erase-flash test |
| 116 | + # run: $HOME/.cargo/bin/cargo xtask run-tests --chip ${{ matrix.board.mcu }} -t 60 erase-flash |
117 | 117 |
|
118 |
| - - name: save-image/write-bin test |
119 |
| - run: | |
120 |
| - cargo xtask run-tests --chip ${{ matrix.board.mcu }} -t 60 save-image_write-bin |
| 118 | + # - name: save-image/write-bin test |
| 119 | + # run: |
| 120 | + # $HOME/.cargo/bin/cargo xtask run-tests --chip ${{ matrix.board.mcu }} -t 60 save-image_write-bin |
121 | 121 |
|
122 |
| - - name: erase-region test |
123 |
| - run: cargo xtask run-tests --chip ${{ matrix.board.mcu }} -t 60 erase-region |
| 122 | + # - name: erase-region test |
| 123 | + # run: $HOME/.cargo/bin/cargo xtask run-tests --chip ${{ matrix.board.mcu }} -t 60 erase-region |
124 | 124 |
|
125 |
| - - name: hold-in-reset test |
126 |
| - run: cargo xtask run-tests --chip ${{ matrix.board.mcu }} -t 10 hold-in-reset |
| 125 | + # - name: hold-in-reset test |
| 126 | + # run: $HOME/.cargo/bin/cargo xtask run-tests --chip ${{ matrix.board.mcu }} -t 10 hold-in-reset |
127 | 127 |
|
128 |
| - - name: reset test |
129 |
| - run: cargo xtask run-tests --chip ${{ matrix.board.mcu }} -t 10 reset |
| 128 | + # - name: reset test |
| 129 | + # run: $HOME/.cargo/bin/cargo xtask run-tests --chip ${{ matrix.board.mcu }} -t 10 reset |
130 | 130 |
|
131 |
| - - name: checksum-md5 test |
132 |
| - run: cargo xtask run-tests --chip ${{ matrix.board.mcu }} -t 10 checksum-md5 |
| 131 | + # - name: checksum-md5 test |
| 132 | + # run: $HOME/.cargo/bin/cargo xtask run-tests --chip ${{ matrix.board.mcu }} -t 10 checksum-md5 |
133 | 133 |
|
134 |
| - - name: list-ports test |
135 |
| - run: cargo xtask run-tests --chip ${{ matrix.board.mcu }} -t 10 list-ports |
| 134 | + # - name: list-ports test |
| 135 | + # run: $HOME/.cargo/bin/cargo xtask run-tests --chip ${{ matrix.board.mcu }} -t 10 list-ports |
136 | 136 |
|
137 |
| - - name: write-bin test |
138 |
| - run: cargo xtask run-tests --chip ${{ matrix.board.mcu }} -t 30 write-bin |
| 137 | + # - name: write-bin test |
| 138 | + # run: $HOME/.cargo/bin/cargo xtask run-tests --chip ${{ matrix.board.mcu }} -t 30 write-bin |
139 | 139 |
|
140 |
| - - name: read-flash test |
141 |
| - run: cargo xtask run-tests --chip ${{ matrix.board.mcu }} -t 60 read-flash |
| 140 | + # - name: read-flash test |
| 141 | + # run: $HOME/.cargo/bin/cargo xtask run-tests --chip ${{ matrix.board.mcu }} -t 60 read-flash |
0 commit comments