added google benchmark lib #26
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: macos-testing | |
on: | |
push: | |
branches: [ "main", "dev"] | |
pull_request: | |
branches: [ "main", "dev" ] | |
env: | |
CMAKE_TOOLCHAIN_FILE: ${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake | |
CMAKE_PREFIX_PATH: ${{ github.workspace }}/vcpkg/installed/arm64-osx/share | |
jobs: | |
run-tests: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Postgres and autoconf | |
run: | | |
brew install autoconf postgresql@15 | |
- name: Start Postgres Server, Create Role and Database | |
run: | | |
export PATH="/opt/homebrew/opt/postgresql@15/bin:$PATH" | |
initdb --locale=C -D /opt/homebrew/var/postgres@15 | |
pg_ctl -D /opt/homebrew/var/postgres@15 start | |
createuser -s postgres | |
psql -U postgres -c "CREATE ROLE ci WITH LOGIN PASSWORD 'password';" | |
psql -U postgres -c "ALTER ROLE ci CREATEDB;" | |
psql -U postgres -c "CREATE DATABASE live_view_ci_test OWNER ci;" | |
- name: Install vcpkg | |
run: | | |
git clone https://github.com/microsoft/vcpkg.git | |
./vcpkg/bootstrap-vcpkg.sh | |
./vcpkg/vcpkg install --feature-flags=manifests | |
working-directory: ${{ github.workspace }} | |
- name: Configure CMake | |
run: mkdir build && cd build && cmake .. \ | |
-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \ | |
-DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake | |
-DCMAKE_PREFIX_PATH= ${{ github.workspace }}/vcpkg/installed/arm64-osx/share | |
working-directory: ${{ github.workspace }} | |
- name: Build CMake | |
run: make -j 4 | |
working-directory: ${{ github.workspace }}/build | |
- name: Run Unit Tests | |
run: ctest --output-on-failure --extra-verbose | |
working-directory: ${{ github.workspace }}/build |