-
Notifications
You must be signed in to change notification settings - Fork 68
141 lines (123 loc) · 4.71 KB
/
test.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
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
name: 'Test Suite'
on: [push, pull_request, workflow_dispatch]
jobs:
file-changes:
name: Detect File Changes
runs-on: 'ubuntu-latest'
outputs:
checkall: ${{ steps.changes.outputs.checkall }}
steps:
- name: Clone
uses: actions/checkout@v4
- name: Detect Changes
uses: dorny/paths-filter@v3
id: changes
with:
filters: ".github/file-filter.yml"
github:
name: Github
if: needs.file-changes.outputs.checkall == 'true'
needs: file-changes
strategy:
matrix:
os: ['ubuntu', 'macos']
mpi: ['mpi']
debug: ['debug', 'no-debug']
intel: [true, false]
exclude:
- os: macos
intel: true
include:
- os: ubuntu
mpi: no-mpi
debug: no-debug
intel: false
fail-fast: false
continue-on-error: true
runs-on: ${{ matrix.os }}-latest
steps:
- name: Clone
uses: actions/checkout@v4
- name: Setup MacOS
if: matrix.os == 'macos'
run: |
brew install coreutils python cmake fftw hdf5 gcc@14 boost open-mpi
echo "FC=gfortran-14" >> $GITHUB_ENV
echo "BOOST_INCLUDE=/opt/homebrew/include/" >> $GITHUB_ENV
- name: Setup Ubuntu
if: matrix.os == 'ubuntu' && matrix.intel == false
run: |
sudo apt update -y
sudo apt install -y cmake gcc g++ python3 python3-dev hdf5-tools \
libfftw3-dev libhdf5-dev openmpi-bin libopenmpi-dev
- name: Setup Ubuntu (Intel)
if: matrix.os == 'ubuntu' && matrix.intel == true
run: |
sudo apt update -y
sudo apt install -y tar wget make cmake python3 python3-dev
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
sudo echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
sudo apt-get update
sudo apt-get install -y intel-oneapi-common-vars intel-oneapi-compiler-fortran-2022.1.0 intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic-2022.1.0 intel-oneapi-mkl-2021.4.0 intel-oneapi-mpi-2021.7.1 intel-oneapi-mpi-devel-2021.7.1
source /opt/intel/oneapi/setvars.sh
echo "CXX=$(which icpc)" >> $GITHUB_ENV
echo "CC=$(which icc)" >> $GITHUB_ENV
echo "FC=$(which ifort)" >> $GITHUB_ENV
echo "OMPI_FC=$(which ifort)" >> $GITHUB_ENV
echo "OMPI_CXX=$(which icpc)" >> $GITHUB_ENV
echo "OMPI_MPICC=$(which icc)" >> $GITHUB_ENV
echo "MPI_HOME=/opt/intel/oneapi/mpi/2021.7.1/" >> $GITHUB_ENV
echo "I_MPI_ROOT=/opt/intel/oneapi/mpi/2021.7.1/" >> $GITHUB_ENV
- name: Build
run: |
if [ '${{ matrix.intel }}' == 'true' ]; then . /opt/intel/oneapi/setvars.sh; fi
/bin/bash mfc.sh build -j $(nproc) --${{ matrix.debug }} --${{ matrix.mpi }}
- name: Test
run: |
if [ '${{ matrix.intel }}' == 'true' ]; then . /opt/intel/oneapi/setvars.sh; fi
/bin/bash mfc.sh test --max-attempts 3 -j $(nproc) $OPT1 $OPT2
env:
OPT1: ${{ matrix.mpi == 'mpi' && '--test-all' || '' }}
OPT2: ${{ matrix.debug == 'debug' && '-% 20' || '' }}
self:
name: Self Hosted
if: github.repository == 'MFlowCode/MFC' && needs.file-changes.outputs.checkall == 'true'
needs: file-changes
continue-on-error: false
timeout-minutes: 1400
strategy:
matrix:
device: ['cpu', 'gpu']
lbl: ['gt', 'frontier']
exclude:
- device: cpu
lbl: frontier
runs-on:
group: phoenix
labels: ${{ matrix.lbl }}
env:
ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION: node16
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
steps:
- name: Clone
uses: actions/checkout@v3
- name: Build & Test
if: matrix.lbl == 'gt'
run: bash .github/workflows/phoenix/submit.sh .github/workflows/phoenix/test.sh ${{ matrix.device }}
- name: Build
if: matrix.lbl == 'frontier'
run: bash .github/workflows/frontier/build.sh
- name: Test
if: matrix.lbl == 'frontier'
run: bash .github/workflows/frontier/submit.sh .github/workflows/frontier/test.sh ${{matrix.device}}
- name: Print Logs
if: always()
run: cat test-${{ matrix.device }}.out
- name: Archive Logs
uses: actions/upload-artifact@v3
if: always()
with:
name: logs
path: test-${{ matrix.device }}.out