From 0d207f4878a1e4fd2ed395d04535358b3902a274 Mon Sep 17 00:00:00 2001 From: graham sanderson Date: Sun, 29 Jan 2023 17:05:05 -0600 Subject: [PATCH] Add new github workflows --- .github/workflows/macOS.yml | 45 +++++++++++++++++++++++++++++++++ .github/workflows/multi-gcc.yml | 12 ++++++++- .github/workflows/windows.yml | 14 +++++++++- 3 files changed, 69 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/macOS.yml diff --git a/.github/workflows/macOS.yml b/.github/workflows/macOS.yml new file mode 100644 index 00000000..dcef4a3c --- /dev/null +++ b/.github/workflows/macOS.yml @@ -0,0 +1,45 @@ +name: Build on macOS +on: + workflow_dispatch: + push: + branches: + - 'develop' + - 'master' + - 'test_workflow' + +jobs: + build: + runs-on: macos-12 + steps: + - name: Clean workspace + run: | + echo "Cleaning up previous run" + rm -rf "${{ github.workspace }}" + mkdir -p "${{ github.workspace }}" + - name: Checkout repo + uses: actions/checkout@v3 + - name: Checkout submodules + run: git submodule update --init + - name: Install dependencies + run: | + brew install cmake + brew tap ArmMbed/homebrew-formulae + brew install arm-none-eabi-gcc + + - name: Build Project + # bash required otherwise this mysteriously (no error) fails at "Generating cyw43_bus_pio_spi.pio.h" + shell: bash + run: | + mkdir build + cd build + cmake .. -G "Unix Makefiles" -DPICO_SDK_TESTS_ENABLED=1 -DCMAKE_BUILD_TYPE=Debug -DPICO_BOARD=pico_w + cmake --build . + + - name: Build Native + # bash required otherwise this mysteriously (no error) fails at "Generating cyw43_bus_pio_spi.pio.h" + shell: bash + run: | + mkdir build_native + cd build_native + cmake .. -G "Unix Makefiles" -DPICO_SDK_TESTS_ENABLED=1 -DCMAKE_BUILD_TYPE=Debug -DPICO_PLATFORM=host + cmake --build . diff --git a/.github/workflows/multi-gcc.yml b/.github/workflows/multi-gcc.yml index d5d74791..19245eb6 100644 --- a/.github/workflows/multi-gcc.yml +++ b/.github/workflows/multi-gcc.yml @@ -3,8 +3,8 @@ on: workflow_dispatch: push: branches: - - 'develop' - 'master' + - 'test_workflow' jobs: build: @@ -157,3 +157,13 @@ jobs: if: always() shell: bash run: cd ${{github.workspace}}; mkdir -p build; rm -rf build/*; cd build; cmake ../ -DPICO_SDK_TESTS_ENABLED=1 -DCMAKE_BUILD_TYPE=Release -DPICO_TOOLCHAIN_PATH=/opt/arm/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi -DPICO_BOARD=pico_w; make -j ${{steps.core_count.outputs.output}} + + - name: Native Debug + if: always() + shell: bash + run: cd ${{github.workspace}}; mkdir -p build; rm -rf build/*; cd build; cmake ../ -DPICO_SDK_TESTS_ENABLED=1 -DCMAKE_BUILD_TYPE=Debug -DPICO_PLATFORM=host; make -j ${{steps.core_count.outputs.output}} + + - name: Native Release + if: always() + shell: bash + run: cd ${{github.workspace}}; mkdir -p build; rm -rf build/*; cd build; cmake ../ -DPICO_SDK_TESTS_ENABLED=1 -DCMAKE_BUILD_TYPE=Release -DPICO_PLATFORM=host; make -j ${{steps.core_count.outputs.output}} diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 3e6cd6ac..8ed2a033 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -1,9 +1,21 @@ name: Build on Windows -on: workflow_dispatch +on: + workflow_dispatch: + push: + branches: + - 'develop' + - 'master' + - 'test_workflow' + jobs: build: runs-on: windows-2022 steps: + - name: Clean workspace + shell: bash + run: | + echo "Cleaning up previous run" + rm -rf "${{ github.workspace }}/pico-sdk" - name: Checkout repo uses: actions/checkout@v3 - name: Checkout submodules