refactor: Replace Arduino HTTP Client with esp native #1714
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
| on: | |
| push: | |
| branches: | |
| - master | |
| - beta | |
| - develop | |
| tags: | |
| - '[0-9]+.[0-9]+.[0-9]+' | |
| - '[0-9]+.[0-9]+.[0-9]+-*' | |
| pull_request: | |
| branches: | |
| - master | |
| - beta | |
| - develop | |
| types: [opened, reopened, synchronize] | |
| workflow_dispatch: # Manually invoked by user. | |
| name: ci-build | |
| env: | |
| PNPM_VERSION: 10.6.4 | |
| NODE_VERSION: 22.14.0 | |
| PYTHON_VERSION: 3.12 | |
| jobs: | |
| getvars: | |
| uses: ./.github/workflows/get-vars.yml | |
| build-frontend: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| sparse-checkout: | | |
| .github | |
| frontend | |
| - uses: ./.github/actions/build-frontend | |
| with: | |
| pnpm-version: ${{ env.PNPM_VERSION }} | |
| node-version: ${{ env.NODE_VERSION }} | |
| build-staticfs: | |
| runs-on: ubuntu-latest | |
| needs: [getvars, build-frontend] | |
| timeout-minutes: 5 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ./.github/actions/build-staticfs | |
| with: | |
| version: ${{ needs.getvars.outputs.version }} | |
| skip-checkout: true | |
| build-firmware: | |
| runs-on: ubuntu-latest | |
| needs: [getvars] | |
| timeout-minutes: 10 | |
| strategy: | |
| fail-fast: false | |
| matrix: ${{ fromJSON(needs.getvars.outputs.board-matrix) }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ./.github/actions/build-firmware | |
| with: | |
| board: ${{ matrix.board }} | |
| version: ${{ needs.getvars.outputs.version }} | |
| skip-checkout: true | |
| merge-partitions: | |
| runs-on: ubuntu-latest | |
| needs: [getvars, build-staticfs, build-firmware] | |
| timeout-minutes: 5 | |
| strategy: | |
| fail-fast: false | |
| matrix: ${{ fromJSON(needs.getvars.outputs.board-matrix) }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| sparse-checkout: | | |
| .github | |
| scripts | |
| boards | |
| chips | |
| - uses: ./.github/actions/merge-partitions | |
| with: | |
| version: ${{ needs.getvars.outputs.version }} | |
| board: ${{ matrix.board }} | |
| skip-checkout: true | |
| checkpoint-build: | |
| runs-on: ubuntu-latest | |
| needs: [merge-partitions] | |
| timeout-minutes: 1 | |
| steps: | |
| - run: echo "Builds checkpoint reached" | |
| cdn-upload-firmware: | |
| runs-on: ubuntu-latest | |
| needs: [getvars, checkpoint-build] | |
| timeout-minutes: 15 | |
| if: ${{ needs.getvars.outputs.should-deploy == 'true' }} | |
| environment: cdn-firmware-r2 | |
| strategy: | |
| fail-fast: true | |
| matrix: ${{ fromJson(needs.getvars.outputs.board-matrix) }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| sparse-checkout: | | |
| .github | |
| # Set up rclone for CDN uploads. | |
| - uses: ./.github/actions/cdn-prepare | |
| with: | |
| bunny-ssh-knownhosts: ${{ vars.BUNNY_SSH_KNOWNHOSTS }} | |
| # Upload firmware to CDN. | |
| - uses: ./.github/actions/cdn-upload-firmware | |
| with: | |
| bunny-stor-hostname: ${{ vars.BUNNY_STOR_HOSTNAME }} | |
| bunny-stor-username: ${{ secrets.BUNNY_STOR_USERNAME }} | |
| bunny-stor-password: ${{ secrets.BUNNY_STOR_PASSWORD }} | |
| fw-version: ${{ needs.getvars.outputs.version }} | |
| board: ${{ matrix.board }} | |
| cdn-upload-version-info: | |
| runs-on: ubuntu-latest | |
| needs: [getvars, checkpoint-build] | |
| timeout-minutes: 10 | |
| if: ${{ needs.getvars.outputs.should-deploy == 'true' }} | |
| environment: cdn-firmware-r2 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| sparse-checkout: | | |
| .github | |
| # Set up rclone for CDN uploads. | |
| - uses: ./.github/actions/cdn-prepare | |
| with: | |
| bunny-ssh-knownhosts: ${{ vars.BUNNY_SSH_KNOWNHOSTS }} | |
| # Upload firmware to CDN. | |
| - uses: ./.github/actions/cdn-upload-version-info | |
| with: | |
| bunny-stor-hostname: ${{ vars.BUNNY_STOR_HOSTNAME }} | |
| bunny-stor-username: ${{ secrets.BUNNY_STOR_USERNAME }} | |
| bunny-stor-password: ${{ secrets.BUNNY_STOR_PASSWORD }} | |
| fw-version: ${{ needs.getvars.outputs.version }} | |
| release-channel: ${{ needs.getvars.outputs.release-channel }} | |
| boards: ${{ needs.getvars.outputs.board-list }} | |
| cdn-bump-version: | |
| runs-on: ubuntu-latest | |
| needs: [getvars, cdn-upload-firmware] # only after version is complete | |
| timeout-minutes: 5 | |
| environment: cdn-firmware-r2 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| sparse-checkout: | | |
| .github | |
| # Set up rclone for CDN uploads. | |
| - uses: ./.github/actions/cdn-prepare | |
| with: | |
| bunny-ssh-knownhosts: ${{ vars.BUNNY_SSH_KNOWNHOSTS }} | |
| # Upload firmware to CDN. | |
| - uses: ./.github/actions/cdn-bump-version | |
| with: | |
| bunny-stor-hostname: ${{ vars.BUNNY_STOR_HOSTNAME }} | |
| bunny-stor-username: ${{ secrets.BUNNY_STOR_USERNAME }} | |
| bunny-stor-password: ${{ secrets.BUNNY_STOR_PASSWORD }} | |
| bunny-api-key: ${{ secrets.BUNNY_APIKEY }} | |
| bunny-cdn-url: ${{ vars.BUNNY_CDN_URL }} | |
| version: ${{ needs.getvars.outputs.version }} | |
| release-channel: ${{ needs.getvars.outputs.release-channel }} | |
| checkpoint-cdn: | |
| runs-on: ubuntu-latest | |
| needs: [cdn-upload-firmware, cdn-upload-version-info, cdn-bump-version] | |
| timeout-minutes: 1 | |
| steps: | |
| - run: echo "CDN checkpoint reached" | |
| release: | |
| runs-on: ubuntu-latest | |
| needs: [getvars, checkpoint-cdn] | |
| timeout-minutes: 1 | |
| if: (needs.getvars.outputs.release-channel == 'stable' || needs.getvars.outputs.release-channel == 'beta') | |
| steps: | |
| - name: Download release artifacts | |
| uses: actions/download-artifact@v7 | |
| - name: Display artifacts | |
| run: ls -R | |
| - name: Release | |
| uses: ncipollo/release-action@v1 | |
| with: | |
| artifacts: '**/OpenShock_*.bin' | |
| tag: ${{ needs.getvars.outputs.version }} | |
| prerelease: ${{ needs.getvars.outputs.release-channel != 'stable' }} | |
| artifactErrorsFailBuild: true | |
| body: ${{ needs.getvars.outputs.release-notes }} |