diff --git a/.github/workflows/CI-macOS.yml b/.github/workflows/CI-macOS.yml new file mode 100644 index 0000000..ae1f198 --- /dev/null +++ b/.github/workflows/CI-macOS.yml @@ -0,0 +1,48 @@ +name: CI-macOS + +on: + push: + branches: + - main + - release/** + - stable + pull_request: + branches: + - main + - release/** + - codex/** + +jobs: + Tests-macOS: + runs-on: macos-latest + strategy: + matrix: + std: [11, 17] + steps: + - uses: actions/checkout@v3 + - name: Install dependencies + run: | + brew update + brew uninstall --ignore-dependencies cmake || true + brew install cmake + - name: Configure + run: cmake -S . -B build -DBUILD_TESTS=ON -DCMAKE_CXX_STANDARD=${{ matrix.std }} + - name: Build + run: cmake --build build + - name: Run tests + run: cd build && ctest --output-on-failure + vcpkg: + runs-on: macos-latest + steps: + - uses: actions/checkout@v3 + - name: Install vcpkg + run: | + git clone https://github.com/microsoft/vcpkg.git + ./vcpkg/bootstrap-vcpkg.sh + ./vcpkg/vcpkg install gtest + - name: Configure + run: cmake -S . -B build -DBUILD_TESTS=ON -DCMAKE_TOOLCHAIN_FILE=./vcpkg/scripts/buildsystems/vcpkg.cmake + - name: Build + run: cmake --build build + - name: Run tests + run: cd build && ctest --output-on-failure diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml new file mode 100644 index 0000000..6b79b43 --- /dev/null +++ b/.github/workflows/benchmarks.yml @@ -0,0 +1,16 @@ +name: Benchmarks + +on: + push: + tags: + - '*' + +jobs: + benchmark: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Install dependencies + run: sudo apt-get update && sudo apt-get install -y cmake hyperfine + - name: Run benchmarks + run: scripts/run_benchmarks.sh diff --git a/scripts/run_benchmarks.sh b/scripts/run_benchmarks.sh new file mode 100755 index 0000000..41f1d08 --- /dev/null +++ b/scripts/run_benchmarks.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash +set -euo pipefail + +cmake -S . -B build-bench -DCMAKE_BUILD_TYPE=Release +cmake --build build-bench --config Release +hyperfine "./build-bench/example"