-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
643 additions
and
327 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
stages: | ||
- build | ||
- publish | ||
- release | ||
|
||
.if-tag: &if-tag | ||
if: "$CI_COMMIT_TAG =~ /^qi-python-v/" | ||
|
||
build-wheel: | ||
stage: build | ||
rules: | ||
# Allow manually building on a Git commit on any branch. | ||
- if: $CI_COMMIT_BRANCH | ||
when: manual | ||
# Always build on a Git tag. | ||
- <<: *if-tag | ||
tags: | ||
- docker | ||
image: python:3.8 | ||
variables: | ||
LIBQI_REPOSITORY_URL: "https://gitlab-ci-token:$CI_JOB_TOKEN@$CI_SERVER_HOST/qi/libqi" | ||
script: | ||
- curl -sSL https://get.docker.com/ | sh | ||
- pip install cibuildwheel==2.14.1 | ||
- cibuildwheel --output-dir wheelhouse | ||
artifacts: | ||
paths: | ||
- wheelhouse/ | ||
|
||
publish-wheel: | ||
stage: publish | ||
image: python:latest | ||
rules: | ||
- <<: *if-tag | ||
needs: | ||
- build-wheel | ||
script: | ||
- pip install build twine | ||
- python -m build | ||
- TWINE_PASSWORD="${CI_JOB_TOKEN}" | ||
TWINE_USERNAME=gitlab-ci-token | ||
python -m twine upload | ||
--repository-url "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi" | ||
wheelhouse/* | ||
|
||
create-release: | ||
stage: release | ||
rules: | ||
- <<: *if-tag | ||
script: | ||
- echo "Releasing $CI_COMMIT_TAG." | ||
release: | ||
tag_name: $CI_COMMIT_TAG | ||
name: 'lib$CI_COMMIT_TITLE' | ||
description: '$CI_COMMIT_TAG_MESSAGE' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/sh | ||
set -x -e | ||
|
||
PACKAGE=$1 | ||
|
||
pip install 'conan>=2' 'cmake>=3.23' ninja | ||
|
||
# Perl dependencies required to build OpenSSL. | ||
yum install -y perl-IPC-Cmd perl-Digest-SHA | ||
|
||
# Install Conan configuration. | ||
conan config install "$PACKAGE/ci/conan" | ||
|
||
# Clone and export libqi to Conan cache. | ||
QI_VERSION=$(sed -nE '/^\s*requires\s*=/,/^\s*]/{ s/\s*"qi\/([^"]+)".*/\1/p }' "$PACKAGE/conanfile.py") | ||
|
||
GIT_SSL_NO_VERIFY=true \ | ||
git clone --depth=1 \ | ||
--branch "qi-framework-v${QI_VERSION}" \ | ||
"$LIBQI_REPOSITORY_URL" \ | ||
/work/libqi | ||
conan export /work/libqi --version="${QI_VERSION}" | ||
|
||
# Install dependencies of libqi-python from Conan, including libqi. | ||
# | ||
# Build everything from sources, so that we do not reuse precompiled binaries. | ||
# This is because the GLIBC from the manylinux images are often older than the | ||
# ones that were used to build the precompiled binaries, which means the binaries | ||
# cannot by executed. | ||
conan install "$PACKAGE" --build="*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
core:default_profile=default | ||
core:default_build_profile=default | ||
tools.build:skip_test=true | ||
tools.cmake.cmaketoolchain:generator=Ninja | ||
# Only use the build_type as a variable for the build folder name, so | ||
# that the generated CMake preset is named "conan-release". | ||
tools.cmake.cmake_layout:build_folder_vars=["settings.build_type"] |
Oops, something went wrong.