diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 5f6d0deb..b9f711cf 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -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
diff --git a/README.md b/README.md
index 03d71f9b..7b68e682 100644
--- a/README.md
+++ b/README.md
@@ -58,7 +58,7 @@ Usage
| Travis CI | ✅ | | ✅ | ✅ | | |
| AppVeyor | ✅ | ✅ | ✅ | | ✅² | ✅⁴ |
| CircleCI | ✅ | ✅ | | | ✅² | |
-| Gitlab CI | ✅ | | | | | |
+| Gitlab CI | ✅ | | ✅ | ✅¹ | | |
| Cirrus CI | ✅ | ✅³ | ✅ | ✅ | ✅ | |
¹ [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.
diff --git a/docs/data/projects.yml b/docs/data/projects.yml
index 5129dbb6..e25ed35b 100644
--- a/docs/data/projects.yml
+++ b/docs/data/projects.yml
@@ -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]
@@ -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
diff --git a/examples/gitlab-minimal.yml b/examples/gitlab-minimal.yml
index cb1be4f9..f5883f61 100644
--- a/examples/gitlab-minimal.yml
+++ b/examples/gitlab-minimal.yml
@@ -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
diff --git a/examples/gitlab-with-qemu.yml b/examples/gitlab-with-qemu.yml
new file mode 100644
index 00000000..1f5b11b4
--- /dev/null
+++ b/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/