-
Notifications
You must be signed in to change notification settings - Fork 48
204 lines (204 loc) · 6.47 KB
/
build-without-conan.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
name: build without conan
on:
schedule:
# 01:00 every Monday morning
- cron: '0 1 * * 1'
workflow_dispatch: {}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build_and_test:
runs-on: ubuntu-22.04
env:
INSTALL_DIR: "/home/runner/local"
TMP_DIR: "/home/runner/tmp"
steps:
- uses: actions/checkout@v3
- name: Create directories
run: |
mkdir ${INSTALL_DIR}
mkdir ${TMP_DIR}
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
key: no-conan-build-ubuntu-22.04
- name: install ninja
run: |
sudo apt update
sudo apt install ninja-build
- name: Install boost
run: |
cd ${TMP_DIR}
wget -O boost_1_82_0.tar.gz https://sourceforge.net/projects/boost/files/boost/1.82.0/boost_1_82_0.tar.gz/download
tar xzvf boost_1_82_0.tar.gz
cd boost_1_82_0/
./bootstrap.sh --prefix=${INSTALL_DIR}
./b2
./b2 install
# gmp already installed
- name: Install symengine
run: |
cd ${TMP_DIR}
wget https://github.com/symengine/symengine/releases/download/v0.10.1/symengine-0.10.1.tar.gz
tar xzvf symengine-0.10.1.tar.gz
cd symengine-0.10.1/
mkdir build
cd build
cmake -GNinja -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} -DBUILD_TESTS=OFF -DBUILD_BENCHMARKS=OFF ..
cmake --build . -j2
cmake --install .
- name: Install eigen
run: |
cd ${TMP_DIR}
wget https://gitlab.com/libeigen/eigen/-/archive/3.4.0/eigen-3.4.0.tar.bz2
bzip2 -dk eigen-3.4.0.tar.bz2
tar xvf eigen-3.4.0.tar
cd eigen-3.4.0/
mkdir build
cd build
cmake -GNinja -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} ..
cmake --build .
cmake --install .
- name: Install nlohmann_json
run: |
cd ${TMP_DIR}
wget https://github.com/nlohmann/json/releases/download/v3.11.2/json.tar.xz
tar xvf json.tar.xz
cd json/
mkdir build
cd build
cmake -GNinja -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} -DJSON_BuildTests=OFF ..
cmake --build .
cmake --install .
- name: Install catch2
run: |
cd ${TMP_DIR}
wget https://github.com/catchorg/Catch2/archive/refs/tags/v3.3.2.tar.gz
tar xzvf v3.3.2.tar.gz
cd Catch2-3.3.2/
mkdir build
cd build
cmake -GNinja -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} ..
cmake --build . -j2
cmake --install .
- name: Install rapidcheck
run: |
cd ${TMP_DIR}
wget https://github.com/emil-e/rapidcheck/archive/8fafda42e732164db58003e542196e94a28481f9.zip
unzip 8fafda42e732164db58003e542196e94a28481f9.zip
cd rapidcheck-8fafda42e732164db58003e542196e94a28481f9/
mkdir build
cd build
cmake -GNinja -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} ..
cmake --build . -j2
cmake --install .
- name: Install pybind11
run: |
cd ${TMP_DIR}
wget https://github.com/pybind/pybind11/archive/refs/tags/v2.11.1.tar.gz
tar xzvf v2.11.1.tar.gz
cd pybind11-2.11.1/
mkdir build
cd build
cmake -GNinja -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} -DPYBIND11_TEST=OFF ..
cmake --build .
cmake --install .
- name: Install pybind11_json
run: |
cd ${TMP_DIR}
wget https://github.com/pybind/pybind11_json/archive/refs/tags/0.2.13.tar.gz
tar xzvf 0.2.13.tar.gz
cd pybind11_json-0.2.13/
mkdir build
cd build
cmake -GNinja -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} ..
cmake --build .
cmake --install .
- name: Install tklog
run: |
cd libs/tklog/
mkdir build
cd build
cmake -GNinja -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} ..
cmake --build . -j2
cmake --install .
- name: Install tkrng
run: |
cd libs/tkrng/
mkdir build
cd build
cmake -GNinja -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} -DCMAKE_POSITION_INDEPENDENT_CODE=ON ..
cmake --build . -j2
cmake --install .
- name: Install tkassert
run: |
cd libs/tkassert/
mkdir build
cd build
cmake -GNinja -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} -DCMAKE_POSITION_INDEPENDENT_CODE=ON ..
cmake --build . -j2
cmake --install .
- name: Install tkwsm
run: |
cd libs/tkwsm/
mkdir build
cd build
cmake -GNinja -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} -DCMAKE_POSITION_INDEPENDENT_CODE=ON ..
cmake --build . -j2
cmake --install .
- name: Install tktokenswap
run: |
cd libs/tktokenswap/
mkdir build
cd build
cmake -GNinja -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} -DCMAKE_POSITION_INDEPENDENT_CODE=ON ..
cmake --build . -j2
cmake --install .
- name: Install tket
run: |
cd tket
mkdir build
cd build
cmake -GNinja -DBUILD_TKET_TEST=ON -DBUILD_TKET_PROPTEST=ON -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} -DCMAKE_POSITION_INDEPENDENT_CODE=ON ..
cmake --build . -j2
cmake --install .
- name: Install runtime test requirements
run: |
sudo apt update
sudo apt install texlive texlive-latex-extra latexmk
mkdir -p ~/texmf/tex/latex
wget http://mirrors.ctan.org/graphics/pgf/contrib/quantikz/tikzlibraryquantikz.code.tex -P ~/texmf/tex/latex
- name: Run test-tket
run: |
cd ${INSTALL_DIR}/bin
./test-tket
- name: Run proptest-tket
run: |
cd ${INSTALL_DIR}/bin
./proptest-tket
- name: Install tklog (shared)
run: |
cd libs/tklog/build
cmake -GNinja -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} -DBUILD_SHARED_LIBS=1 ..
cmake --build . -j2
cmake --install .
- name: Install tket (shared)
run: |
cd tket/build
cmake -GNinja -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} -DBUILD_SHARED_LIBS=1 -DCMAKE_BUILD_WITH_INSTALL_RPATH=1 -DCMAKE_INSTALL_RPATH="\${ORIGIN}" ..
cmake --build . -j2
cmake --install .
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install pytket
run: |
cd pytket
NO_CONAN=1 pip install -v -e .
- name: test pytket
run: |
cd pytket/tests
pip install -r requirements.txt
pytest