|
| 1 | +#!/bin/bash |
| 2 | + |
| 3 | +# Copyright Quantinuum |
| 4 | +# |
| 5 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | +# you may not use this file except in compliance with the License. |
| 7 | +# You may obtain a copy of the License at |
| 8 | +# |
| 9 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# |
| 11 | +# Unless required by applicable law or agreed to in writing, software |
| 12 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | +# See the License for the specific language governing permissions and |
| 15 | +# limitations under the License. |
| 16 | + |
| 17 | +set -evu |
| 18 | + |
| 19 | +cd /tket |
| 20 | + |
| 21 | +export PYBIN=/opt/python/cp312-cp312/bin |
| 22 | +export PYEX=${PYBIN}/python |
| 23 | +${PYEX} -m venv env |
| 24 | +${PYEX} -m pip install conan |
| 25 | +CONAN_CMD=${PYBIN}/conan |
| 26 | +${CONAN_CMD} profile detect |
| 27 | +DEFAULT_PROFILE_PATH=`${CONAN_CMD} profile path default` |
| 28 | +PROFILE_PATH=./conan-profiles/${CONAN_PROFILE} |
| 29 | +diff ${DEFAULT_PROFILE_PATH} ${PROFILE_PATH} || true |
| 30 | +cp ${PROFILE_PATH} ${DEFAULT_PROFILE_PATH} |
| 31 | +${CONAN_CMD} remote add tket-libs https://quantinuumsw.jfrog.io/artifactory/api/conan/tket1-libs --index 0 |
| 32 | + |
| 33 | +# Build tket and tket-c-api |
| 34 | +${CONAN_CMD} create tket --user=tket --channel=stable -o boost/*:header_only=True |
| 35 | +${CONAN_CMD} create tket-c-api -s build_type=Release --user=tket --channel=stable -o boost/*:header_only=True |
| 36 | + |
| 37 | +# Upload to artifactory |
| 38 | +${CONAN_CMD} upload tket/${TKET_VERSION}@tket/stable -r=tket-libs |
| 39 | +${CONAN_CMD} upload tket-c-api/${TKET_VERSION}@tket/stable -r=tket-libs |
0 commit comments