Update #750
This file contains hidden or 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: GitHub actions | |
| on: | |
| push: | |
| branches: ["**"] | |
| pull_request: | |
| branches: ["**"] | |
| env: | |
| BUILD_TYPE: Debug | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| os: [windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Configure Quantum++ | |
| run: cmake -B build | |
| - name: Install Quantum++ | |
| shell: bash | |
| run: | | |
| if [ "$RUNNER_OS" == "Windows" ]; then | |
| cmake --install build | |
| else | |
| 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 | |
| # else | |
| # ./examples/standalone/build/standalone | |
| # fi | |
| # | |
| # - name: Build examples | |
| # run: cmake --build build --target examples | |
| # | |
| # - name: Build benchmarks | |
| # run: | | |
| # cmake -S benchmarks -B benchmarks/build | |
| # cmake --build benchmarks/build | |
| # | |
| # - name: Build unit tests | |
| # run: cmake --build build/unit_tests --target unit_tests | |
| # | |
| # - name: Run unit tests | |
| # run: ctest --test-dir build -E qpp_Timer | |
| # | |
| # - name: Uninstall Quantum++ | |
| # shell: bash | |
| # run: | | |
| # if [ "$RUNNER_OS" == "Windows" ]; then | |
| # cmake --build build --target uninstall | |
| # else | |
| # sudo cmake --build build --target uninstall | |
| # fi | |
| - name: Install pyqpp and test import | |
| shell: bash | |
| run: | | |
| python3 -mvenv venv | |
| if [ "$RUNNER_OS" == "Windows" ]; then | |
| venv/Scripts/Activate | |
| pip install -e . | |
| else | |
| source venv/bin/activate | |
| pip install -e . | |
| fi | |
| python -c "import pyqpp; print(pyqpp.dirac(pyqpp.states.zero()))" |