Update release drafter workflow to use GitHub App token for authentication #17
Workflow file for this run
This file contains hidden or 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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| pre-commit: | |
| name: Pre-commit checks | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 | |
| with: | |
| python-version: '3.12' | |
| - uses: esphome/pre-commit-action@43cd1109c09c544d97196f7730ee5b2e0cc6d81e # v3.0.1 fork with pinned actions/cache | |
| lint: | |
| name: Static analysis | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| submodules: false | |
| - name: Initialize library submodules | |
| run: git submodule update --init --depth 1 lib/micro-ogg-demuxer | |
| - name: Install clang-tidy | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y clang-tidy | |
| - name: Run clang-tidy | |
| run: ./script/clang-tidy.sh | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| submodules: false | |
| - name: Initialize library submodules | |
| run: git submodule update --init --depth 1 lib/micro-ogg-demuxer | |
| - name: Configure CMake | |
| run: cmake -B build -DENABLE_SANITIZERS=ON -DENABLE_WERROR=ON host_examples/flac_to_wav | |
| - name: Build | |
| run: cmake --build build | |
| - name: Upload binary | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
| with: | |
| name: flac_to_wav | |
| path: build/flac_to_wav | |
| test: | |
| name: "Test: ${{ matrix.name }}" | |
| runs-on: ubuntu-latest | |
| needs: build | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - name: FLAC decode | |
| args: --mode normal --format flac | |
| - name: FLAC streaming (1 byte) | |
| args: --mode streaming --format flac --chunk-sizes 1 | |
| - name: FLAC streaming (37 bytes) | |
| args: --mode streaming --format flac --chunk-sizes 37 | |
| - name: Ogg FLAC decode | |
| args: --mode normal --format ogg | |
| - name: Ogg FLAC streaming (3 bytes) | |
| args: --mode streaming --format ogg --chunk-sizes 3 | |
| - name: Ogg FLAC streaming (37 bytes) | |
| args: --mode streaming --format ogg --chunk-sizes 37 | |
| - name: 32-bit output | |
| args: --mode 32bit --format flac | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| submodules: false | |
| - name: Download build artifact | |
| uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.2 | |
| with: | |
| name: flac_to_wav | |
| path: build | |
| - name: Make binary executable | |
| run: chmod +x build/flac_to_wav | |
| - name: Get test files latest commit | |
| id: test-files-ref | |
| run: echo "sha=$(git ls-remote https://github.com/ietf-wg-cellar/flac-test-files.git HEAD | cut -f1)" >> "$GITHUB_OUTPUT" | |
| - name: Cache test files | |
| id: cache-test-files | |
| uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 | |
| with: | |
| path: test/flac-test-files | |
| key: flac-test-files-${{ steps.test-files-ref.outputs.sha }} | |
| - name: Clone test files | |
| if: steps.cache-test-files.outputs.cache-hit != 'true' | |
| run: git clone --depth 1 https://github.com/ietf-wg-cellar/flac-test-files.git test/flac-test-files | |
| - name: Install ffmpeg and flac | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y ffmpeg flac | |
| - name: Run tests | |
| run: python3 host_examples/flac_to_wav/test_flac_decoder.py --categories subset --build-dir build ${{ matrix.args }} | |
| platformio: | |
| name: PlatformIO Build | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| include: | |
| - example: decode_benchmark | |
| environments: esp32,esp32s3 | |
| - example: test_lpc_asm | |
| environments: esp32,esp32s3 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| submodules: false | |
| - name: Initialize library submodules | |
| run: git submodule update --init --depth 1 lib/micro-ogg-demuxer | |
| - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 | |
| with: | |
| python-version: '3.12' | |
| - name: Cache PlatformIO | |
| uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 | |
| with: | |
| path: | | |
| ~/.platformio | |
| examples/${{ matrix.example }}/.pio | |
| key: pio-${{ matrix.example }}-${{ hashFiles(format('examples/{0}/platformio.ini', matrix.example)) }} | |
| restore-keys: | | |
| pio-${{ matrix.example }}- | |
| - name: Install PlatformIO | |
| run: pip install platformio | |
| - name: Build ${{ matrix.example }} | |
| run: | | |
| IFS=',' read -ra ENVS <<< "${{ matrix.environments }}" | |
| for env in "${ENVS[@]}"; do | |
| echo "Building environment: $env" | |
| pio run -d examples/${{ matrix.example }} -e "$env" | |
| done |