-
Notifications
You must be signed in to change notification settings - Fork 2
95 lines (78 loc) · 2.24 KB
/
build-and-deploy.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: Build and upload
on:
pull_request:
push:
tags:
- "*"
branches:
- "main"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Setup Miniconda (Windows)
if: runner.os == 'Windows'
uses: conda-incubator/[email protected]
- name: Install Dependencies (Windows)
if: runner.os == 'Windows'
shell: powershell
run: conda install -c conda-forge mpir -y
- name: Set env (Windows)
if: runner.os == 'Windows'
run: |
echo "appdata=$env:LOCALAPPDATA" >> ${env:GITHUB_ENV}
echo "GMP_INC=C:\Miniconda\envs\test\Library\include" >> ${env:GITHUB_ENV}
echo "GMP_LIB=C:\Miniconda\envs\test\Library\lib" >> ${env:GITHUB_ENV}
- name: Build wheels
uses: pypa/[email protected]
- name: List generated wheels
run: ls ./wheelhouse/*
- uses: actions/upload-artifact@v4
with:
path: ./wheelhouse/*.whl
name: pytetwild-wheel-${{ matrix.os }}
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install \
libblas-dev \
libboost-filesystem-dev \
libboost-system-dev \
libboost-thread-dev \
libglu1-mesa-dev \
libsuitesparse-dev \
xorg-dev \
ccache
- name: Build source distribution
run: |
pipx run build --sdist
- name: Validate
run: |
pip install twine
twine check dist/*
- name: Install from dist/
run: pip install --find-links=dist/ pytetwild[dev]
- name: Test
run: pytest -vv
- uses: actions/upload-artifact@v4
with:
path: dist/*.tar.gz
name: pytetwild-sdist