-
-
Notifications
You must be signed in to change notification settings - Fork 37
64 lines (55 loc) · 1.63 KB
/
wasm.yml
File metadata and controls
64 lines (55 loc) · 1.63 KB
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
name: Python wheels for WASM
on:
push:
tags:
- '*'
pull_request:
branches:
- main
env:
CIBW_BUILD_VERBOSITY: 1
# cibuildwheel cannot choose for a specified version of pyodide yet
# PYODIDE_VERSION: 0.27.2
jobs:
build_wheels_wasm:
name: Build and test wheels for WASM on ${{ matrix.os }} for ${{ matrix.p_ver }}
runs-on: ubuntu-latest
permissions:
contents: write
env:
CIBW_BUILD: ${{ matrix.cibw_build }}
CMAKE_ARGS: "-DWITH_OPTIM=OFF"
CIBW_TEST_COMMAND: "pytest {project}/tests/ndarray/test_reductions.py"
strategy:
matrix:
os: [ubuntu-latest]
cibw_build: ["cp3{11,12,13}-*"]
p_ver: ["3.11-3.13"]
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y cmake
- name: Install cibuildwheel
run: pip install cibuildwheel
- name: Build wheels
# Testing is automaticall made by cibuildwheel
run: cibuildwheel --platform pyodide
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-wasm-${{ matrix.os }}-${{ matrix.p_ver }}
path: ./wheelhouse/*.whl
# This is not working yet
# - name: Upload wheel to release
# if: startsWith(github.ref, 'refs/tags/')
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: |
# gh release upload ${GITHUB_REF_NAME} ./wheelhouse/*.whl