Merge pull request #24 from steve-downey/fix_make_optional #64
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: ci | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
- master | |
jobs: | |
build: | |
name: ${{ matrix.name }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- name: "clang17" | |
pkg: "clang-17 clang-tidy-17 g++-13 libc++-17-dev libc++1-17 libc++abi-17-dev libc++abi1-17 libunwind-17-dev" | |
toolchain: clang-17 | |
os: ubuntu-22.04 | |
- name: "gcc13" | |
pkg: "gcc-13 g++-13" | |
toolchain: gcc-13 | |
os: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Configure APT (llvm) | |
continue-on-error: true | |
if: contains(matrix.pkg, 'clang') | |
run: | | |
sudo apt-add-repository --no-update --yes "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main" | |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add - | |
- name: Configure APT | |
continue-on-error: true | |
run: | | |
echo 'APT::Acquire::Retries "5";' | sudo tee -a /etc/apt/apt.conf.d/80-retries > /dev/null | |
sudo add-apt-repository --no-update --yes ppa:ubuntu-toolchain-r/ppa | |
sudo add-apt-repository --no-update --yes ppa:ubuntu-toolchain-r/test | |
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc | gpg --dearmor - | sudo tee /usr/share/keyrings/kitware-archive-keyring.gpg | |
echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ jammy main' | sudo tee /etc/apt/sources.list.d/kitware.list | |
sudo apt-get update | |
- name: Install CMake | |
run: sudo apt-get install --yes cmake | |
- name: Install Ninja | |
run: sudo apt-get install --yes ninja-build | |
- name: Install compiler/tool ${{ matrix.pkg }} | |
run: sudo apt-get install --yes ${{ matrix.pkg }} | |
- name: Build | |
run: | | |
./bld compile TOOLCHAIN=${{ matrix.toolchain }} | |
- name: Test | |
run: | | |
./bld test TOOLCHAIN=${{ matrix.toolchain }} | |
- name: Test-ASAN | |
run: | | |
./bld test TOOLCHAIN=${{ matrix.toolchain }} CONFIG=Asan | |
- name: Test-TSAN | |
run: | | |
./bld test TOOLCHAIN=${{ matrix.toolchain }} CONFIG=Tsan |