14
14
15
15
jobs :
16
16
esp-idf :
17
+ name : ${{ matrix.board }}_${{ matrix.esp-idf.name }}_${{ github.event.inputs.toolchain-version }} tag
17
18
runs-on : ubuntu-latest
18
19
strategy :
19
20
fail-fast : false
20
21
matrix :
21
22
board : ["esp32", "esp32s2", "esp32s3", "esp32c3", "all"]
22
- # esp-idf: ["master", "v4.4"]
23
- # Use only v4.4 as master is failing due to: https://github.com/esp-rs/esp-idf-sys/issues/99
24
- esp-idf : ["v4.4"]
23
+ esp-idf :
24
+ - name : v4.4
25
+ branch : release/v4.4
26
+ template-name : v4.4
27
+ # - name: master
28
+ # branch: master
29
+ # template-name: mainline
25
30
steps :
26
31
- name : Checkout
27
32
uses : actions/checkout@v2
28
- - name : Build Docker image (master)
29
- if : matrix.esp-idf == 'master' && matrix.board != 'all'
30
- run : |
31
- docker image build --tag idf-rust:${{ matrix.board }}_${{ matrix.esp-idf }}_${{ github.event.inputs.toolchain-version }} \
32
- --file idf-rust.Containerfile --build-arg XTENSA_TOOLCHAIN_VERSION=${{ github.event.inputs.toolchain-version }} \
33
- --build-arg ESP_IDF_VERSION=${{ matrix.esp-idf }} --build-arg ESP_BOARD=${{ matrix.board }} .
34
- - name : Build Docker image (v4.4)
35
- if : matrix.esp-idf == 'v4.4' && matrix.board != 'all'
33
+ - name : Build Docker image
34
+ if : matrix.board != 'all'
36
35
run : |
37
- docker image build --tag idf-rust:${{ matrix.board }}_${{ matrix.esp-idf }}_${{ github.event.inputs.toolchain-version }} \
36
+ docker image build --tag idf-rust:${{ matrix.board }}_${{ matrix.esp-idf.name }}_${{ github.event.inputs.toolchain-version }} \
38
37
--file idf-rust.Containerfile --build-arg XTENSA_TOOLCHAIN_VERSION=${{ github.event.inputs.toolchain-version }} \
39
- --build-arg ESP_IDF_VERSION=release/v4.4 --build-arg ESP_BOARD=${{ matrix.board }} .
40
- - name : Build template project using generated tag (master)
41
- if : matrix.esp-idf == 'master' && matrix. board != 'all'
38
+ --build-arg ESP_IDF_VERSION=${{ matrix.esp-idf.branch }} --build-arg ESP_BOARD=${{ matrix.board }} .
39
+ - name : Build template project using generated tag
40
+ if : matrix.board != 'all'
42
41
run : |
43
42
docker run --user esp --mount type=bind,source="$(pwd)/build-template-project.sh",target=/workspace/build-template-project.sh,consistency=cached \
44
- --rm idf-rust:${{ matrix.board }}_${{ matrix.esp-idf }}_${{ github.event.inputs.toolchain-version }} /bin/bash /workspace/build-template-project.sh esp-idf-template ${{ matrix.board }} mainline
45
- - name : Build template project using generated tag (v4.4)
46
- if : matrix.esp-idf == 'v4.4' && matrix.board != 'all'
47
- run : |
48
- docker run --mount type=bind,source="$(pwd)/build-template-project.sh",target=/workspace/build-template-project.sh,consistency=cached \
49
- --rm idf-rust:${{ matrix.board }}_${{ matrix.esp-idf }}_${{ github.event.inputs.toolchain-version }} /bin/bash /workspace/build-template-project.sh esp-idf-template ${{ matrix.board }} ${{ matrix.esp-idf }}
43
+ --rm idf-rust:${{ matrix.board }}_${{ matrix.esp-idf.name }}_${{ github.event.inputs.toolchain-version }} /bin/bash /workspace/build-template-project.sh esp-idf-template ${{ matrix.board }} ${{ matrix.esp-idf.template-name }}
50
44
- name : Set up QEMU
51
45
uses : docker/setup-qemu-action@v1
52
46
- name : Set up Docker Buildx
@@ -56,33 +50,20 @@ jobs:
56
50
with :
57
51
username : ${{ secrets.DOCKER_USERNAME }}
58
52
password : ${{ secrets.DOCKER_TOKEN }}
59
- - name : Build - ${{ matrix.board }}_${{ matrix.esp-idf }}_${{ github.event.inputs.toolchain-version }} tag (v4.4)
60
- uses : docker/build-push-action@v2
61
- if : matrix.esp-idf == 'v4.4'
62
- with :
63
- context : .
64
- file : idf-rust.Containerfile
65
- build-args : |
66
- XTENSA_TOOLCHAIN_VERSION=${{ github.event.inputs.toolchain-version }}
67
- ESP_IDF_VERSION=release/v4.4
68
- ESP_BOARD=${{ matrix.board }}
69
- tags : espressif/idf-rust:${{ matrix.board }}_${{ matrix.esp-idf }}_${{ github.event.inputs.toolchain-version }}
70
- push : true
71
- platforms : linux/amd64, linux/arm64
72
- - name : Build - ${{ matrix.board }}_${{ matrix.esp-idf }}_${{ github.event.inputs.toolchain-version }} tag (mater)
53
+ - name : Build and publish tag
73
54
uses : docker/build-push-action@v2
74
- if : matrix.esp-idf == 'master'
75
55
with :
76
56
context : .
77
57
file : idf-rust.Containerfile
78
58
build-args : |
79
59
XTENSA_TOOLCHAIN_VERSION=${{ github.event.inputs.toolchain-version }}
80
- ESP_IDF_VERSION=${{ matrix.esp-idf }}
60
+ ESP_IDF_VERSION=${{ matrix.esp-idf.branch }}
81
61
ESP_BOARD=${{ matrix.board }}
82
- tags : espressif/idf-rust:${{ matrix.board }}_${{ matrix.esp-idf }}_${{ github.event.inputs.toolchain-version }}
62
+ tags : espressif/idf-rust:${{ matrix.board }}_${{ matrix.esp-idf.name }}_${{ github.event.inputs.toolchain-version }},espressif/idf-rust:${{ matrix.board }}_${{ matrix.esp-idf.name }}_latest
83
63
push : true
84
64
platforms : linux/amd64, linux/arm64
85
65
bare-metal :
66
+ name : ${{ matrix.board }}_${{ github.event.inputs.toolchain-version }} tag
86
67
runs-on : ubuntu-latest
87
68
strategy :
88
69
fail-fast : false
@@ -119,6 +100,6 @@ jobs:
119
100
build-args : |
120
101
XTENSA_TOOLCHAIN_VERSION=${{ github.event.inputs.toolchain-version }}
121
102
ESP_BOARD=${{ matrix.board }}
122
- tags : espressif/idf-rust:${{ matrix.board }}_${{ github.event.inputs.toolchain-version }}
103
+ tags : espressif/idf-rust:${{ matrix.board }}_${{ github.event.inputs.toolchain-version }},espressif/idf-rust:${{ matrix.board }}_latest
123
104
push : true
124
105
platforms : linux/amd64, linux/arm64
0 commit comments