Add new github workflows

This commit is contained in:
graham sanderson 2023-01-29 17:05:05 -06:00
parent d07abf3ac0
commit 0d207f4878
3 changed files with 69 additions and 2 deletions

45
.github/workflows/macOS.yml vendored Normal file
View File

@ -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 .

View File

@ -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}}

View File

@ -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