-
Notifications
You must be signed in to change notification settings - Fork 68
134 lines (115 loc) · 3.95 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
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']
precision: ['']
debug: ['debug', 'no-debug']
intel: [true, false]
exclude:
- os: macos
intel: true
include:
- os: ubuntu
mpi: no-mpi
precision: single
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 update
brew upgrade
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: |
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
sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main"
sudo apt-get update
sudo apt-get install -y intel-oneapi-compiler-fortran intel-oneapi-mpi intel-oneapi-mpi-devel
source /opt/intel/oneapi/setvars.sh
printenv >> $GITHUB_ENV
- name: Build
run: |
/bin/bash mfc.sh test --dry-run -j $(nproc) --${{ matrix.debug }} --${{ matrix.mpi }} --${{ matrix.precision }}
- name: Test
run: |
/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@v4
- 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@v4
if: always()
with:
name: logs-${{ strategy.job-index }}-${{ matrix.device }}
path: test-${{ matrix.device }}.out