[FIXUP] Make error UNWRAP compile #57
This file contains 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: build | |
on: [push] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
platform: [{ os: windows-latest, shell: 'msys2 {0}', gen: 'MSYS Makefiles' }, { os: ubuntu-latest, shell: bash, gen: 'Ninja' }] | |
toolchain: [{ cross: true, cpref: 'arm-none-eabi-' }, { cross: false, cpref: '' }] | |
runs-on: ${{ matrix.platform.os }} | |
defaults: | |
run: | |
shell: ${{ matrix.platform.shell }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Windows Toolchain (arm-cross) | |
uses: msys2/setup-msys2@v2 | |
if: ${{ matrix.platform.os == 'windows-latest' && matrix.toolchain.cross }} | |
with: | |
path-type: inherit | |
msystem: mingw64 | |
install: mingw-w64-x86_64-arm-none-eabi-toolchain | |
- name: Windows Toolchain (host=target) | |
uses: msys2/setup-msys2@v2 | |
if: ${{ matrix.platform.os == 'windows-latest' && !matrix.toolchain.cross }} | |
with: | |
path-type: inherit | |
msystem: mingw64 | |
install: mingw-w64-x86_64-toolchain | |
- name: Linux Toolchain (arm-cross) | |
if: ${{ matrix.platform.os == 'ubuntu-latest' && matrix.toolchain.cross }} | |
run: | | |
sudo apt-get upgrade | |
sudo apt install -y gcc-arm-none-eabi | |
sudo apt-get install -y ninja-build | |
- name: Linux Toolchain (host=target) | |
if: ${{ matrix.platform.os == 'ubuntu-latest' && !matrix.toolchain.cross }} | |
run: | | |
sudo apt-get upgrade | |
sudo apt install -y gcc-13 | |
sudo apt install -y g++-13 | |
sudo apt-get install -y ninja-build | |
- uses: jwlawson/[email protected] | |
- name: Configure | |
run: | | |
cmake -DCMAKE_C_COMPILER="${{ matrix.toolchain.cpref }}gcc" -DCMAKE_CXX_COMPILER="${{ matrix.toolchain.cpref }}g++" -G"${{ matrix.platform.gen }}" -Bbuild . | |
- name: Build | |
run: | | |
cmake --build ./build --config Debug --target all | |
- name: Test | |
if: ${{ !matrix.toolchain.cross }} | |
run: | | |
ctest --test-dir ./build |