@@ -37,25 +37,23 @@ jobs:
3737 with :
3838 submodules : recursive
3939
40- - name : Installing boost
41- run : sudo apt-get install -y libboost-program-options-dev
42-
43- - name : Cache Z3
44- id : cache-z3
45- uses : actions/cache@v2
40+ - uses : actions/setup-python@v2
41+ name : Install Python
4642 with :
47- path : z3
48- key : ${{ runner.OS }}-z3-${{ env.Z3_GIT_TAG }}-static
43+ python-version : ' 3.9'
4944
50- - name : Building Z3
51- if : steps.cache-z3.outputs.cache-hit != 'true'
52- run : |
53- git clone --branch $Z3_GIT_TAG --depth 1 https://github.com/Z3Prover/z3.git
54- cmake -S z3 -B z3/build -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DZ3_BUILD_LIBZ3_SHARED=FALSE
55- cmake --build z3/build --config $BUILD_TYPE
45+ - name : Installing boost
46+ run : sudo apt-get install -y libboost-program-options-dev
47+
48+ - name : Install Z3
49+ run : python -m pip install z3-solver
5650
5751 - name : Configure CMake
58- run : cmake -S "${{github.workspace}}" -B "${{github.workspace}}/build" -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_QMAP_TESTS=ON -DZ3_ROOT=z3/build -DBINDINGS=ON
52+ run : |
53+ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/python/cp39-cp39/lib/python3.9/site-packages/z3/lib
54+ export Z3_ROOT=/opt/python/cp39-cp39/lib/python3.9/site-packages/z3
55+ export Z3_DIR=/opt/python/cp39-cp39/lib/python3.9/site-packages/z3
56+ cmake -S "${{github.workspace}}" -B "${{github.workspace}}/build" -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_QMAP_TESTS=ON -DBINDINGS=ON
5957
6058 - name : Build
6159 run : |
@@ -70,16 +68,17 @@ jobs:
7068
7169 - name : Coverage
7270 run : |
73- cmake -S "${{github.workspace}}" -B "${{github.workspace}}/buildCov" -DCMAKE_BUILD_TYPE=Debug -DBUILD_QMAP_TESTS=ON -DCOVERAGE=ON -DBINDINGS=ON -DZ3_ROOT=z3/build
74- cmake --build "${{github.workspace}}/buildCov" --config Debug --target qmap_exact_test
75- cmake --build "${{github.workspace}}/buildCov" --config Debug --target qmap_heuristic_test
76- cd buildCov/test
77- ctest -C $BUILD_TYPE --output-on-failure
71+ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/python/cp39-cp39/lib/python3.9/site-packages/z3/lib
72+ export Z3_ROOT=/opt/python/cp39-cp39/lib/python3.9/site-packages/z3
73+ export Z3_DIR=/opt/python/cp39-cp39/lib/python3.9/site-packages/z3
74+ cmake -S "${{github.workspace}}" -B "${{github.workspace}}/buildCov" -DCMAKE_BUILD_TYPE=Debug -DBUILD_QMAP_TESTS=ON -DCOVERAGE=ON -DBINDINGS=ON
75+ cmake --build "${{github.workspace}}/buildCov" --config Debug --target qmap_exact_test
76+ cmake --build "${{github.workspace}}/buildCov" --config Debug --target qmap_heuristic_test
77+ cd buildCov/test
78+ ctest -C $BUILD_TYPE --output-on-failure
7879
7980 - name : Upload coverage to Codecov
8081 uses : codecov/codecov-action@v1
81- # with:
82- # fail_ci_if_error: true
8382
8483 macOS-ci :
8584 runs-on : macos-latest
@@ -89,32 +88,18 @@ jobs:
8988 with :
9089 submodules : recursive
9190
92- - name : Installing boost
93- run : brew install boost
94-
95- - name : Cache Z3
96- id : cache-z3
97- uses : actions/cache@v2
98- with :
99- path : z3
100- key : ${{ runner.OS }}-z3-${{ env.Z3_GIT_TAG }}-static
101-
102- - name : Building Z3
103- if : steps.cache-z3.outputs.cache-hit != 'true'
104- run : |
105- git clone --branch $Z3_GIT_TAG --depth 1 https://github.com/Z3Prover/z3.git
106- cmake -S z3 -B z3/build -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DZ3_BUILD_LIBZ3_SHARED=FALSE
107- cmake --build z3/build --config $BUILD_TYPE
91+ - name : Installing boost and Z3
92+ run : brew install boost z3
10893
10994 - name : Configure CMake
110- run : cmake -S "${{github.workspace}}" -B "${{github.workspace}}/build" -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_QMAP_TESTS=ON -DZ3_ROOT=z3/build
95+ run : cmake -S "${{github.workspace}}" -B "${{github.workspace}}/build" -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_QMAP_TESTS=ON
11196
11297 - name : Build
113- run : |
114- cmake --build "${{github.workspace}}/build" --config $BUILD_TYPE --target qmap_heuristic
115- cmake --build "${{github.workspace}}/build" --config $BUILD_TYPE --target qmap_exact
116- cmake --build "${{github.workspace}}/build" --config $BUILD_TYPE --target qmap_heuristic_test
117- cmake --build "${{github.workspace}}/build" --config $BUILD_TYPE --target qmap_exact_test
98+ run : |
99+ cmake --build "${{github.workspace}}/build" --config $BUILD_TYPE --target qmap_heuristic
100+ cmake --build "${{github.workspace}}/build" --config $BUILD_TYPE --target qmap_exact
101+ cmake --build "${{github.workspace}}/build" --config $BUILD_TYPE --target qmap_heuristic_test
102+ cmake --build "${{github.workspace}}/build" --config $BUILD_TYPE --target qmap_exact_test
118103
119104 - name : Test
120105 working-directory : ${{github.workspace}}/build/test
@@ -127,55 +112,31 @@ jobs:
127112 with :
128113 submodules : recursive
129114
130- - name : Cache Boost
131- id : cache-boost
132- uses : actions/cache@v2
133- with :
134- path : ${{github.workspace}}/boost_1_70_0
135- key : ${{ runner.OS }}-boost170
136-
137- - name : Download boost
138- if : steps.cache-boost.outputs.cache-hit != 'true'
139- shell : cmd
140- run : C:\msys64\usr\bin\wget.exe https://boostorg.jfrog.io/artifactory/main/release/1.70.0/source/boost_1_70_0.7z --no-check-certificate
141-
142115 - uses : ilammy/msvc-dev-cmd@v1
143116
144- - name : Building boost
145- if : steps.cache-boost.outputs.cache-hit != 'true'
146- run : |
147- "/c/Program Files/7-Zip/7z.exe" x boost_1_70_0.7z "-o${{github.workspace}}"
148- cd boost_1_70_0
149- ./bootstrap.bat
150- ./b2.exe -j8 address-model=64 link=static threading=multi runtime-link=shared variant=release --build-type=minimal --with-program_options
151-
152117 - name : Cache Z3
153118 id : cache-z3
154119 uses : actions/cache@v2
155120 with :
156121 path : z3
157122 key : ${{ runner.OS }}-z3-${{ env.Z3_GIT_TAG }}-static
158123
159- - name : Building Z3
160- if : steps.cache-z3.outputs.cache-hit != 'true'
161- run : |
162- git clone --branch $Z3_GIT_TAG --depth 1 https://github.com/Z3Prover/z3.git
163- cmake -S z3 -B z3/build -DCMAKE_BUILD_TYPE=$BUILD_TYPE -G "Visual Studio 16 2019" -A x64 -DZ3_BUILD_LIBZ3_SHARED=FALSE
164- cmake --build z3/build --config $BUILD_TYPE
124+ - name : Building Z3
125+ if : steps.cache-z3.outputs.cache-hit != 'true'
126+ run : |
127+ git clone --branch $Z3_GIT_TAG --depth 1 https://github.com/Z3Prover/z3.git
128+ cmake -S z3 -B z3/build -DCMAKE_BUILD_TYPE=$BUILD_TYPE -G "Visual Studio 16 2019" -A x64 -DZ3_BUILD_LIBZ3_SHARED=FALSE -DZ3_BUILD_EXECUTABLE=False -DZ3_BUILD_TEST_EXECUTABLES=False
129+ cmake --build z3/build --config $BUILD_TYPE
165130
166- - name : Configure CMake
167- run : |
168- setx path "%path%;${{github.workspace}}\boost_1_70_0"
169- setx lib "%lib%;${{github.workspace}}\boost_1_70_0\stage\lib"
170- setx libpath "%libpath%;${{github.workspace}}\boost_1_70_0\stage\lib"
171- cmake -S "${{github.workspace}}" -B "${{github.workspace}}/build" -DCMAKE_BUILD_TYPE=$BUILD_TYPE -T "ClangCl" -DBoost_USE_STATIC_LIBS=ON -DBoost_USE_MULTITHREADED=ON -DBoost_USE_STATIC_RUNTIME=OFF -DBOOST_ROOT="${{github.workspace}}\boost_1_70_0" -DBOOST_INCLUDEDIR="${{github.workspace}}\boost_1_70_0\include" -DBOOST_LIBRARYDIR="${{github.workspace}}\boost_1_70_0\stage\lib" -DZ3_ROOT=z3/build
131+ - name : Configure CMake
132+ run : cmake -S "${{github.workspace}}" -B "${{github.workspace}}/build" -DCMAKE_BUILD_TYPE=$BUILD_TYPE -T "ClangCl" -DZ3_ROOT=z3/build -DBUILD_QMAP_TESTS=ON
172133
173134 - name : Build
174135 run : cmake --build "${{github.workspace}}/build" --config $BUILD_TYPE
175136
176137 - name : Test
177- working-directory : ${{github.workspace}}/build/apps
178- run : |
179- cd $BUILD_TYPE
180- ./qmap_exact.exe --in ../../../examples/3_17_13.qasm --out 3_17_13me.qasm --arch ../../../extern/architectures/ibmq_london.arch --ps;
181- ./qmap_heuristic.exe --in ../../../examples/3_17_13.qasm --out 3_17_13mh.qasm --arch ../../../extern/architectures/ibmq_london.arch --ps;
138+ working-directory : ${{github.workspace}}/build/test
139+ run : |
140+ cd $BUILD_TYPE
141+ ./qmap_exact_test
142+ ./qmap_heuristic_test
0 commit comments