-
-
Notifications
You must be signed in to change notification settings - Fork 18
61 lines (50 loc) · 1.65 KB
/
wheels-source.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
# Workflow to build and test wheels
name: Wheel builder sdist
on:
push:
tags:
- 'v*'
jobs:
# Check whether to build the wheels and the source tarball
check_build_trigger:
name: Check build trigger
runs-on: ubuntu-latest
if: github.repository == 'nrl-ai/daisykit'
outputs:
build: ${{ steps.check_build_trigger.outputs.build }}
steps:
- name: Checkout daisykit
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
- id: check_build_trigger
name: Check build trigger
run: bash build_tools/github/check_build_trigger.sh
# Build the source distribution under Linux
build_sdist:
name: Source distribution
runs-on: ubuntu-latest
needs: check_build_trigger
if: needs.check_build_trigger.outputs.build
steps:
- name: Checkout daisykit
uses: actions/checkout@v1
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.9' # update once build dependencies are available
- name: Build source distribution
run: bash build_tools/github/build_source.sh
- name: Test source distribution
run: bash build_tools/github/test_source.sh
env:
OMP_NUM_THREADS: 2
OPENBLAS_NUM_THREADS: 2
- name: Store artifacts
uses: actions/upload-artifact@v2
with:
path: dist/*.tar.gz
- name: Upload dist for daisykit
run: |
python -m pip install twine
python -m twine upload -u ${{ secrets.DAISYKIT_PYPI_USERNAME }} -p ${{ secrets.DAISYKIT_PYPI_PASSWORD }} --skip-existing dist/*.tar.gz