Skip to content

Commit

Permalink
Merge pull request #1295 from wbarnha/extend-gitlab-qemu
Browse files Browse the repository at this point in the history
Update GitLab support
  • Loading branch information
joerick authored Oct 12, 2022
2 parents 27be463 + f869909 commit d7f615a
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 2 deletions.
13 changes: 13 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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/

0 comments on commit d7f615a

Please sign in to comment.