Skip to content

Commit f911418

Browse files
committed
chore(ci): Build with pyproject-build
1 parent e1d1a0b commit f911418

File tree

1 file changed

+67
-9
lines changed

1 file changed

+67
-9
lines changed

.github/workflows/build_test_deploy.yml

Lines changed: 67 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,73 @@ jobs:
4646
with:
4747
fetch-depth: 0
4848
persist-credentials: false
49-
- uses: hynek/build-and-inspect-python-package@v2
49+
## Stuck on https://github.com/astral-sh/uv/issues/5450
50+
## or https://github.com/hynek/build-and-inspect-python-package/issues/155
51+
# - uses: hynek/build-and-inspect-python-package@v2
52+
# with:
53+
# upload-name-suffix: -main
54+
# attest-build-provenance-github: ${{ github.event_name != 'pull_request' }}
55+
# - uses: hynek/build-and-inspect-python-package@v2
56+
# with:
57+
# path: wrapper
58+
# upload-name-suffix: -wrapper
59+
# attest-build-provenance-github: ${{ github.event_name != 'pull_request' }}
60+
## Manually reproducing with pyproject-build
61+
## Probably slightly slower
62+
- name: Install the latest version of uv
63+
uses: astral-sh/setup-uv@v4
64+
- name: Build smriprep
65+
run: uvx --from=build pyproject-build --installer uv .
66+
- name: Upload smriprep as Packages-main
67+
uses: actions/upload-artifact@v4
5068
with:
51-
upload-name-suffix: -main
52-
attest-build-provenance-github: ${{ github.event_name != 'pull_request' }}
53-
- uses: hynek/build-and-inspect-python-package@v2
69+
name: Packages-main
70+
path: dist/
71+
72+
- name: Show package contents hierarchically, including metadata.
73+
shell: bash
74+
run: |
75+
echo -e '\n<details><summary>SDist contents</summary>\n' >> $GITHUB_STEP_SUMMARY
76+
tar -tvzf dist/*.tar.gz | sed 's/^/ /' | tee -a $GITHUB_STEP_SUMMARY
77+
echo -e '\n</details>\n' >> $GITHUB_STEP_SUMMARY
78+
79+
echo -e '\n<details><summary>Wheel contents</summary>\n' >> $GITHUB_STEP_SUMMARY
80+
unzip -l dist/*.whl | sed 's/^/ /' | tee -a $GITHUB_STEP_SUMMARY
81+
echo -e '\n</details>\n' >> $GITHUB_STEP_SUMMARY
82+
83+
echo ----- Metadata Follows -----
84+
echo -e '\n<details><summary>Metadata</summary>\n' >> $GITHUB_STEP_SUMMARY
85+
tar --wildcards -xOf dist/*.tar.gz "*/PKG-INFO" | sed 's/^/ /' | tee -a $GITHUB_STEP_SUMMARY
86+
echo -e '\n</details>\n' >> $GITHUB_STEP_SUMMARY
87+
echo ----- End of Metadata -----
88+
89+
- name: Report on smriprep packages
90+
run: |
91+
echo "name=Packages-main" >>${GITHUB_OUTPUT}
92+
- name: Build smriprep-docker
93+
run: uvx --from=build pyproject-build --installer uv ./wrapper
94+
- name: Upload smriprep as Packages-wrapper
95+
uses: actions/upload-artifact@v4
5496
with:
55-
path: wrapper
56-
upload-name-suffix: -wrapper
57-
attest-build-provenance-github: ${{ github.event_name != 'pull_request' }}
97+
name: Packages-wrapper
98+
path: wrapper/dist/
99+
100+
- name: Show package contents hierarchically, including metadata.
101+
shell: bash
102+
run: |
103+
echo -e '\n<details><summary>SDist contents</summary>\n' >> $GITHUB_STEP_SUMMARY
104+
tar -tvzf wrapper/dist/*.tar.gz | sed 's/^/ /' | tee -a $GITHUB_STEP_SUMMARY
105+
echo -e '\n</details>\n' >> $GITHUB_STEP_SUMMARY
106+
107+
echo -e '\n<details><summary>Wheel contents</summary>\n' >> $GITHUB_STEP_SUMMARY
108+
unzip -l wrapper/dist/*.whl | sed 's/^/ /' | tee -a $GITHUB_STEP_SUMMARY
109+
echo -e '\n</details>\n' >> $GITHUB_STEP_SUMMARY
110+
111+
echo ----- Metadata Follows -----
112+
echo -e '\n<details><summary>Metadata</summary>\n' >> $GITHUB_STEP_SUMMARY
113+
tar --wildcards -xOf wrapper/dist/*.tar.gz "*/PKG-INFO" | sed 's/^/ /' | tee -a $GITHUB_STEP_SUMMARY
114+
echo -e '\n</details>\n' >> $GITHUB_STEP_SUMMARY
115+
echo ----- End of Metadata -----
58116
59117
test:
60118
runs-on: ${{ matrix.os }}
@@ -83,7 +141,7 @@ jobs:
83141
with:
84142
persist-credentials: false
85143
- name: Install the latest version of uv
86-
uses: astral-sh/setup-uv@v3
144+
uses: astral-sh/setup-uv@v4
87145
- name: Set up Python ${{ matrix.python-version }}
88146
uses: actions/setup-python@v5
89147
with:
@@ -139,7 +197,7 @@ jobs:
139197
- run: ls -lR
140198

141199
- name: Install the latest version of uv
142-
uses: astral-sh/setup-uv@v3
200+
uses: astral-sh/setup-uv@v4
143201
- name: Set up Python ${{ matrix.python-version }}
144202
uses: actions/setup-python@v5
145203
with:

0 commit comments

Comments
 (0)