-
Notifications
You must be signed in to change notification settings - Fork 4
47 lines (37 loc) · 1.3 KB
/
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
name: Build wheels
on:
# push:
workflow_dispatch:
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macOS-latest]
steps:
- uses: actions/checkout@v3
# Used to host cibuildwheel
- uses: actions/setup-python@v3
- name: Install cibuildwheel
run: python -m pip install cibuildwheel
- name: Build wheels
env:
CIBW_BEFORE_ALL: >
cd /tmp/ &&
git clone https://github.com/kimwalisch/primecount &&
cd primecount &&
export CXXFLAGS="-fPIC" &&
export LDFLAGS="-fPIC"
CIBW_BEFORE_BUILD_LINUX: >
cd /tmp/primecount &&
cmake . -DWITH_OPENMP=OFF -DCMAKE_VERBOSE_MAKEFILE=TRUE -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=OFF &&
make && make install
CIBW_BEFORE_BUILD_MACOS: >
cd /tmp/primecount &&
cmake . -DWITH_OPENMP=OFF -DCMAKE_VERBOSE_MAKEFILE=TRUE -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON &&
make && make install
run: python -m cibuildwheel --output-dir wheelhouse
- uses: actions/upload-artifact@v2
with:
path: ./wheelhouse/*.whl