Replace std::shared_mutex with std::mutex on Cygwin (#11) #108
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 | |
jobs: | |
build: | |
name: ${{ matrix.preset }}-${{ matrix.config }}-${{ matrix.abstract }}-${{ matrix.sanitize }} | |
strategy: | |
fail-fast: false | |
matrix: | |
preset: [linux-clang, linux-gcc, macos, windows] | |
config: [Debug, Release] | |
abstract: [OFF, ON] | |
sanitize: [address, thread, undefined, leak, memory] | |
exclude: | |
- { preset: linux-gcc, sanitize: memory } | |
- { preset: macos, sanitize: leak } | |
- { preset: macos, sanitize: memory } | |
- { preset: windows, sanitize: thread } | |
- { preset: windows, sanitize: undefined } | |
- { preset: windows, sanitize: leak } | |
- { preset: windows, sanitize: memory } | |
include: | |
- { preset: linux-clang, os: ubuntu-latest } | |
- { preset: linux-gcc, os: ubuntu-latest } | |
- { preset: macos, os: macos-latest } | |
- { preset: windows, os: windows-latest } | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install dependencies on Linux | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y ninja-build | |
- name: Configure | |
run: > | |
cmake --preset ${{ matrix.preset }} | |
-DSINGLETON_COMPILE=ON | |
-DSINGLETON_INJECT_ABSTRACT_CLASS=${{ matrix.abstract }} | |
-DSINGLETON_SANITIZE=${{ matrix.sanitize }} | |
- name: Build | |
run: cmake --build --preset ${{ matrix.preset }} --config ${{ matrix.config }} | |
- name: Test | |
run: ctest --preset ${{ matrix.preset }} -C ${{ matrix.config }} --repeat-until-fail 100 | |
- name: Install | |
run: cmake --build --preset ${{ matrix.preset }} --config ${{ matrix.config }} -t install | |
build-mobile: | |
name: ${{ matrix.preset }}-${{ matrix.config }}-${{ matrix.abstract }} | |
strategy: | |
fail-fast: false | |
matrix: | |
preset: [android, ios] | |
config: [Debug, Release] | |
abstract: [OFF, ON] | |
include: | |
- { preset: android, os: ubuntu-latest } | |
- { preset: ios, os: macos-latest } | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install dependencies | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y ninja-build | |
- name: Configure | |
run: > | |
cmake --preset ${{ matrix.preset }} | |
-DSINGLETON_COMPILE=ON | |
-DSINGLETON_INJECT_ABSTRACT_CLASS=${{ matrix.abstract }} | |
- name: Build | |
run: cmake --build --preset ${{ matrix.preset }} --config ${{ matrix.config }} | |
- name: Install | |
run: cmake --build --preset ${{ matrix.preset }} --config ${{ matrix.config }} -t install | |
build-bsd: | |
name: ${{ matrix.preset }}-${{ matrix.arch }}-${{ matrix.config }}-${{ matrix.abstract }} | |
strategy: | |
fail-fast: false | |
matrix: | |
preset: [freebsd, netbsd, openbsd] | |
arch: [arm64, x86_64] | |
config: [Debug, Release] | |
abstract: [OFF, ON] | |
include: | |
- preset: freebsd | |
version: "14.0" | |
install: sudo pkg install -y cmake ninja | |
cc: clang++ | |
- preset: netbsd | |
version: "10.0" | |
install: sudo pkgin -y install cmake ninja-build gcc13 | |
cc: /usr/pkg/gcc13/bin/g++ | |
- preset: openbsd | |
version: "7.5" | |
install: sudo pkg_add cmake ninja | |
cc: clang++ | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: cross-platform-actions/action@master | |
with: | |
operating_system: ${{ matrix.preset }} | |
architecture: ${{ matrix.arch }} | |
version: ${{ matrix.version }} | |
run: | | |
${{ matrix.install }} | |
cmake -B build -G Ninja \ | |
-DCMAKE_BUILD_TYPE=${{ matrix.config }} \ | |
-DCMAKE_CXX_COMPILER=${{ matrix.cc }} \ | |
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/install \ | |
-DSINGLETON_COMPILE=ON \ | |
-DSINGLETON_INJECT_ABSTRACT_CLASS=${{ matrix.abstract }} | |
cmake --build build | |
cd build | |
ctest -V -C ${{ matrix.config }} --repeat-until-fail 100 | |
cd .. | |
cmake --install build | |
build-msys2: | |
name: msys2-${{ matrix.preset }}-${{ matrix.config }}-${{ matrix.abstract }} | |
strategy: | |
fail-fast: false | |
matrix: | |
preset: [UCRT64, CLANG64, CLANG32, MINGW64, MINGW32] | |
config: [Debug, Release] | |
abstract: [OFF, ON] | |
runs-on: windows-latest | |
defaults: | |
run: | |
shell: msys2 {0} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: msys2/setup-msys2@v2 | |
with: | |
msystem: ${{ matrix.preset }} | |
update: true | |
pacboy: >- | |
cmake:p | |
gcc:p | |
ninja:p | |
- name: Configure | |
run: > | |
cmake -B build -G Ninja | |
-DCMAKE_BUILD_TYPE=${{ matrix.config }} | |
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/install | |
-DSINGLETON_COMPILE=ON | |
-DSINGLETON_INJECT_ABSTRACT_CLASS=${{ matrix.abstract }} | |
- name: Build | |
run: cmake --build build | |
- name: Test | |
working-directory: build | |
run: ctest -V -C ${{ matrix.config }} --repeat-until-fail 100 | |
- name: Install | |
run: cmake --install build | |
build-cygwin: | |
name: cygwin-${{ matrix.config }}-${{ matrix.abstract }} | |
strategy: | |
fail-fast: false | |
matrix: | |
config: [Debug, Release] | |
abstract: [OFF, ON] | |
runs-on: windows-latest | |
defaults: | |
run: | |
shell: C:\cygwin\bin\bash.exe --noprofile --norc -o igncr -eo pipefail '{0}' | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: cygwin/cygwin-install-action@v4 | |
with: | |
packages: cmake gcc-g++ ninja | |
- name: Configure | |
run: > | |
cmake -B build -G Ninja | |
-DCMAKE_BUILD_TYPE=${{ matrix.config }} | |
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/install | |
-DSINGLETON_COMPILE=ON | |
-DSINGLETON_INJECT_ABSTRACT_CLASS=${{ matrix.abstract }} | |
- name: Build | |
run: cmake --build build | |
- name: Test | |
working-directory: build | |
run: ctest -V -C ${{ matrix.config }} --repeat-until-fail 100 | |
- name: Install | |
run: cmake --install build |