-
Notifications
You must be signed in to change notification settings - Fork 289
98 lines (93 loc) · 3.18 KB
/
macWF.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: macCI
on:
workflow_call:
env:
# on CI, better dump stack trace in case there is an error
PLUMED_STACK_TRACE: yes
# use two threads for openMP tests
PLUMED_NUM_THREADS: 2
# these are used to build required packages
CC: gcc
CXX: g++
jobs:
macports:
strategy:
fail-fast: false
# see https://github.community/t/how-to-conditionally-include-exclude-items-in-matrix-eg-based-on-branch/16853/6 for possible exclusions
matrix:
variant: [ "" , "+allmodules" ]
# this is to test both intel and arm64 macs
# note: macos-14 has a problem in fetching the git repository of plumed, namely a
# "fatal: detected dubious ownership in repository" error
# I didn't find any solution, so for the moment I keep macos-14 off
os: [ macos-13 ]
exclude:
# many tests on contributed modules are still failing for numerical reasons on arm64, see https://github.com/plumed/plumed2/pull/950
# once fixed we could introduce this back:
- os: macos-14
variant: "+allmodules"
runs-on: ${{ matrix.os }}
env:
PYVERS: "py39 py310"
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: ~/.macports-ci-ccache
key: ccache-macports-${{ matrix.os }}-${{ matrix.variant }}-${{ github.sha }}
restore-keys: ccache-macports-${{ matrix.os }}-${{ matrix.variant }}-
- name: Install MacPorts
run: |
wget https://raw.githubusercontent.com/GiovanniBussi/macports-ci/master/macports-ci
source ./macports-ci install
source ./macports-ci ccache
- name: Build local Portfile
run: |
make macports
source ./macports-ci localports macports
- name: Build PLUMED
run: |
sudo port -N -k install plumed ${{ matrix.variant }}
plumed config show
for p in $PYVERS ; do
sudo port -N install $p-plumed
done
source ./macports-ci ccache --save
- name: Run tests
run: |
sudo port -N -d test plumed ${{ matrix.variant }}
- name: Run python tests
run: |
for p in $PYVERS ; do
sudo port test $p-plumed
done
macsimple:
strategy:
fail-fast: false
matrix:
# this is to test both intel and arm64 macs
os: [ macos-13 , macos-14 ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set paths
run: |
echo "$HOME/opt/bin" >> $GITHUB_PATH
echo "CPATH=$HOME/opt/include:$CPATH" >> $GITHUB_ENV
echo "INCLUDE=$HOME/opt/include:$INCLUDE" >> $GITHUB_ENV
echo "LIBRARY_PATH=$HOME/opt/lib:$LIBRARY_PATH" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=$HOME/opt/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
- name: Build PLUMED
run: |
# it seems brew update is screwing up something
# GB on Mar 8, 2024
#brew update > /dev/null
brew install gawk
./configure --disable-dependency-tracking --prefix="$HOME/opt"
make -j 4
make install
- name: Run tests
run: |
make --no-print-directory -C regtest
# these can fail for numerical reasons
make -C regtest checkfail