Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update GitLab support #1295

Merged
merged 9 commits into from Oct 12, 2022
13 changes: 13 additions & 0 deletions .gitlab-ci.yml
Expand Up @@ -17,3 +17,16 @@ linux:
- curl -sSL https://get.docker.com/ | sh
- python -m pip install -e ".[dev]" pytest-custom-exit-code
- python ./bin/run_tests.py

windows:
image: mcr.microsoft.com/windows/servercore:1809
variables:
PYTEST_ADDOPTS: -k "unit_test or test_0_basic" --suppress-no-test-exit-code
before_script:
- choco install python -y --version 3.8.6
script:
- py -m cibuildwheel --output-dir wheelhouse --platform windows
- py -m pip install -e ".[dev]" pytest-custom-exit-code
- py bin\run_tests.py
tags:
- windows
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -58,7 +58,7 @@ Usage
| Travis CI | ✅ | | ✅ | ✅ | | |
| AppVeyor | ✅ | ✅ | ✅ | | ✅² | ✅⁴ |
| CircleCI | ✅ | ✅ | | | ✅² | |
| Gitlab CI | ✅ | | | | | |
| Gitlab CI | ✅ | | | ✅¹ | | |
| Cirrus CI | ✅ | ✅³ | ✅ | ✅ | ✅ | |

<sup>¹ [Requires emulation](https://cibuildwheel.readthedocs.io/en/stable/faq/#emulation), distributed separately. Other services may also support Linux ARM through emulation or third-party build hosts, but these are not tested in our CI.</sup><br>
Expand Down
8 changes: 7 additions & 1 deletion docs/data/projects.yml
Expand Up @@ -204,6 +204,12 @@
ci: [github]
os: [windows, apple, linux]

- name: pybind11 cross build example
gh: wbarnha/pybind_cmake_example_crossbuild
ci: [github, gitlab]
os: [windows, apple, linux]
notes: Same as pybind11 cmake_example but used to demo Linux ARM + Windows + macOS builds on GitLab

- name: iminuit
gh: scikit-hep/iminuit
ci: [github]
Expand Down Expand Up @@ -599,7 +605,7 @@
gh: tensorchord/envd
ci: [github]
os: [apple, linux, windows]
note: A machine learning development environment build toool
note: A machine learning development environment build tool

- name: mosec
gh: mosecorg/mosec
Expand Down
14 changes: 14 additions & 0 deletions examples/gitlab-minimal.yml
Expand Up @@ -17,3 +17,17 @@ linux:
artifacts:
paths:
- wheelhouse/

windows:
image: mcr.microsoft.com/windows/servercore:1809
before_script:
- choco install python -y --version 3.8.6
- choco install git.install -y
- py -m pip install cibuildwheel==2.10.2
script:
- py -m cibuildwheel --output-dir wheelhouse --platform windows
artifacts:
paths:
- wheelhouse/
tags:
- windows
22 changes: 22 additions & 0 deletions examples/gitlab-with-qemu.yml
@@ -0,0 +1,22 @@
linux:
image: python:3.8
# make a docker daemon available for cibuildwheel to use
services:
- name: docker:dind
entrypoint: ["env", "-u", "DOCKER_HOST"]
command: ["dockerd-entrypoint.sh"]
variables:
DOCKER_HOST: tcp://docker:2375/
DOCKER_DRIVER: overlay2
# See https://github.com/docker-library/docker/pull/166
DOCKER_TLS_CERTDIR: ""
script:
- curl -sSL https://get.docker.com/ | sh
# Warning: This is extremely slow, be careful with how many wheels you build
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- python -m pip install cibuildwheel==2.10.2
# Assuming your CI runner's default architecture is x86_64...
- cibuildwheel --output-dir wheelhouse --platform linux --archs aarch64
artifacts:
paths:
- wheelhouse/