Skip to content

Commit 10192bb

Browse files
committed
Separate out sdist job
1 parent 4c1a9f0 commit 10192bb

1 file changed

Lines changed: 22 additions & 10 deletions

File tree

.github/workflows/code.yml

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,25 @@ jobs:
3030
- name: Lint
3131
run: flake8
3232

33+
sdist:
34+
runs-on: "ubuntu-latest"
35+
steps:
36+
- name: Checkout Source
37+
uses: actions/checkout@v2
38+
with:
39+
# require history to get back to last tag for version number of branches
40+
fetch-depth: 0
41+
submodules: true
42+
43+
- name: Build Sdist
44+
run: pipx run build --sdist .
45+
46+
- name: Upload Sdist
47+
uses: actions/upload-artifact@v2
48+
with:
49+
name: dist
50+
path: dist/*
51+
3352
build:
3453
strategy:
3554
fail-fast: false
@@ -50,9 +69,6 @@ jobs:
5069
- os: ubuntu-latest
5170
cov_file: /output/coverage.xml
5271
results_file: /output/pytest-results.xml
53-
# Build an sdist on linux so it has the right line endings
54-
- os: ubuntu-latest
55-
sdist: true
5672

5773
name: build/${{ matrix.os }}/${{ matrix.python }}
5874
runs-on: ${{ matrix.os }}
@@ -74,10 +90,6 @@ jobs:
7490
# Pin cibuildwheel due to https://github.com/pypa/cibuildwheel/issues/962
7591
run: pip install build cibuildwheel>=2.3.1
7692

77-
- name: Build Sdist
78-
if: matrix.sdist
79-
run: python -m build --sdist .
80-
8193
- name: Build Wheel
8294
run: cibuildwheel --output-dir dist
8395
env:
@@ -95,7 +107,7 @@ jobs:
95107
CIBW_ENVIRONMENT_LINUX: SETUPTOOLS_DSO_PLAT_NAME=manylinux2014_x86_64
96108
CIBW_SKIP: "*-musllinux*" # epicscorelibs doesn't build on musllinux platforms
97109

98-
- name: Upload Wheel and Sdist
110+
- name: Upload Wheel
99111
uses: actions/upload-artifact@v2
100112
with:
101113
name: dist
@@ -131,8 +143,8 @@ jobs:
131143
with:
132144
files: artifacts/**/*.xml
133145

134-
sdist:
135-
needs: [build]
146+
test-sdist:
147+
needs: [sdist]
136148
strategy:
137149
fail-fast: false
138150
matrix:

0 commit comments

Comments
 (0)