Skip to content

build without conan #46

build without conan

build without conan #46

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@v4
- name: Create directories
run: |
mkdir ${INSTALL_DIR}
mkdir ${TMP_DIR}
- name: ccache
uses: hendrikmuhs/[email protected]
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_83_0.tar.gz https://sourceforge.net/projects/boost/files/boost/1.83.0/boost_1_83_0.tar.gz/download
tar xzvf boost_1_83_0.tar.gz
cd boost_1_83_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.11.1/symengine-0.11.1.tar.gz
tar xzvf symengine-0.11.1.tar.gz
cd symengine-0.11.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