v0.4.0 #23
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: | |
push: | |
branches-ignore: | |
- "gh-pages" | |
paths: | |
- "**.h" | |
- "**.hpp" | |
- "**.cpp" | |
- "**.inl" | |
- "**/meson.build" | |
- "**/workflows/**.yaml" | |
pull_request: | |
branches-ignore: | |
- "gh-pages" | |
paths: | |
- "**.h" | |
- "**.hpp" | |
- "**.cpp" | |
- "**.inl" | |
- "**/meson.build" | |
- "**/workflows/**.yaml" | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
clang_version: "14" | |
gcc_version: "11" | |
jobs: | |
linux: | |
strategy: | |
fail-fast: false | |
matrix: | |
compiler: | |
- "clang" | |
- "gcc" | |
linker: | |
- "lld" | |
type: | |
- "debug" | |
- "release" | |
runs-on: ubuntu-22.04 | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- name: Install base dependencies | |
run: | | |
sudo apt -y update | |
sudo apt -y install --no-install-recommends git python3 python3-pip ninja-build gettext libstdc++-${{ env.gcc_version }}-dev | |
- name: Install lld | |
if: ${{ startsWith(matrix.linker, 'lld') }} | |
run: | | |
sudo apt -y install --no-install-recommends lld-${{ env.clang_version }} | |
sudo update-alternatives --install /usr/bin/ld.lld ld.lld /usr/bin/ld.lld-${{ env.clang_version }} 1000 | |
- name: Install clang | |
if: ${{ startsWith(matrix.compiler, 'clang') }} | |
run: | | |
sudo apt -y install --no-install-recommends clang-${{ env.clang_version }} | |
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-${{ env.clang_version }} 1000 | |
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/clang-${{ env.clang_version }} 1000 | |
- name: Install gcc | |
if: ${{ startsWith(matrix.compiler, 'gcc') }} | |
run: | | |
sudo apt -y install --no-install-recommends gcc-${{ env.gcc_version }} g++-${{ env.gcc_version }} | |
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++-${{ env.gcc_version }} 1000 | |
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc-${{ env.gcc_version }} 1000 | |
- uses: actions/checkout@v3 | |
- name: Install python dependencies | |
run: | | |
sudo -H pip3 install --no-cache-dir --upgrade meson | |
- name: Configure Meson | |
run: | | |
CC=cc CC_LD=${{ matrix.linker }} CXX=c++ CXX_LD=${{ matrix.linker }} meson setup build --buildtype=${{ matrix.type }} -Dbuild_tests=true | |
- name: Build | |
run: meson compile -C build | |
- name: Test | |
run: meson test -C build --verbose |