From 42b9a54a4530760318a7a69fb2e3e897400fa652 Mon Sep 17 00:00:00 2001 From: Sebastien Date: Fri, 16 Oct 2020 11:06:43 -0400 Subject: [PATCH] Add more targets to the GitHub workflows --- .github/workflows/ESP32-A1S.yml | 37 ++++++++++++++++++++++++++++++ .github/workflows/I2S-4MBFlash.yml | 19 ++++++++++----- .github/workflows/SqueezeAmp.yml | 36 +++++++++++++++++++++++++++++ README.md | 2 ++ 4 files changed, 88 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/ESP32-A1S.yml create mode 100644 .github/workflows/SqueezeAmp.yml diff --git a/.github/workflows/ESP32-A1S.yml b/.github/workflows/ESP32-A1S.yml new file mode 100644 index 00000000..2906dd30 --- /dev/null +++ b/.github/workflows/ESP32-A1S.yml @@ -0,0 +1,37 @@ +# This is a basic workflow to help you get started with Actions + +name: ESP32-A1S + +on: + push: + branches: [ master-cmake ] + pull_request: + branches: [ master-cmake ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Set target + run: echo '::set-output name=TARGET_BUILD_NAME::ESP32-A1S' + id: target-name-generator + - name: Get color + run: echo "Target is ${{steps.target-name-generator.outputs.TARGET_BUILD_NAME}}" + + - uses: actions/checkout@v2 + with: + submodules: true + - name: Generate build number + id: buildnumber + uses: einaregilsson/build-number@v2 + with: + token: ${{secrets.github_token}} + - name: Cache build + id: cache-build + uses: actions/cache@v1 + with: + path: ${{github.workspace}}/build + key: ${{ runner.os }}-${{ steps.target-name-generator.outputs.TARGET_BUILD_NAME}} + - name: Build the firmware + run: | + docker run --rm -v $PWD:/project -w /project espressif/idf:release-v4.0 /bin/bash -c "cp build-scripts/${{ steps.target-name-generator.outputs.TARGET_BUILD_NAME}}-sdkconfig.defaults sdkconfig && export PROJECT_VER=${{ steps.target-name-generator.outputs.TARGET_BUILD_NAME}}-${{ steps.buildnumber.outputs.build_number }} && idf.py build" \ No newline at end of file diff --git a/.github/workflows/I2S-4MBFlash.yml b/.github/workflows/I2S-4MBFlash.yml index 27493461..17f63dab 100644 --- a/.github/workflows/I2S-4MBFlash.yml +++ b/.github/workflows/I2S-4MBFlash.yml @@ -2,8 +2,6 @@ name: I2S-4MBFlash -# Controls when the action will run. Triggers the workflow on push or pull request -# events but only for the master branch on: push: branches: [ master-cmake ] @@ -14,17 +12,26 @@ jobs: build: runs-on: ubuntu-latest steps: + - name: Set target + run: echo '::set-output name=TARGET_BUILD_NAME::I2S-4MBFlash' + id: target-name-generator + - name: Get color + run: echo "Target is ${{steps.target-name-generator.outputs.TARGET_BUILD_NAME}}" + - uses: actions/checkout@v2 with: submodules: true + - name: Generate build number + id: buildnumber + uses: einaregilsson/build-number@v2 + with: + token: ${{secrets.github_token}} - name: Cache build id: cache-build uses: actions/cache@v1 with: path: ${{github.workspace}}/build - key: ${{ runner.os }}-I2S-4MBFlash + key: ${{ runner.os }}-${{ steps.target-name-generator.outputs.TARGET_BUILD_NAME}} - name: Build the firmware run: | - docker run --rm -v $PWD:/project -w /project espressif/idf:release-v4.0 /bin/bash -c "python3 -m pip install --upgrade pip setuptools wheel && pip3 install protobuf grpcio-tools && cp build-scripts/I2S-4MFlash-sdkconfig.defaults sdkconfig && idf.py build" - - + docker run --rm -v $PWD:/project -w /project espressif/idf:release-v4.0 /bin/bash -c "cp build-scripts/${{ steps.target-name-generator.outputs.TARGET_BUILD_NAME}}-sdkconfig.defaults sdkconfig && export PROJECT_VER=${{ steps.target-name-generator.outputs.TARGET_BUILD_NAME}}-${{ steps.buildnumber.outputs.build_number }} && idf.py build" \ No newline at end of file diff --git a/.github/workflows/SqueezeAmp.yml b/.github/workflows/SqueezeAmp.yml new file mode 100644 index 00000000..aea3902f --- /dev/null +++ b/.github/workflows/SqueezeAmp.yml @@ -0,0 +1,36 @@ +# This is a basic workflow to help you get started with Actions + +name: SqueezeAmp + +on: + push: + branches: [ master-cmake ] + pull_request: + branches: [ master-cmake ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Set target + run: echo '::set-output name=TARGET_BUILD_NAME::SqueezeAmp' + id: target-name-generator + - name: Get color + run: echo "Target is ${{steps.target-name-generator.outputs.TARGET_BUILD_NAME}}" + - uses: actions/checkout@v2 + with: + submodules: true + - name: Generate build number + id: buildnumber + uses: einaregilsson/build-number@v2 + with: + token: ${{secrets.github_token}} + - name: Cache build + id: cache-build + uses: actions/cache@v1 + with: + path: ${{github.workspace}}/build + key: ${{ runner.os }}-${{ steps.target-name-generator.outputs.TARGET_BUILD_NAME}} + - name: Build the firmware + run: | + docker run --rm -v $PWD:/project -w /project espressif/idf:release-v4.0 /bin/bash -c "cp build-scripts/${{ steps.target-name-generator.outputs.TARGET_BUILD_NAME}}-sdkconfig.defaults sdkconfig && export PROJECT_VER=${{ steps.target-name-generator.outputs.TARGET_BUILD_NAME}}-${{ steps.buildnumber.outputs.build_number }} && idf.py build" \ No newline at end of file diff --git a/README.md b/README.md index 5c6ad2bb..a23fc546 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ ![I2S-4MFlash-master-cmake](https://github.com/sle118/squeezelite-esp32/workflows/I2S-4MBFlash/badge.svg?branch=master-cmake) +![I2S-4MFlash-master-cmake](https://github.com/sle118/squeezelite-esp32/workflows/ESP32-A1S/badge.svg?branch=master-cmake) +![I2S-4MFlash-master-cmake](https://github.com/sle118/squeezelite-esp32/workflows/SqueezeAmp/badge.svg?branch=master-cmake) # Squeezelite-esp32 ## Supported Hardware