Skip to content

build without conan #104

build without conan

build without conan #104

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-24.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-24.04
- name: install ninja
run: |
sudo apt update
sudo apt install ninja-build
- name: Install boost
run: |
cd ${TMP_DIR}
wget -O boost_1_86_0.tar.gz https://sourceforge.net/projects/boost/files/boost/1.86.0/boost_1_86_0.tar.gz/download
tar xzvf boost_1_86_0.tar.gz
cd boost_1_86_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/archive/refs/tags/v0.13.0.tar.gz
tar xzvf v0.13.0.tar.gz
cd symengine-0.13.0/
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.3/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.7.1.tar.gz
tar xzvf v3.7.1.tar.gz
cd Catch2-3.7.1/
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/1c91f40e64d87869250cfb610376c629307bf77d.zip
unzip 1c91f40e64d87869250cfb610376c629307bf77d.zip
cd rapidcheck-1c91f40e64d87869250cfb610376c629307bf77d/
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.13.6.tar.gz
tar xzvf v2.13.6.tar.gz
cd pybind11-2.13.6/
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.14.tar.gz
tar xzvf 0.2.14.tar.gz
cd pybind11_json-0.2.14/
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.11
uses: actions/setup-python@v5
with:
python-version: '3.11'
- 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