-
Notifications
You must be signed in to change notification settings - Fork 757
75 lines (63 loc) · 2.08 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
73
74
75
name: build
on:
pull_request:
push:
branches:
- master
workflow_dispatch:
concurrency:
# Skip intermediate builds: always.
# Cancel intermediate builds: only if it is a pull request build.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10"]
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install DeepXDE with dev requirements
run: python -m pip install -e ".[dev]"
- name: List environment
run: python -m pip freeze
- name: Build with TensorFlow v1
env:
DDE_BACKEND: tensorflow.compat.v1
run: |
python -m pip install tensorflow
python -c "import deepxde"
- name: Build with TensorFlow
env:
DDE_BACKEND: tensorflow
run: |
python -m pip install tensorflow-probability
python -c "import deepxde"
- name: Build with PyTorch
env:
DDE_BACKEND: pytorch
run: |
python -m pip install torch
python -c "import deepxde"
- name: Build with Jax
if: matrix.os != 'windows-latest' # jaxlib is not available on windows
env:
DDE_BACKEND: jax
run: |
python -m pip install jax flax optax
python -c "import deepxde"
- name: Build with Paddle
env:
DDE_BACKEND: paddle
ubuntu-latest: "https://www.paddlepaddle.org.cn/whl/linux/cpu-mkl/develop.html"
macos-latest: "https://www.paddlepaddle.org.cn/whl/mac/cpu/develop.html"
windows-latest: "https://www.paddlepaddle.org.cn/whl/windows/cpu-mkl-avx/develop.html"
run: |
python -m pip install paddlepaddle==0.0.0 -f ${{ env.${{ matrix.os }} }}
python -c "import deepxde"