Merge pull request #11 from btoo/patch-1 #70
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: "clang16" | |
pkg: "clang-16 clang-tidy-16 g++-13 libc++-16-dev libc++1-16 libc++abi-16-dev libc++abi1-16 libunwind-16-dev" | |
toolchain: clang-16 | |
os: ubuntu-22.04 | |
- name: "gcc11" | |
pkg: "gcc-11 g++-11" | |
toolchain: gcc-11 | |
os: ubuntu-22.04 | |
- name: "gcc12" | |
pkg: "gcc-12 g++-12" | |
toolchain: gcc-12 | |
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-16 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 |