Sync with upstream #24
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
repository_dispatch: | |
push: | |
pull_request: | |
branches: [ master ] | |
release: | |
types: | |
- created | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- 'release' | |
- 'debug' | |
steps: | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Pull ESP-IDF docker | |
run: docker pull espressif/idf:v3.3.1 | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Checkout submodules | |
run: git submodule update --init --depth 1 certificates | |
- name: Build | |
if: matrix.config == 'release' | |
run: docker run --rm -v $PWD:/project -w /project espressif/idf:v3.3.1 make firmware | |
- name: Build for Debug | |
if: matrix.config == 'debug' | |
run: | | |
docker run --rm -v $PWD:/project -w /project espressif/idf:v3.3.1 make NINA_DEBUG=1 firmware | |
mv NINA_W102*.bin "$(echo NINA_W102*.bin | sed 's/.bin/_debug.bin/')" | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: NINA_W102-${{ matrix.config }}-${{ github.sha }} | |
path: | | |
NINA_W102*.bin | |
- name: Upload Release Asset | |
uses: softprops/action-gh-release@v1 | |
if: github.event_name == 'release' && matrix.config == 'release' | |
with: | |
files: | | |
NINA_W102*.bin |