-
Notifications
You must be signed in to change notification settings - Fork 11
126 lines (104 loc) · 3.9 KB
/
Copy pathtutorials.yml
File metadata and controls
126 lines (104 loc) · 3.9 KB
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
name: Check that tutorials run
on:
push:
branches-ignore:
- master
pull_request:
branches-ignore:
- master
jobs:
check-tutorials:
strategy:
matrix:
name: [ubuntu-gcc-12]
include:
- name: ubuntu-gcc-12
os: ubuntu-latest
compiler: gcc
version: "12"
mpi: false
arch: linux64
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- name: Install (Linux)
if: runner.os == 'Linux' && matrix.name != 'windows'
run: |
sudo apt-get update
sudo apt-get install -y ccache meson
if [ "${{ matrix.compiler }}" = "gcc" ]; then
sudo apt-get install -y g++-${{ matrix.version }}
echo "C_COMPILER=gcc-${{ matrix.version }}" >> $GITHUB_ENV
echo "CXX_COMPILER=g++-${{ matrix.version }}" >> $GITHUB_ENV
echo "CC=ccache gcc-${{ matrix.version }}" >> $GITHUB_ENV
echo "CXX=ccache g++-${{ matrix.version }}" >> $GITHUB_ENV
else
sudo apt-get install -y clang-${{ matrix.version }}
echo "C_COMPILER=clang-${{ matrix.version }}" >> $GITHUB_ENV
echo "CXX_COMPILER=clang++-${{ matrix.version }}" >> $GITHUB_ENV
echo "CC=ccache clang-${{ matrix.version }}" >> $GITHUB_ENV
echo "CXX=ccache clang++-${{ matrix.version }}" >> $GITHUB_ENV
fi
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
key: ${{ matrix.name }}
restore-keys: |
${{ matrix.name }}
save: ${{ github.event_name == 'push' }}
- name: Install BOOST (Linux)
if: runner.os == 'Linux' && matrix.name != 'windows'
run: |
# Don't use weird boost version installed by github actions.
sudo rm -rf /usr/local/share/boost
# Maybe install a particular boost version.
if [ -n "${{ matrix.install_boost }}" ] ; then
sudo apt-get remove libboost-all-dev
sudo add-apt-repository ppa:mhier/libboost-latest
sudo apt-get update
sudo apt-get install -y libboost${{ matrix.install_boost }}-dev
else
sudo apt-get install -y libboost-all-dev
fi
- name: Clone and build Tensorphylo
run: |
if [ "${{ matrix.name }}" = "windows" ] ; then
meson_args=--cross-file=win64-cross.txt
fi
git clone https://bredelings@bitbucket.org/mrmay/tensorphylo.git
meson setup tpbuild tensorphylo --prefix=$HOME/local ${meson_args}
meson install -C tpbuild
if [ "${{ matrix.name }}" = "windows" ] ; then
# Get the user profile dir for windows, then find where it is as a Linux path
USERPROFILE=$(winepath -u $(wine cmd /c echo %USERPROFILE% | tr -d '\r'))
mkdir $USERPROFILE/.plugins
cp tpbuild/src/libTensorPhylo.dll $USERPROFILE/.plugins
elif [ "${{ runner.os }}" = macOS ] ; then
mkdir ~/.plugins
cp tpbuild/src/libTensorPhylo.dylib ~/.plugins
else
mkdir ~/.plugins
cp tpbuild/src/libTensorPhylo.so ~/.plugins
fi
- name: Clone and build RevBayes development (Linux)
if: runner.os == 'Linux' && matrix.name != 'windows'
run: |
git clone -b development https://github.com/revbayes/revbayes.git
(
cd revbayes
ccache -p
ccache -s
cd projects/cmake
BUILD_DIR=build exec_name=rb ./build.sh -DCMAKE_INSTALL_PREFIX=$HOME/local -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache
cmake --install build
ccache -s
)
- name: Test tutorials
run: |
export PATH=${HOME}/wrapper:${HOME}/local/bin:$PATH
echo "\"Hello World\"" | rb
echo ::group::Test suite
cd tutorials
./run_tutorial_tests.sh rb
cd
echo ::endgroup::