33# - OR pushes of tags starting with v*
44# - OR manual dispatch on repo
55# publishes to test pypi if:
6- # - in auto-differentiation/QuantLib-Risks -Py repository AND
6+ # - in auto-differentiation/QuantLibAAD -Py repository AND
77# - pushes of tags starting with v*
88# - OR manual dispatch on repo
99# publishes to real PyPI if:
1313# cibuildwheel settings live in [tool.cibuildwheel] in pyproject.toml:
1414# one job per platform + Python (the SWIG wrapper is a single slow TU);
1515# QuantLib is built in before-all, ccache shares its objects across a platform's jobs.
16+ # The QuantLib-Risks shim (shim/) is built and published alongside.
1617
17- name : QuantLib-Risks wheels
18+ name : QuantLibAAD wheels
1819on :
1920 pull_request :
2021 branches :
8990 - name : Upload wheels
9091 uses : actions/upload-artifact@v7
9192 with :
92- name : cibw -wheels-${{ matrix.platform.name }}-${{ matrix.python }}
93+ name : dist -wheels-${{ matrix.platform.name }}-${{ matrix.python }}
9394 path : ./wheelhouse/*.whl
9495 if-no-files-found : error
9596
@@ -108,26 +109,44 @@ jobs:
108109 - name : Upload sdist
109110 uses : actions/upload-artifact@v7
110111 with :
111- name : cibw -sdist
112+ name : dist -sdist
112113 path : dist/*.tar.gz
113114 if-no-files-found : error
114115
116+ build_shim :
117+ name : QuantLib-Risks shim
118+ runs-on : ubuntu-24.04
119+ steps :
120+ - uses : actions/checkout@v7
121+ with :
122+ persist-credentials : false
123+ - name : Build sdist and wheel
124+ run : pipx run build --outdir dist shim
125+ - name : Check metadata
126+ run : pipx run twine check --strict dist/*
127+ - name : Upload shim
128+ uses : actions/upload-artifact@v7
129+ with :
130+ name : dist-shim
131+ path : dist/*
132+ if-no-files-found : error
133+
115134 test-publish :
116- needs : [build_wheels, build_sdist]
135+ needs : [build_wheels, build_sdist, build_shim ]
117136 if : >-
118- github.repository == 'auto-differentiation/QuantLib-Risks -Py' &&
137+ github.repository == 'auto-differentiation/QuantLibAAD -Py' &&
119138 (github.event_name == 'workflow_dispatch' ||
120139 (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')))
121140 environment :
122141 name : testpypi
123- url : https://test.pypi.org/p/QuantLib-Risks
142+ url : https://test.pypi.org/p/QuantLibAAD
124143 permissions :
125144 id-token : write
126145 runs-on : ubuntu-latest
127146 steps :
128147 - uses : actions/download-artifact@v8
129148 with :
130- pattern : cibw -*
149+ pattern : dist -*
131150 path : dist
132151 merge-multiple : true
133152 - uses : pypa/gh-action-pypi-publish@v1.14.3
@@ -143,13 +162,13 @@ jobs:
143162 if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
144163 environment :
145164 name : pypi
146- url : https://pypi.org/p/QuantLib-Risks
165+ url : https://pypi.org/p/QuantLibAAD
147166 permissions :
148167 id-token : write
149168 steps :
150169 - uses : actions/download-artifact@v8
151170 with :
152- pattern : cibw -*
171+ pattern : dist -*
153172 path : dist
154173 merge-multiple : true
155174 - uses : pypa/gh-action-pypi-publish@v1.14.3
0 commit comments