Update BuildTest.yml [skip actions]

This commit is contained in:
Sébastien
2022-10-06 11:36:08 -04:00
committed by GitHub
parent 58e74fc43c
commit 2af9386786

View File

@@ -1,3 +1,4 @@
# This is a basic workflow to help you get started with Actions
name: Manually executable test for ESP-IDF v4.3.1
on:
workflow_dispatch:
@@ -10,10 +11,14 @@ on:
description: 'Release'
required: true
type: boolean
# push:
# branches:
# - '**4.3'
jobs:
bootstrap:
name: Preparation
name: Global setup
runs-on: ubuntu-latest
container:
image: sle118/squeezelite-esp32-idfv43
outputs:
@@ -22,9 +27,15 @@ jobs:
release_flag: ${{ steps.build_flags.outputs.release_flag }}
mock: ${{ steps.build_flags.outputs.mock }}
steps:
- name: Set Build options from workflow dispatch event
run: |
ui_build_option="" && [[ ${{ inputs.ui_build }} ]] && ui_build_option="--ui_build"
release_build_option="" && [[ ${{ inputs.release_build }} ]] && release_build_option="--force"
echo "ui_build_option=$ui_build_option" >> $GITHUB_ENV
echo "release_build_option=$release_build_option" >> $GITHUB_ENV
- uses: actions/checkout@v2
with:
fetch-depth: 15
fetch-depth: 0
submodules: true
- name: Generate common build number
id: buildnumber
@@ -34,16 +45,19 @@ jobs:
- name: Set build flags
id: build_flags
run: |
git config --global --add safe.directory /__w/squeezelite-esp32/squeezelite-esp32
echo "Dumping environment"
env
. /opt/esp/python_env/idf4.3_py3.8_env/bin/activate
# build_flags support the following options
# --mock - to mock the compilation part - this is to be used for testing only
# --force - to force a release build even if the last commit message doesn't contain the word "release"
# --ui_build - to force a ui_build even if the last commit message doesn't contain "[ui-build]"
build_tools.py build_flags --ui_build
build_tools.py build_flags ${{ env.ui_build_option }} ${{ env.release_build_option }}
preparation:
name: Preparation
needs: bootstrap
runs-on: ubuntu-latest
container:
image: sle118/squeezelite-esp32-idfv43
steps:
@@ -53,14 +67,11 @@ jobs:
echo "Web Build Flag=${{needs.bootstrap.outputs.ui_build}}"
echo "Mock flag=${{needs.bootstrap.outputs.mock}}"
echo "Release Flag=${{needs.bootstrap.outputs.release_flag}}"
git config --global --add safe.directory /__w/squeezelite-esp32/squeezelite-esp32
- uses: actions/checkout@v2
with:
fetch-depth: 15
fetch-depth: 0
submodules: true
- name: Pull latest
run: |
git pull
git submodule update
- name: Refresh certificates
run: |
git update-index --chmod=+x ./server_certs/getcert.sh
@@ -81,7 +92,6 @@ jobs:
- name: Update repository with prebuilt items
if: ${{ needs.bootstrap.outputs.ui_build == 1 || needs.bootstrap.outputs.release_flag == 1 }}
run: |
git fetch
git config user.name github-actions
git config user.email github-actions@github.com
git add server_certs
@@ -102,16 +112,14 @@ jobs:
components/wifi-manager/webapp/dist/*
components/wifi-manager/webapp/*.cmake
build:
runs-on: ubuntu-latest
container:
image: sle118/squeezelite-esp32-idfv43
needs: [preparation,bootstrap]
strategy:
max-parallel: 3
matrix:
#node: [I2S-4MFlash, SqueezeAmp, Muse]
#depth: [16, 32]
node: [I2S-4MFlash]
depth: [16]
node: [I2S-4MFlash, SqueezeAmp, Muse]
depth: [16, 32]
exclude:
- node: Muse
depth: 32
@@ -120,7 +128,7 @@ jobs:
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 15
fetch-depth: 0
submodules: true
- name: Show Build Flags
run: |
@@ -132,6 +140,8 @@ jobs:
- name: Set build parameters
run: |
. /opt/esp/python_env/idf4.3_py3.8_env/bin/activate
git config --global --add safe.directory /__w/squeezelite-esp32/squeezelite-esp32
git status
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
- uses: actions/download-artifact@master
@@ -240,12 +250,13 @@ jobs:
name: Web Installer
if: ${{ needs.bootstrap.outputs.release_flag == 1 && needs.bootstrap.outputs.mock == 0 }}
needs: [build, preparation,bootstrap]
runs-on: ubuntu-latest
container:
image: sle118/squeezelite-esp32-idfv43
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 15
fetch-depth: 0
submodules: true
- uses: actions/download-artifact@master
name: Restore last build