-
Notifications
You must be signed in to change notification settings - Fork 23
66 lines (58 loc) · 1.64 KB
/
canary.yaml
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
name: Canary tests
on:
push:
branches:
- "main"
pull_request:
branches:
- "main"
jobs:
test:
name: Canary tests on ${{ matrix.cfg.os }}, Python ${{ matrix.python-version }}
runs-on: ${{ matrix.cfg.os }}
strategy:
fail-fast: false
matrix:
python-version:
- "3.10"
- "3.11"
- "3.12"
cfg:
- os: ubuntu-latest
- os: macOS-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Find if any OFFXML files were added
shell: bash -l {0}
run: |
if [[ $(git diff origin/main HEAD --name-only | grep "\.offxml") ]]; then
echo "new_off_xml=true" >> $GITHUB_ENV
fi
echo $GITHUB_ENV
- name: Install conda environment
if: ${{ env.new_off_xml == 'true' }}
uses: mamba-org/setup-micromamba@v1
with:
environment-file: devtools/conda-envs/canary_env.yaml
create-args: >-
python=${{ matrix.python-version }}
- name: Additional info about the build
if: ${{ env.new_off_xml == 'true' }}
shell: bash
run: |
uname -a
df -h
ulimit -a
- name: Install package
if: ${{ env.new_off_xml == 'true' }}
shell: bash -l {0}
run: |
conda remove --force openforcefields
python -m pip install -e .
- name: Run HMR canary tests
if: ${{ env.new_off_xml == 'true' }}
shell: bash -l {0}
run: |
git diff origin/main --name-only | grep "\.offxml" | python canary/scripts/test_hmr.py