Skip to content

Commit 6083235

Browse files
committed
CI: Cache git-archive separately from Python packages
1 parent b9c5451 commit 6083235

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

.github/workflows/stable.yml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,17 @@ jobs:
4646
run: python -m build
4747
- run: twine check dist/*
4848
- name: Build git archive
49-
run: git archive -v -o dist/nibabel-archive.tgz HEAD
50-
- uses: actions/upload-artifact@v3
49+
run: mkdir archive && git archive -v -o archive/nibabel-archive.tgz HEAD
50+
- name: Upload sdist and wheel artifacts
51+
uses: actions/upload-artifact@v3
5152
with:
5253
name: dist
5354
path: dist/
55+
- name: Upload git archive artifact
56+
uses: actions/upload-artifact@v3
57+
with:
58+
name: archive
59+
path: archive/
5460

5561
test-package:
5662
runs-on: ubuntu-latest
@@ -59,10 +65,18 @@ jobs:
5965
matrix:
6066
package: ['wheel', 'sdist', 'archive']
6167
steps:
62-
- uses: actions/download-artifact@v3
68+
- name: Download sdist and wheel artifacts
69+
uses: actions/download-artifact@v3
6370
with:
6471
name: dist
6572
path: dist/
73+
if: matrix.package != 'archive'
74+
- name: Download git archive artifact
75+
uses: actions/download-artifact@v3
76+
with:
77+
name: archive
78+
path: archive/
79+
if: matrix.package == 'archive'
6680
- uses: actions/setup-python@v4
6781
with:
6882
python-version: 3
@@ -77,7 +91,7 @@ jobs:
7791
run: pip install dist/nibabel-*.tar.gz
7892
if: matrix.package == 'sdist'
7993
- name: Install archive
80-
run: pip install dist/nibabel-archive.tgz
94+
run: pip install archive/nibabel-archive.tgz
8195
if: matrix.package == 'archive'
8296
- run: python -c 'import nibabel; print(nibabel.__version__)'
8397
- name: Install test extras

0 commit comments

Comments
 (0)