-
Notifications
You must be signed in to change notification settings - Fork 1
72 lines (61 loc) · 2.12 KB
/
build.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
name: Build packages with Pyodide
on:
push:
pull_request:
workflow_dispatch:
jobs:
run_build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
# - repo: https://github.com/Pylons/paginate
# name: paginate
# version: "0.5.6"
# - repo: https://github.com/gorakhargosh/watchdog
# name: watchdog
# version: "v2.3.1"
# - repo: https://github.com/gorakhargosh/watchdog
# name: watchdog
# version: "v3.0.0"
# - repo: https://github.com/kuelumbus/rdkit-pypi/
# name: rdkit-pypi
# version: "rdkit-pypi"
- repo: https://github.com/pytorch/pytorch
name: pytorch
package-name: pytorch
version: "v2.1.2"
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11.2
- name: Set up env vars for Emscripten
run: |
set -vxeuo pipefail
pip install pyodide-build>=0.23.0
export EMSCRIPTEN_VERSION=$(pyodide config get emscripten_version)
echo EMSCRIPTEN_VERSION=${EMSCRIPTEN_VERSION} >> $GITHUB_ENV
echo "EMSCRIPTEN_VERSION is $EMSCRIPTEN_VERSION"
- name: Set up Emscripten
uses: mymindstorm/setup-emsdk@v14
with:
version: ${{ env.EMSCRIPTEN_VERSION }}
- name: Build with Pyodide
run: |
set -vxeo pipefail
git clone --depth 1 --branch ${{ matrix.version }} ${{ matrix.repo }}
cd ${{ matrix.name }}
# Source the variables from the CF build script: https://github.com/conda-forge/pytorch-cpu-feedstock/blob/main/recipe/build.sh
source ../scripts/build-pytorch.sh
pyodide build
ls -la
tree .
- name: Upload built artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.package-name }}-${{ matrix.version }}
path: ${{ matrix.name }}/dist/${{ matrix.package-name }}-*.whl