-
Notifications
You must be signed in to change notification settings - Fork 21
54 lines (51 loc) · 1.69 KB
/
charm4py.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
name: Charm4py
on:
push:
branches:
- main
pull_request:
schedule:
- cron: "5 0 * * *" # Runs at 00:05 UTC every day.
jobs:
auto_test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.7", "3.12"]
# macos-13 is x86_64, macos-14 is arm64
os: [ubuntu-latest, macos-13, macos-14]
exclude:
- os: macos-14 # Python 3.7 does not exist for macos-14
python-version: "3.7"
fail-fast: false
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Need full repo for 'git describe' used by setup.py
- name: setup-python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install setuptools cython cffi greenlet numpy torch torchvision filelock
if [ ${{ matrix.os }} == 'macos-13' ]; then
# pypi only distributes torch packages w/ numpy v1 for macos-x86_64
pip install 'numpy<2'
fi
- name: Build Charm++/Charm4py
run: |
git clone https://github.com/charmplusplus/charm charm_src/charm
export CHARM_EXTRA_BUILD_OPTS="--enable-error-checking"
export CHARM_BUILD_PROCESSES=2
export CHARM4PY_BUILD_CFFI=1
python setup.py build_ext --inplace
- name: Run auto_test.py
run: |
export PYTHONPATH="$PWD"
export CHARM4PY_TEST_NUM_PROCESSES=2
if [ ${{ matrix.os }} == 'macos-13' ]; then
# Crashes in ray test otherwise
export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
fi
python auto_test.py