Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
Signed-off-by: Vlad Gheorghiu <[email protected]>
  • Loading branch information
vsoftco committed May 1, 2024
1 parent a142531 commit b45e62d
Showing 1 changed file with 65 additions and 64 deletions.
129 changes: 65 additions & 64 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,26 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Install vcpkg (Windows)
if: runner.os == 'Windows'
run: |
git clone https://github.com/microsoft/vcpkg
.\vcpkg\bootstrap-vcpkg.bat
.\vcpkg\vcpkg install pkgconf:x64-windows
- name: Install gmp
shell: bash
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
./vcpkg/vcpkg install 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: Install vcpkg (Windows)
# if: runner.os == 'Windows'
# run: |
# git clone https://github.com/microsoft/vcpkg
# .\vcpkg\bootstrap-vcpkg.bat
# .\vcpkg\vcpkg install pkgconf:x64-windows
#
# - name: Install gmp
# shell: bash
# run: |
# if [ "$RUNNER_OS" == "Windows" ]; then
# ./vcpkg/vcpkg install 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
Expand Down Expand Up @@ -71,57 +71,58 @@ jobs:
sudo cmake --install build
fi
- name: Configure standalone example
run: |
cmake -S examples/standalone -B examples/standalone/build
- name: Build standalone example
run: |
cmake --build examples/standalone/build --target standalone
- name: Run standalone example
shell: bash
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
./examples/standalone/build/${{env.BUILD_TYPE}}/standalone.exe --version
else
./examples/standalone/build/standalone --version
fi
- name: Build unit tests
shell: bash
run: |
if [ "$RUNNER_OS" == "macOS" ]; then
# Required for libgmp headers
export CPATH=$LIBRARY_PATH:/opt/homebrew/include
export LIBRARY_PATH=$LIBRARY_PATH:/opt/homebrew/lib
fi
cmake --build build/unit_tests --target unit_tests
- name: Run unit tests
run: ctest --test-dir build
# - name: Configure standalone example
# run: |
# cmake -S examples/standalone -B examples/standalone/build
#
# - name: Build standalone example
# run: |
# cmake --build examples/standalone/build --target standalone
#
# - name: Run standalone example
# shell: bash
# run: |
# if [ "$RUNNER_OS" == "Windows" ]; then
# ./examples/standalone/build/${{env.BUILD_TYPE}}/standalone.exe --version
# else
# ./examples/standalone/build/standalone --version
# fi
#
# - name: Build unit tests
# shell: bash
# run: |
# if [ "$RUNNER_OS" == "macOS" ]; then
# # Required for libgmp headers
# export CPATH=$LIBRARY_PATH:/opt/homebrew/include
# export LIBRARY_PATH=$LIBRARY_PATH:/opt/homebrew/lib
# fi
# cmake --build build/unit_tests --target unit_tests
#
# - name: Run unit tests
# run: ctest --test-dir build

- name: Uninstall
shell: bash
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
ls 'C:/Program Files (x86)/staq/bin/staq_circ.exe'
cmake --build build --target uninstall
else
sudo cmake --build build --target uninstall
fi
- name: Install pystaq
shell: bash
run: |
if [ "$RUNNER_OS" == "macOS" ]; then
# Required for libgmp headers
export CPATH=$LIBRARY_PATH:/opt/homebrew/include
export LIBRARY_PATH=$LIBRARY_PATH:/opt/homebrew/lib
fi
python3 -m venv venv
if [ "$RUNNER_OS" == "Windows" ]; then
.\venv\Scripts\activate
else
. venv/bin/activate
fi
pip install .
# - name: Install pystaq
# shell: bash
# run: |
# if [ "$RUNNER_OS" == "macOS" ]; then
# # Required for libgmp headers
# export CPATH=$LIBRARY_PATH:/opt/homebrew/include
# export LIBRARY_PATH=$LIBRARY_PATH:/opt/homebrew/lib
# fi
# python3 -m venv venv
# if [ "$RUNNER_OS" == "Windows" ]; then
# .\venv\Scripts\activate
# else
# . venv/bin/activate
# fi
# pip install .

0 comments on commit b45e62d

Please sign in to comment.