-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (39 loc) · 1.13 KB
/
ci.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
name: ci
on: push
jobs:
test:
runs-on: [self-hosted, gpu]
steps:
- uses: actions/checkout@v3
- name: test gpu is available
run: nvidia-smi
- name: build image
run: make build
- name: test-no-docker
run: make test-no-docker
- name: test
run: make test
- name: test-no-gpu
run: make test-no-gpu
publish-to-pypi-and-github-release:
if: "startsWith(github.ref, 'refs/tags/')"
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@master
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install pypa/build
run: python -m pip install --upgrade setuptools build twine
- name: Build a source tarball and wheel
run: python -m build .
- name: Publish package to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: python -m twine upload dist/*
# doesn't work in private repos
# - name: Github Release
# uses: softprops/action-gh-release@v1