Update workflows #19
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
| # This starter workflow is for a CMake project running on a single platform. There is a different starter workflow if you need cross-platform coverage. | |
| # See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-multi-platform.yml | |
| name: Build Software and create release on tag | |
| on: | |
| push: | |
| branches: | |
| - dev # Trigger on push to 'dev' branch | |
| - main # Trigger on push to 'main' branch | |
| paths: | |
| - '.github/workflows/build_sw.yml' # Trigger if this workflow file changes | |
| - 'Software/**' # Trigger if any file in the 'Software' directory changes | |
| env: | |
| # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | |
| BUILD_TYPE: Debug | |
| jobs: | |
| build: | |
| # 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-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: install build packages | |
| run: sudo apt-get update && sudo apt-get install cmake gcc-arm-none-eabi libnewlib-arm-none-eabi g++ libstdc++-arm-none-eabi-newlib build-essential | |
| - name: Get SDK and add PICO_SDK_PATH | |
| run: git clone https://github.com/raspberrypi/pico-sdk.git && echo "PICO_SDK_PATH=$GITHUB_WORKSPACE/pico-sdk" >> $GITHUB_ENV | |
| - name: Init submodules to get tinyUSB stack | |
| run: ls && cd pico-sdk && git submodule update --init && cd .. | |
| - name: Configure and run CMake for Hardware Rev 0.3 | |
| # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. | |
| # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type | |
| run: cmake -B ${{github.workspace}}/Software/build-Rev-0_3 -S ${{github.workspace}}/Software -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DPICO_BOARD=RP2040-Decoder-board-Rev-0_3 | |
| - name: Build for Hardware Rev 0.3 | |
| # Build your program with the given configuration | |
| run: cmake --build ${{github.workspace}}/Software/build-Rev-0_3 --config ${{env.BUILD_TYPE}} | |
| - name: Configure and run CMake for Hardware Rev 1.0 | |
| # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. | |
| # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type | |
| run: cmake -B ${{github.workspace}}/Software/build-Rev-1_0 -S ${{github.workspace}}/Software -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DPICO_BOARD=RP2040-Decoder-board-Rev-1_0 | |
| - name: Build for Hardware Rev 1.0 | |
| # Build your program with the given configuration | |
| run: cmake --build ${{github.workspace}}/Software/build-Rev-1_0 --config ${{env.BUILD_TYPE}} |