@@ -18,85 +18,68 @@ Finally, the tests can also run against the wheels.
1818 * `Docs <https://cibuildwheel.pypa.io/ >`_
1919 * `GitHub <https://github.com/pypa/cibuildwheel >`_
2020
21- GitHub Actions
22- --------------
21+ .. _cibuildwheel-in-gitlab-ci : GitLab CI/CD
2322
24- To build Linux, macOS, and Windows wheels, create a
25- :file: `.github/workflows/build_wheels.yml ` file in your GitHub repo:
23+ .. tab :: GitHub Actions
2624
27- .. literalinclude :: .github/workflows/build_wheels.yml
28- :language: yaml
29- :lines: 1-7
25+ To build Linux, macOS, and Windows wheels, create a
26+ :file: `.github/workflows/build_wheels.yml ` file in your GitHub repo:
3027
31- `` workflow_dispatch ``
32- allows you to click a button in the graphical user interface to trigger a
33- build. This is perfect for manually testing wheels before a release, as you
34- can easily download them from * artifacts *.
28+ .. literalinclude :: .github/workflows/build_wheels.yml
29+ :caption: .github/workflows/build_wheels.yml
30+ :language: yaml
31+ :lines: 1-7
3532
36- .. seealso ::
37- * `workflow_dispatch
38- <https://github.blog/changelog/2020-07-06-github-actions-manual-triggers-with-workflow_dispatch/> `_
39-
40- ``release ``
41- is executed when a tagged version is transferred.
42-
43- .. seealso ::
44- * `release
45- <https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#release> `_
46-
47- Now the :term: `wheels <wheel> ` can be built with:
33+ ``workflow_dispatch ``
34+ allows you to click a button in the graphical user interface to trigger
35+ a build. This is perfect for manually testing wheels before a release,
36+ as you can easily download them from *artifacts *.
4837
49- .. literalinclude :: .github/workflows/build_wheels.yml
50- :language: yaml
51- :lines: 9-21
38+ .. seealso ::
39+ * ` workflow_dispatch
40+ <https://github.blog/changelog/2020-07-06-github-actions-manual-triggers-with-workflow_dispatch/> `_
5241
53- This runs the CI workflow with the following default settings:
42+ ``release ``
43+ is executed when a tagged version is transferred.
5444
55- * `` package-dir: . ``
56- * `` output-dir: wheelhouse ``
57- * `` config-file: "{package}/pyproject.toml" ``
45+ .. seealso ::
46+ * `release
47+ <https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#release> `_
5848
59- You can also extend the file to automatically upload the wheels to the
60- :term: `Python Package Index ` (:term: `PyPI `). For this, however, you should first
61- create a :term: `source distribution `, for example with:
49+ Now the :term: `wheels <wheel> ` can be built with:
6250
63- .. literalinclude :: .github/workflows/build_wheels.yml
64- :language: yaml
65- :lines: 27-41
51+ .. literalinclude :: .github/workflows/build_wheels.yml
52+ :language: yaml
53+ :lines: 9-22
6654
67- In addition, this GitHub workflow must be set in the PyPI settings of your
68- project:
55+ This runs the CI workflow with the following default settings:
6956
70- * `Creating a PyPI project with a trusted publisher
71- <https://docs.pypi.org/trusted-publishers/creating-a-project-through-oidc> `_
72- * `Adding a trusted publisher to an existing PyPI project
73- <https://docs.pypi.org/trusted-publishers/adding-a-publisher> `_
57+ * ``package-dir: . ``
58+ * ``output-dir: wheelhouse ``
59+ * ``config-file: "{package}/pyproject.toml" ``
7460
75- Now you can finally upload the artefacts of both jobs to the :term: `PyPI `:
76-
77- .. literalinclude :: .github/workflows/build_wheels.yml
78- :language: yaml
79- :lines: 43-
61+ .. seealso ::
62+ * `Workflow syntax for GitHub Actions
63+ <https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions> `_
8064
81- .. seealso ::
82- * `Workflow syntax for GitHub Actions
83- <https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions> `_
65+ Now you can finally upload the artefacts of both jobs to the :term: `PyPI `:
8466
85- .. _cibuildwheel-in-gitlab-ci :
67+ .. literalinclude :: .github/workflows/build_wheels.yml
68+ :language: yaml
69+ :lines: 24-
8670
87- GitLab CI/CD
88- ------------
71+ .. tab :: GitLab CI/CD
8972
90- To build Linux wheels with
91- :doc: `Python4DataScience:productive/git/advanced/gitlab/ci-cd `, create a
92- :file: `.gitlab-ci.yml ` file in your repository:
73+ To build wheels for Linux, macOS, and Windows with
74+ :doc: `Python4DataScience:productive/git/advanced/gitlab/ci-cd `, create a
75+ :file: `.gitlab-ci.yml ` file in your repository:
9376
94- .. literalinclude :: .gitlab-ci.yml
95- :language: yaml
77+ .. literalinclude :: .gitlab-ci.yml
78+ :language: yaml
9679
97- .. seealso ::
98- * `Keyword reference for the .gitlab-ci.yml file
99- <https://docs.gitlab.com/ee/ci/yaml/> `_
80+ .. seealso ::
81+ * `Keyword reference for the .gitlab-ci.yml file
82+ <https://docs.gitlab.com/ee/ci/yaml/> `_
10083
10184Options
10285-------
0 commit comments