Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v3 without conan #496

Merged
merged 74 commits into from
Aug 16, 2023
Merged
Show file tree
Hide file tree
Changes from 72 commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
72fab0d
Initial commit.
rturrado Apr 22, 2023
ed69b23
Implemented some parse version tests.
rturrado Apr 23, 2023
b325d80
include/ql/ir/cqasm/read.h:
rturrado Apr 25, 2023
12c7cfd
test/ql/ir/cqasm/read.cc: added several fake structures, the main one…
rturrado Apr 25, 2023
fe9dba9
Fixed some compilation warnings.
rturrado Jun 2, 2023
8897eca
Added libqasm/v3 via FetchContent.
rturrado Jun 2, 2023
6e1df5a
Fixed failing test.
rturrado Jun 2, 2023
f28f517
Fix typo. [skip ci]
rturrado Jun 5, 2023
82980ea
Merge remote-tracking branch 'origin/v3' into v3
rturrado Jun 5, 2023
a65b6b1
Changed OpenQL C++ standard to C++20.
rturrado Jun 6, 2023
38bcebf
Disabled OPENQL_BUILD_TESTS for the time being.
rturrado Jun 6, 2023
b947a75
Amend of last commit.
rturrado Jun 6, 2023
84d01bc
Trying libqasm/v3_distro.
rturrado Jul 7, 2023
493bd28
Merge remote-tracking branch 'origin/v3' into v3
rturrado Jul 7, 2023
9c7e694
CMakeLists.txt: back to libqasm/v3, since OpenQL 1) requires tree-gen…
rturrado Jul 7, 2023
a651e8e
Fixed C++20 Windows compilation.
rturrado Jul 8, 2023
df9d41a
Forgot to add patches/adaptors.h.
rturrado Jul 8, 2023
4d55ae6
Fixed ambiguities in operator== introduced by changes in C++20.
rturrado Jul 9, 2023
73f1365
CMakeLists.txt: reverted last change as it introduces other errors.
rturrado Jul 9, 2023
e80e649
ir_gen_ex.cc: changed free function operator== signature.
rturrado Jul 9, 2023
f5a5d6f
Testing C++23.
rturrado Jul 9, 2023
0d886fe
Testing C++23 Windows compilation.
rturrado Jul 9, 2023
6e92f1f
tst.yml: fixed 'conan build' line.
rturrado Jul 9, 2023
8793683
Files with calls to ambiguous operator== should see free function ope…
rturrado Jul 9, 2023
73b94b1
Files with calls to ambiguous operator== should see free function ope…
rturrado Jul 9, 2023
1ef5fc2
operands.cc: calls to ambiguous operator== should see free function o…
rturrado Jul 9, 2023
876b375
Added free function operator==(const Link<Object>&, const Link<Object…
rturrado Jul 10, 2023
37ee9bf
lemon/lfgw_writer.h: trying to fix macos compilation.
rturrado Jul 10, 2023
bc329e3
conanfile.py: added verbosity to conan build.
rturrado Jul 10, 2023
9aa3638
CMakeLists.txt: changed the copy commands and printed the lfg_writer.…
rturrado Jul 10, 2023
fa3cfc6
Renamed lfg_writer.h to lgf_writer.h.
rturrado Jul 10, 2023
7f07017
Added lgf_reader.h to the list of lemon patches.
rturrado Jul 10, 2023
5367f9d
At this point, the CMake's configure step fails because both eigen an…
rturrado Jul 11, 2023
3be6463
Fixed CMakeLists.txt:
rturrado Jul 21, 2023
9e628da
OpenQL v3 candidate for PR:
rturrado Jul 25, 2023
525fef4
Trying to fix Eigen3 CMake configuration:
rturrado Jul 25, 2023
bfeca82
test/CMakeLists.txt: fixed Windows build.
rturrado Jul 25, 2023
bff091d
test.yml: run './example' for non-Windows systems, and 'example.exe' …
rturrado Jul 25, 2023
56e2ad3
test.yml: run './example' for non-Windows systems, and not './example…
rturrado Jul 25, 2023
d09eacf
Fixed Clang compilation.
rturrado Jul 26, 2023
cc15069
Fixed Visualizer errors (after enabling X11 locally).
rturrado Jul 26, 2023
76df6ea
CMakeLists.txt:
rturrado Jul 26, 2023
a2fab67
CMakeLists.txt: temporarily commented out 'add_subdirectory(test)' to…
rturrado Jul 27, 2023
9467037
Fixed errors of the style 'return "blah" + var;' and 'var += "blah" +…
rturrado Jul 27, 2023
db3b423
CMakeLists.txt:
rturrado Jul 27, 2023
e74d93b
CMakeLists.txt:
rturrado Jul 27, 2023
fd58d98
CMakeLists.txt:
rturrado Jul 27, 2023
edbb216
CMakeLists.txt: moved 'Wno-error=restrict' from Clang to gcc compile …
rturrado Jul 27, 2023
fe1ae38
Propagate ql library compile options to tests.
rturrado Jul 27, 2023
a9c8fae
test.yml: fixed cpp-windows and cpp-arm64 jobs.
rturrado Jul 27, 2023
e6a4cd7
Set the same compile options for the test executables than for the ql…
rturrado Jul 27, 2023
6a364b0
CMakeLists.txt:
rturrado Jul 28, 2023
82c6f3f
Testing a possible fix for memory exhaustion issues.
rturrado Jul 28, 2023
4645aea
Reorganized tests.
rturrado Jul 30, 2023
fe8df0b
Merge remote-tracking branch 'origin/v3_without_conan' into v3_withou…
rturrado Jul 30, 2023
9ae9e44
Fixed cpp tests (over which I had done some wrong search/replace).
rturrado Jul 30, 2023
44cb16d
CMakeLists.txt: updated cqasm to the latest libqasm/develop, which in…
rturrado Aug 1, 2023
d3d06e5
CMakeLists.txt: avoid using FetchContent_Populate.
rturrado Aug 1, 2023
83b6565
test.yml: changed 'on-push-branches' from 'v3_without_coman' to 'deve…
rturrado Aug 1, 2023
17ef9cc
Merge branch 'v3_without_conan' into develop
rturrado Aug 1, 2023
50f529e
Fixed conflicts when merging v3_without_conan to develop.
rturrado Aug 1, 2023
648b00c
.gitignore: updated 'tests' references to point to 'test/v1x/python'.
rturrado Aug 2, 2023
3f118c5
Trying to fix clang and mvsvc bugs.
rturrado Aug 2, 2023
bfa41e0
Fixed some more clang errors.
rturrado Aug 2, 2023
0a15782
Trying parallel build of 10 processors.
rturrado Aug 2, 2023
23f2d1c
Options struct at src/ql/pass/map/qubits/place_mip/detail/impl.h sets…
rturrado Aug 3, 2023
e7bfc20
Changed 'write_model_to_file' member of Options struct to false by de…
rturrado Aug 3, 2023
513c93a
Revert "Options struct at src/ql/pass/map/qubits/place_mip/detail/imp…
rturrado Aug 3, 2023
7a1945d
Minor tidying up of test files.
rturrado Aug 4, 2023
4b7715b
Fixed some Python tests that start failing after renaming some resour…
rturrado Aug 4, 2023
8bea56f
Updated docs.
rturrado Aug 5, 2023
843cc89
Fixed IpGridTest::grid__find_complex_permutation.
rturrado Aug 10, 2023
3233028
Fixed IpStarTest::star_with_2q_gate__no_perfect_solution.
rturrado Aug 10, 2023
a2e0da7
Addressed most of comments from Pablo's code review.
rturrado Aug 10, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
320 changes: 168 additions & 152 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,59 +7,140 @@ on:
pull_request:

jobs:
cpp:
name: 'C++ tests'
runs-on: ${{ matrix.os }}
cpp-linux:
name: 'C++ tests (gcc-clang/Linux/x64)'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
build_type:
- Debug
- Release
compiler:
- clang++
- g++
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Install dependencies
if: matrix.os == 'macos-latest'
run: |
brew install bison flex
echo "/usr/local/opt/bison/bin" >> $GITHUB_PATH
echo "/usr/local/opt/flex/bin" >> $GITHUB_PATH
- uses: actions/cache@v2
if: matrix.os == 'windows-latest'
with:
path: C:\Users\runneradmin\AppData\Local\Temp\chocolatey
key: ${{ runner.os }}-chocolatey-cpp-0
restore-keys: |
${{ runner.os }}-chocolatey-cpp-
${{ runner.os }}-chocolatey-
- name: Install dependencies
if: matrix.os == 'windows-latest'
run: choco install winflexbison3 --version 2.5.18.20190508
- name: Configure
run: cmake . -DCMAKE_BUILD_TYPE=Debug -DOPENQL_BUILD_TESTS=ON -DBUILD_SHARED_LIBS=OFF -DWITH_UNITARY_DECOMPOSITION=OFF
- name: Build
run: cmake --build . --parallel 5
- name: Test
run: ctest -C Debug --output-on-failure
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Get latest CMake
uses: lukka/get-cmake@latest
- name: Create build directory
run: mkdir -p build-${{ matrix.compiler }}-${{ matrix.build_type }}
- name: Configure
env:
CXX: ${{ matrix.compiler }}
working-directory: build-${{ matrix.compiler }}-${{ matrix.build_type }}
run: cmake -S .. -B . -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DBUILD_SHARED_LIBS=OFF -DOPENQL_BUILD_TESTS=ON -DWITH_UNITARY_DECOMPOSITION=OFF
- name: Build
working-directory: build-${{ matrix.compiler }}-${{ matrix.build_type }}
run: cmake --build . --parallel 10
- name: Test
working-directory: build-${{ matrix.compiler }}-${{ matrix.build_type }}
run: ctest -C ${{ matrix.build_type }} --output-on-failure

cpp-standalone:
name: 'C++ standalone program'
runs-on: ubuntu-latest
cpp-macos:
name: 'C++ tests (clang/MacOS/x64)'
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
build_type:
- Debug
- Release
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Configure
run: |
mkdir cbuild
cd cbuild && cmake ../examples/cpp-standalone-example
- name: Build
run: make -C cbuild -j 5
- name: Test
run: cd tests && ../cbuild/example
- uses: actions/checkout@v3
with:
fetch-depth: 0
rturrado marked this conversation as resolved.
Show resolved Hide resolved
- name: Install flex/bison
run: |
brew install flex bison
echo "$(brew --prefix flex)/bin" >> $GITHUB_PATH
echo "$(brew --prefix bison)/bin" >> $GITHUB_PATH
- name: Get latest CMake
uses: lukka/get-cmake@latest
- name: Create build directory
run: mkdir -p build-${{ matrix.build_type }}
- name: Configure
working-directory: build-${{ matrix.build_type }}
run: cmake -S .. -B . -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DBUILD_SHARED_LIBS=OFF -DOPENQL_BUILD_TESTS=ON -DWITH_UNITARY_DECOMPOSITION=OFF
- name: Build
working-directory: build-${{ matrix.build_type }}
run: cmake --build . --parallel 10
- name: Test
working-directory: build-${{ matrix.build_type }}
run: ctest -C ${{ matrix.build_type }} --output-on-failure

cpp-windows:
name: 'C++ tests (msvc/Windows/x64)'
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
build_type:
- Debug
- Release
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install Winflexbison3
shell: powershell
run: choco install winflexbison3 --version 2.5.24.20210105
- name: Get latest CMake
uses: lukka/get-cmake@latest
- name: Create build directory
run: mkdir -p build
- name: Configure
working-directory: build
run: cmake -S .. -B . -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DBUILD_SHARED_LIBS=OFF -DOPENQL_BUILD_TESTS=ON -DWITH_UNITARY_DECOMPOSITION=OFF
- name: Build
working-directory: build
run: cmake --build . --parallel 10 --config ${{ matrix.build_type }}
- name: Test
working-directory: build
run: ctest -C ${{ matrix.build_type }} --output-on-failure

cpp-arm64:
name: 'C++ tests (gcc/Linux/ARM64, clang/MacOS/ARM64)'
runs-on: [self-hosted, ARM64, "${{ matrix.os }}"]
strategy:
fail-fast: false
matrix:
os:
- Linux
- macOS
steps:
- if: matrix.os == 'Linux'
name: Install flex/bison, and gcc (Linux)
run: |
sudo apt-get -y update
sudo apt-get -y upgrade
sudo apt-get -y install flex bison gcc
shell: bash
- if: matrix.os == 'macOS'
name: Install flex/bison, and gcc (MacOS)
run: |
brew install flex bison gcc
echo "$(brew --prefix flex)/bin" >> $GITHUB_PATH
echo "$(brew --prefix bison)/bin" >> $GITHUB_PATH
shell: bash
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Get latest CMake
uses: lukka/get-cmake@latest
- name: Create build directory
run: mkdir -p build
- name: Configure
working-directory: build
run: cmake -S .. -B . -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DOPENQL_BUILD_TESTS=ON -DWITH_UNITARY_DECOMPOSITION=OFF
- name: Build
working-directory: build
run: cmake --build . --parallel 10
- name: Test
working-directory: build
run: ctest -C Release --output-on-failure

python:
name: Python
Expand All @@ -68,109 +149,44 @@ jobs:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
python:
- '3.7'
- '3.8'
- '3.9'
- '3.10'
- '3.11'
- ubuntu-latest
- macos-latest
- windows-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: python -m pip install --upgrade pip setuptools wheel pytest numpy qxelarator
- name: Install dependencies
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get install -y swig
- name: Install dependencies
if: matrix.os == 'macos-latest'
run: |
brew install bison flex swig xquartz
echo "/usr/local/opt/bison/bin" >> $GITHUB_PATH
echo "/usr/local/opt/flex/bin" >> $GITHUB_PATH
- uses: actions/cache@v2
if: matrix.os == 'windows-latest'
with:
path: C:\Users\runneradmin\AppData\Local\Temp\chocolatey
key: ${{ runner.os }}-chocolatey-python-1
restore-keys: |
${{ runner.os }}-chocolatey-python-
${{ runner.os }}-chocolatey-
- name: Install dependencies
if: matrix.os == 'windows-latest'
shell: powershell
run: |
choco install winflexbison3 --version 2.5.18.20190508
- name: Select build type
if: matrix.os == 'windows-latest'
shell: powershell
run: echo "OPENQL_BUILD_TYPE=Release" >> $GITHUB_ENV
- name: Select build type
if: matrix.os != 'windows-latest'
run: echo "OPENQL_BUILD_TYPE=Debug" >> $GITHUB_ENV
- name: Disable unitary decomposition
if: matrix.os != 'windows-latest'
run: echo "OPENQL_DISABLE_UNITARY=true" >> $GITHUB_ENV
- name: Disable unitary decomposition
if: matrix.os == 'windows-latest'
run: echo "OPENQL_DISABLE_UNITARY=true" >> $env:GITHUB_ENV
- name: Build
env:
NPROCS: 5
run: python -m pip install --verbose .
- name: Test
run: python -m pytest

# NOTE: disabled conda completely because it is INCREDIBLY slow on CI (multiple
# hours!) and occasionally just breaks the runners entirely after ~6 hours. It
# also doesn't appear like anyone is actually using Conda within the lab
# (anymore), as everything goes through pycQED and it is pip-only.
#
# conda:
# name: Conda
# runs-on: ${{ matrix.os }}
# strategy:
# fail-fast: false
# matrix:
# os:
# - ubuntu-latest
# - macos-latest
# #- windows-latest
# #- windows-2016
# steps:
# - uses: actions/checkout@v2
# with:
# submodules: recursive
# - name: Set up conda
# uses: conda-incubator/setup-miniconda@v2
# with:
# auto-update-conda: true
# miniconda-version: "latest"
# channel-priority: strict
# channels: conda-forge
# show-channel-urls: true
# use-only-tar-bz2: true
# - name: Install Windows dependencies
# if: matrix.os == 'windows-2016' || matrix.os == 'windows-latest'
# run: choco install winflexbison3 --version 2.5.18.20190508
# - name: Install conda dependencies
# run: conda install conda-build conda-verify -y
# - name: Build & test
# env:
# NPROCS: 5
# run: conda build conda-recipe
# - name: Install
# # This doesn't seem to work on Windows in CI because everything appears
# # to build in a non-default environment and conda is broken for that,
# # see https://github.com/conda/conda/issues/7758
# # Note that conda build already does a test install in a fresh
# # environment, so this is a bit redundant anyway.
# if: matrix.os != 'windows-2016' && matrix.os != 'windows-latest'
# run: conda install openql --use-local
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: "3.11"
pablolh marked this conversation as resolved.
Show resolved Hide resolved
- name: Install Python dependencies
run: python -m pip install --upgrade pip setuptools wheel pytest numpy qxelarator
- name: Install SWIG
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get install -y swig
echo "LIBQASM_BUILD_TYPE=Debug" >> $GITHUB_ENV
echo "OPENQL_DISABLE_UNITARY=true" >> $GITHUB_ENV
- name: Install flex/bison and SWIG
if: matrix.os == 'macos-latest'
run: |
brew install bison flex swig
echo "/usr/local/opt/bison/bin" >> $GITHUB_PATH
echo "/usr/local/opt/flex/bin" >> $GITHUB_PATH
echo "LIBQASM_BUILD_TYPE=Debug" >> $GITHUB_ENV
echo "OPENQL_DISABLE_UNITARY=true" >> $GITHUB_ENV
- name: Install Winflexbison3
if: matrix.os == 'windows-latest'
shell: powershell
run: |
choco install winflexbison3 --version 2.5.24.20210105
echo "OPENQL_BUILD_TYPE=Release" >> $env:GITHUB_ENV
echo "OPENQL_DISABLE_UNITARY=true" >> $env:GITHUB_ENV
- name: Get latest CMake
uses: lukka/get-cmake@latest
- name: Build
env:
NPROCS: 10
run: python -m pip install --verbose .
- name: Test
run: python -m pytest
15 changes: 14 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,17 @@ swig/qutechopenql.egg-info
# Test files
test_output*
.ipynb_checkpoints
tests/visualizer/visualizer_example_output/
test/v1x/python/test_gate_decomposition_cz.cc_backend.map
test/v1x/python/test_gate_decomposition_cz.cc_backend.vcd
test/v1x/python/test_gate_decomposition_cz.cc_backend.vq1asm
test/v1x/python/test_gate_decomposition_cz.initial.cq
test/v1x/python/test_gate_decomposition_cz.scheduled.cq
test/v1x/python/test_qi_example.cc_backend.map
test/v1x/python/test_qi_example.cc_backend.vcd
test/v1x/python/test_qi_example.cc_backend.vq1asm
test/v1x/python/test_qi_example.initial.cq
test/v1x/python/test_qi_example.scheduled.cq
Testing/Temporary/CTestCostData.txt

# Diamond Example Files
examples/diamond/test_output
Expand All @@ -41,3 +51,6 @@ docs/_templates
/cmake-build-*

*.pbm

# conan
CMakeUserPresets.json
22 changes: 0 additions & 22 deletions .gitmodules

This file was deleted.

Loading