[ImgBot] Optimize images (#1673) #4602
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: CMake | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| branches: ["main"] | |
| # pull_request_target: | |
| # branches: [ "main" ] | |
| workflow_dispatch: | |
| inputs: | |
| board_config: | |
| description: "Board configuration to build (leave empty to build all)" | |
| required: false | |
| type: choice | |
| options: | |
| - "" | |
| - ARCController | |
| - ASiLVLABC | |
| - ASiLVLWASD | |
| - Blank | |
| - Pico | |
| - PicoW | |
| - Pico2 | |
| - BentoBox | |
| - FlatboxRev4 | |
| - FlatboxRev5 | |
| - FlatboxRev5RGB | |
| - FlatboxRev5USBPassthrough | |
| - FlatboxRev5Southpaw | |
| - FlatboxRev8 | |
| - Granola | |
| - GranolaBeacon | |
| - KB2040 | |
| - KeyboardConverter | |
| - Haute42COSMOX | |
| - Haute42COSMOXCAS | |
| - Haute42COSMOXCAT | |
| - Haute42COSMOXMLite | |
| - Haute42COSMOXMUltra | |
| - Haute42COSMOXXAnalog | |
| - Liatris | |
| - MavercadeRev1 | |
| - MavercadeRev2 | |
| - MavercadeRev3 | |
| - MiSTercadeV2 | |
| - OpenCore0 | |
| - OpenCore0MIXUP | |
| - OpenCore0WASD | |
| - OSUMGP-RP2040 | |
| - PicoAnn | |
| - PicoFightingBoard | |
| - PXPGamepad | |
| - ReflexCtrlGenesis6 | |
| - ReflexCtrlNES | |
| - ReflexCtrlSaturn | |
| - ReflexCtrlSNES | |
| - ReflexCtrlVB | |
| - ReflexEncodeV1.2 | |
| - ReflexEncodeV2.0 | |
| - RP2040AdvancedBreakoutBoard | |
| - RP2040AdvancedBreakoutBoardUSBPassthrough | |
| - RP2040MiniBreakoutBoard | |
| - RP2040MiniBreakoutBoardUSBPassthrough | |
| - SeeedXIAORP2040 | |
| - SparkFunProMicro | |
| - SparkFunProMicroRP2350 | |
| - WaveshareZero | |
| - Stress | |
| - SGFDevices | |
| - ZeroRhythm | |
| env: | |
| BUILD_TYPE: Release | |
| jobs: | |
| call-node-workflow: | |
| uses: ./.github/workflows/node.js.yml | |
| build: | |
| needs: call-node-workflow | |
| # The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac. | |
| # You can convert this to a matrix build if you need cross-platform coverage. | |
| # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix | |
| runs-on: ubuntu-22.04 | |
| strategy: | |
| matrix: | |
| GP2040_BOARDCONFIG: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.board_config != '' && fromJSON(format('["{0}"]', github.event.inputs.board_config)) || fromJSON('["ARCController", "ASiLVLABC", "ASiLVLWASD", "Blank", "Pico", "PicoW", "Pico2", "BentoBox", "FlatboxRev4", "FlatboxRev5", "FlatboxRev5RGB", "FlatboxRev5USBPassthrough", "FlatboxRev5Southpaw", "FlatboxRev8", "Granola", "GranolaBeacon", "KB2040", "KeyboardConverter", "Haute42COSMOX", "Haute42COSMOXCAS", "Haute42COSMOXCAT", "Haute42COSMOXMLite", "Haute42COSMOXMUltra", "Haute42COSMOXXAnalog", "Liatris", "MavercadeRev1", "MavercadeRev2", "MavercadeRev3", "MiSTercadeV2", "OpenCore0", "OpenCore0MIXUP", "OpenCore0WASD", "OSUMGP-RP2040", "PicoAnn", "PicoFightingBoard", "PXPGamepad", "ReflexCtrlGenesis6", "ReflexCtrlNES", "ReflexCtrlSaturn", "ReflexCtrlSNES", "ReflexCtrlVB", "ReflexEncodeV1.2", "ReflexEncodeV2.0", "RP2040AdvancedBreakoutBoard", "RP2040AdvancedBreakoutBoardUSBPassthrough", "RP2040MiniBreakoutBoard", "RP2040MiniBreakoutBoardUSBPassthrough", "SeeedXIAORP2040", "SparkFunProMicro", "SparkFunProMicroRP2350", "WaveshareZero", "Stress", "SGFDevices", "ZeroRhythm", "AdafruitQTPyRP2040"]') }} | |
| steps: | |
| - name: Setup cmake | |
| uses: jwlawson/actions-setup-cmake@v2 | |
| with: | |
| cmake-version: "3.31.x" | |
| - name: Verify cmake | |
| run: cmake --version | |
| #Global Setup | |
| - name: Checkout GP2040-CE | |
| uses: actions/checkout@v6.0.1 | |
| with: | |
| fetch-depth: 0 | |
| fetch-tags: true | |
| - name: arm-none-eabi-gcc GNU Arm Embedded Toolchain | |
| uses: carlosperate/arm-none-eabi-gcc-action@v1 | |
| - name: Checkout pico-sdk/2.2.0 | |
| uses: actions/checkout@v6.0.1 | |
| with: | |
| repository: raspberrypi/pico-sdk | |
| ref: 2.2.0 | |
| path: pico-sdk | |
| - name: Checkout pico-sdk submodules | |
| working-directory: ${{github.workspace}}/pico-sdk | |
| run: git submodule update --init | |
| - name: Download a Build Artifact | |
| uses: actions/download-artifact@v7.0.0 | |
| with: | |
| name: fsData | |
| path: ${{github.workspace}}/lib/httpd/ | |
| - name: Get core count | |
| id: core_count | |
| run: cat /proc/cpuinfo | grep processor | wc -l | |
| #End Global Setup | |
| - name: Pico Build Configure CMake | |
| shell: bash | |
| run: PICO_SDK_PATH=${{github.workspace}}/pico-sdk GP2040_BOARDCONFIG=${{ matrix.GP2040_BOARDCONFIG }} SKIP_WEBBUILD=TRUE cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} | |
| - name: Pico Build | |
| shell: bash | |
| run: GP2040_BOARDCONFIG=${{ matrix.GP2040_BOARDCONFIG }} cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel ${{steps.core_count.outputs.output}} | |
| - name: Upload Pico Artifact | |
| uses: actions/upload-artifact@v6.0.0 | |
| with: | |
| name: GP2040-CE - ${{ matrix.GP2040_BOARDCONFIG }} | |
| path: ${{github.workspace}}/build/GP2040-CE_*_${{ matrix.GP2040_BOARDCONFIG }}.uf2 | |
| if-no-files-found: error | |
| - name: Upload .elf Artifact | |
| if: ${{ matrix.GP2040_BOARDCONFIG == 'Pico'}} | |
| uses: actions/upload-artifact@v6.0.0 | |
| with: | |
| name: elf | |
| path: ${{github.workspace}}/build/GP2040-CE_*_${{ matrix.GP2040_BOARDCONFIG }}.elf | |
| if-no-files-found: error |