Skip to content

Commit 2af9386

Browse files
authored
Update BuildTest.yml [skip actions]
1 parent 58e74fc commit 2af9386

File tree

1 file changed

+28
-17
lines changed

1 file changed

+28
-17
lines changed

.github/workflows/BuildTest.yml

Lines changed: 28 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# This is a basic workflow to help you get started with Actions
12
name: Manually executable test for ESP-IDF v4.3.1
23
on:
34
workflow_dispatch:
@@ -10,10 +11,14 @@ on:
1011
description: 'Release'
1112
required: true
1213
type: boolean
14+
# push:
15+
# branches:
16+
# - '**4.3'
1317

1418
jobs:
1519
bootstrap:
16-
name: Preparation
20+
name: Global setup
21+
runs-on: ubuntu-latest
1722
container:
1823
image: sle118/squeezelite-esp32-idfv43
1924
outputs:
@@ -22,9 +27,15 @@ jobs:
2227
release_flag: ${{ steps.build_flags.outputs.release_flag }}
2328
mock: ${{ steps.build_flags.outputs.mock }}
2429
steps:
30+
- name: Set Build options from workflow dispatch event
31+
run: |
32+
ui_build_option="" && [[ ${{ inputs.ui_build }} ]] && ui_build_option="--ui_build"
33+
release_build_option="" && [[ ${{ inputs.release_build }} ]] && release_build_option="--force"
34+
echo "ui_build_option=$ui_build_option" >> $GITHUB_ENV
35+
echo "release_build_option=$release_build_option" >> $GITHUB_ENV
2536
- uses: actions/checkout@v2
2637
with:
27-
fetch-depth: 15
38+
fetch-depth: 0
2839
submodules: true
2940
- name: Generate common build number
3041
id: buildnumber
@@ -34,16 +45,19 @@ jobs:
3445
- name: Set build flags
3546
id: build_flags
3647
run: |
48+
git config --global --add safe.directory /__w/squeezelite-esp32/squeezelite-esp32
49+
echo "Dumping environment"
50+
env
3751
. /opt/esp/python_env/idf4.3_py3.8_env/bin/activate
3852
# build_flags support the following options
3953
# --mock - to mock the compilation part - this is to be used for testing only
4054
# --force - to force a release build even if the last commit message doesn't contain the word "release"
4155
# --ui_build - to force a ui_build even if the last commit message doesn't contain "[ui-build]"
42-
build_tools.py build_flags --ui_build
43-
56+
build_tools.py build_flags ${{ env.ui_build_option }} ${{ env.release_build_option }}
4457
preparation:
4558
name: Preparation
4659
needs: bootstrap
60+
runs-on: ubuntu-latest
4761
container:
4862
image: sle118/squeezelite-esp32-idfv43
4963
steps:
@@ -53,14 +67,11 @@ jobs:
5367
echo "Web Build Flag=${{needs.bootstrap.outputs.ui_build}}"
5468
echo "Mock flag=${{needs.bootstrap.outputs.mock}}"
5569
echo "Release Flag=${{needs.bootstrap.outputs.release_flag}}"
70+
git config --global --add safe.directory /__w/squeezelite-esp32/squeezelite-esp32
5671
- uses: actions/checkout@v2
5772
with:
58-
fetch-depth: 15
73+
fetch-depth: 0
5974
submodules: true
60-
- name: Pull latest
61-
run: |
62-
git pull
63-
git submodule update
6475
- name: Refresh certificates
6576
run: |
6677
git update-index --chmod=+x ./server_certs/getcert.sh
@@ -81,7 +92,6 @@ jobs:
8192
- name: Update repository with prebuilt items
8293
if: ${{ needs.bootstrap.outputs.ui_build == 1 || needs.bootstrap.outputs.release_flag == 1 }}
8394
run: |
84-
git fetch
8595
git config user.name github-actions
8696
git config user.email [email protected]
8797
git add server_certs
@@ -102,16 +112,14 @@ jobs:
102112
components/wifi-manager/webapp/dist/*
103113
components/wifi-manager/webapp/*.cmake
104114
build:
115+
runs-on: ubuntu-latest
105116
container:
106117
image: sle118/squeezelite-esp32-idfv43
107118
needs: [preparation,bootstrap]
108119
strategy:
109-
max-parallel: 3
110120
matrix:
111-
#node: [I2S-4MFlash, SqueezeAmp, Muse]
112-
#depth: [16, 32]
113-
node: [I2S-4MFlash]
114-
depth: [16]
121+
node: [I2S-4MFlash, SqueezeAmp, Muse]
122+
depth: [16, 32]
115123
exclude:
116124
- node: Muse
117125
depth: 32
@@ -120,7 +128,7 @@ jobs:
120128
steps:
121129
- uses: actions/checkout@v2
122130
with:
123-
fetch-depth: 15
131+
fetch-depth: 0
124132
submodules: true
125133
- name: Show Build Flags
126134
run: |
@@ -132,6 +140,8 @@ jobs:
132140
- name: Set build parameters
133141
run: |
134142
. /opt/esp/python_env/idf4.3_py3.8_env/bin/activate
143+
git config --global --add safe.directory /__w/squeezelite-esp32/squeezelite-esp32
144+
git status
135145
build_tools.py environment --build ${{ needs.bootstrap.outputs.build_number }} --env_file "$GITHUB_ENV" --node "${{matrix.node}}" --depth ${{matrix.depth}} --major 2 --docker sle118/squeezelite-esp32-idfv43
136146
137147
- uses: actions/download-artifact@master
@@ -240,12 +250,13 @@ jobs:
240250
name: Web Installer
241251
if: ${{ needs.bootstrap.outputs.release_flag == 1 && needs.bootstrap.outputs.mock == 0 }}
242252
needs: [build, preparation,bootstrap]
253+
runs-on: ubuntu-latest
243254
container:
244255
image: sle118/squeezelite-esp32-idfv43
245256
steps:
246257
- uses: actions/checkout@v2
247258
with:
248-
fetch-depth: 15
259+
fetch-depth: 0
249260
submodules: true
250261
- uses: actions/download-artifact@master
251262
name: Restore last build

0 commit comments

Comments
 (0)