-
Notifications
You must be signed in to change notification settings - Fork 1
61 lines (49 loc) · 1.55 KB
/
ci-wheels.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# A workflow to build + test PyPI sdist/bdist artifacts
# (but not publish, as this is tricky without continuous automatic version generation)
#
# Reference:
# - https://github.com/actions/checkout
# - https://github.com/actions/download-artifact
# - https://github.com/actions/setup-python
# - https://github.com/actions/upload-artifact
# - https://github.com/pypa/build
name: ci-wheels
on: [pull_request, push]
jobs:
build-artifacts:
name: "Build PyPI artifacts"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: "Build sdist/bdist"
run: |
# ugrid-checks is a pure python package, so simply use pypa/build
pipx run build
- name: "Show sdist/bdist"
run: |
ls -l ${{ github.workspace }}/dist
- uses: actions/upload-artifact@v4
with:
name: pypi-artifacts
path: ${{ github.workspace }}/dist
test-artifacts:
needs: [build-artifacts]
name: "Test bdist"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"
- uses: actions/download-artifact@v4
with:
name: pypi-artifacts
path: ${{ github.workspace }}/dist
- name: "Install and import bdist"
working-directory: ${{ github.workspace }}/dist
run: |
python -m pip install ugrid_checks-*.whl
python -c "import ugrid_checks; print(f'Successfully imported ugrid-checks-{ugrid_checks.__version__}')"
echo "All done 👍"