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
@@ -112,26 +113,44 @@ jobs:
112113 - name : Upload sdist
113114 uses : actions/upload-artifact@v7
114115 with :
115- name : cibw -sdist
116+ name : dist -sdist
116117 path : dist/*.tar.gz
117118 if-no-files-found : error
118119
120+ build_shim :
121+ name : QuantLib-Risks shim
122+ runs-on : ubuntu-24.04
123+ steps :
124+ - uses : actions/checkout@v7
125+ with :
126+ persist-credentials : false
127+ - name : Build sdist and wheel
128+ run : pipx run build --outdir dist shim
129+ - name : Check metadata
130+ run : pipx run twine check --strict dist/*
131+ - name : Upload shim
132+ uses : actions/upload-artifact@v7
133+ with :
134+ name : dist-shim
135+ path : dist/*
136+ if-no-files-found : error
137+
119138 test-publish :
120- needs : [build_wheels, build_sdist]
139+ needs : [build_wheels, build_sdist, build_shim ]
121140 if : >-
122- github.repository == 'auto-differentiation/QuantLib-Risks -Py' &&
141+ github.repository == 'auto-differentiation/QuantLibAAD -Py' &&
123142 (github.event_name == 'workflow_dispatch' ||
124143 (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')))
125144 environment :
126145 name : testpypi
127- url : https://test.pypi.org/p/QuantLib-Risks
146+ url : https://test.pypi.org/p/QuantLibAAD
128147 permissions :
129148 id-token : write
130149 runs-on : ubuntu-latest
131150 steps :
132151 - uses : actions/download-artifact@v8
133152 with :
134- pattern : cibw -*
153+ pattern : dist -*
135154 path : dist
136155 merge-multiple : true
137156 - uses : pypa/gh-action-pypi-publish@v1.14.3
@@ -147,13 +166,13 @@ jobs:
147166 if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
148167 environment :
149168 name : pypi
150- url : https://pypi.org/p/QuantLib-Risks
169+ url : https://pypi.org/p/QuantLibAAD
151170 permissions :
152171 id-token : write
153172 steps :
154173 - uses : actions/download-artifact@v8
155174 with :
156- pattern : cibw -*
175+ pattern : dist -*
157176 path : dist
158177 merge-multiple : true
159178 - uses : pypa/gh-action-pypi-publish@v1.14.3
0 commit comments