Skip to content

Version 3.3

Version 3.3 #201

Workflow file for this run

name: GitHub actions
on:
push:
branches: [ "**" ]
pull_request:
branches: [ "**" ]
env:
BUILD_TYPE: Debug
jobs:
build:
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Install gmp
shell: bash
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
git clone https://github.com/microsoft/vcpkg
./vcpkg/bootstrap-vcpkg.bat
./vcpkg/vcpkg install pkgconf:x64-windows gmp:x64-windows
elif [ "$RUNNER_OS" == "Linux" ]; then
sudo apt-get install -y libgmp-dev
elif [ "$RUNNER_OS" == "macOS" ]; then
brew install gmp
else
echo "$RUNNER_OS not supported"
exit 1
fi
- name: Configure staq
shell: bash
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
cmake -B build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \
-DCMAKE_TOOLCHAIN_FILE=./vcpkg/scripts/buildsystems/vcpkg.cmake \
-DBUILD_GRID_SYNTH=ON
else
cmake -B build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \
-DBUILD_GRID_SYNTH=ON
fi
- name: Build staq
shell: bash
run: |
if [ "$RUNNER_OS" == "macOS" ]; then
export CPATH=$LIBRARY_PATH:/usr/local/include
export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/lib
fi
cmake --build build
- name: Install staq
shell: bash
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
cmake --build build --target install
else
sudo cmake --install build
fi
- name: Build unit tests
shell: bash
run: |
if [ "$RUNNER_OS" == "macOS" ]; then
export CPATH=$LIBRARY_PATH:/usr/local/include
export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/lib
fi
cmake --build build --target unit_tests
- name: Run unit tests
run: ctest --test-dir build
- name: Install pystaq
run: pip3 install --user .