Skip to content

Commit a48bd9a

Browse files
authored
put ci back (#315)
1 parent 0a512fc commit a48bd9a

File tree

1 file changed

+110
-110
lines changed

1 file changed

+110
-110
lines changed

.github/workflows/test.yml

Lines changed: 110 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -1,126 +1,126 @@
1-
# name: 'Test Suite'
1+
name: 'Test Suite'
22

3-
# on:
4-
# push:
5-
# paths:
6-
# - '**.f90'
7-
# - '**.fpp'
8-
# - '**.py'
9-
# - '**.yml'
10-
# - 'mfc.sh'
11-
# - 'golden.txt'
12-
# - 'CMakeLists.txt'
13-
# - 'requirements.txt'
3+
on:
4+
push:
5+
paths:
6+
- '**.f90'
7+
- '**.fpp'
8+
- '**.py'
9+
- '**.yml'
10+
- 'mfc.sh'
11+
- 'golden.txt'
12+
- 'CMakeLists.txt'
13+
- 'requirements.txt'
1414

15-
# pull_request:
15+
pull_request:
1616

17-
# workflow_dispatch:
17+
workflow_dispatch:
1818

19-
# jobs:
20-
# github:
21-
# name: Github
22-
# strategy:
23-
# matrix:
24-
# os: ['ubuntu', 'macos']
25-
# mpi: ['mpi', 'no-mpi']
26-
# debug: ['debug', 'no-debug']
27-
# intel: [true, false]
28-
# exclude:
29-
# - intel: true
30-
# os: macos
31-
# fail-fast: false
32-
# continue-on-error: true
33-
# runs-on: ${{ matrix.os }}-latest
34-
# steps:
35-
# - name: Clone
36-
# uses: actions/checkout@v3
19+
jobs:
20+
github:
21+
name: Github
22+
strategy:
23+
matrix:
24+
os: ['ubuntu', 'macos']
25+
mpi: ['mpi', 'no-mpi']
26+
debug: ['debug', 'no-debug']
27+
intel: [true, false]
28+
exclude:
29+
- intel: true
30+
os: macos
31+
fail-fast: false
32+
continue-on-error: true
33+
runs-on: ${{ matrix.os }}-latest
34+
steps:
35+
- name: Clone
36+
uses: actions/checkout@v3
3737

38-
# - name: Setup MacOS
39-
# if: matrix.os == 'macos'
40-
# run: |
41-
# echo "CC=gcc-13" >> $GITHUB_ENV
42-
# echo "CXX=g++-13" >> $GITHUB_ENV
43-
# echo "FC=gfortran-13" >> $GITHUB_ENV
44-
# brew install wget make python make cmake coreutils gcc@13
38+
- name: Setup MacOS
39+
if: matrix.os == 'macos'
40+
run: |
41+
echo "CC=gcc-13" >> $GITHUB_ENV
42+
echo "CXX=g++-13" >> $GITHUB_ENV
43+
echo "FC=gfortran-13" >> $GITHUB_ENV
44+
brew install wget make python make cmake coreutils gcc@13
4545
46-
# - name: (MacOS) Build OpenMPI
47-
# if: matrix.os == 'macos' && matrix.mpi == 'mpi'
48-
# run: |
49-
# echo "OMPI_FC=gfortran-13" >> $GITHUB_ENV
50-
# echo "OMPI_CXX=g++-13" >> $GITHUB_ENV
51-
# echo "OMPI_MPICC=gcc-13" >> $GITHUB_ENV
52-
# HOMEBREW_MAKE_JOBS=$(nproc) brew install --cc=gcc-13 --verbose --build-from-source open-mpi
46+
- name: (MacOS) Build OpenMPI
47+
if: matrix.os == 'macos' && matrix.mpi == 'mpi'
48+
run: |
49+
echo "OMPI_FC=gfortran-13" >> $GITHUB_ENV
50+
echo "OMPI_CXX=g++-13" >> $GITHUB_ENV
51+
echo "OMPI_MPICC=gcc-13" >> $GITHUB_ENV
52+
HOMEBREW_MAKE_JOBS=$(nproc) brew install --cc=gcc-13 --verbose --build-from-source open-mpi
5353
54-
# - name: Setup Ubuntu
55-
# if: matrix.os == 'ubuntu' && matrix.intel == false
56-
# run: |
57-
# sudo apt update -y
58-
# sudo apt install -y tar wget make cmake gcc g++ python3 python3-dev "openmpi-*" libopenmpi-dev
54+
- name: Setup Ubuntu
55+
if: matrix.os == 'ubuntu' && matrix.intel == false
56+
run: |
57+
sudo apt update -y
58+
sudo apt install -y tar wget make cmake gcc g++ python3 python3-dev "openmpi-*" libopenmpi-dev
5959
60-
# - name: Setup Ubuntu (Intel)
61-
# if: matrix.os == 'ubuntu' && matrix.intel == true
62-
# run: |
63-
# sudo apt install tar wget make cmake python3 python3-dev
64-
# wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
65-
# sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
66-
# rm GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
67-
# sudo echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
68-
# sudo apt-get update
69-
# 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
70-
# source /opt/intel/oneapi/setvars.sh
71-
# echo "CXX=$(which icpc)" >> $GITHUB_ENV
72-
# echo "CC=$(which icc)" >> $GITHUB_ENV
73-
# echo "FC=$(which ifort)" >> $GITHUB_ENV
74-
# echo "OMPI_FC=$(which ifort)" >> $GITHUB_ENV
75-
# echo "OMPI_CXX=$(which icpc)" >> $GITHUB_ENV
76-
# echo "OMPI_MPICC=$(which icc)" >> $GITHUB_ENV
77-
# echo "MPI_HOME=/opt/intel/oneapi/mpi/2021.7.1/" >> $GITHUB_ENV
78-
# echo "I_MPI_ROOT=/opt/intel/oneapi/mpi/2021.7.1/" >> $GITHUB_ENV
60+
- name: Setup Ubuntu (Intel)
61+
if: matrix.os == 'ubuntu' && matrix.intel == true
62+
run: |
63+
sudo apt install tar wget make cmake python3 python3-dev
64+
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
65+
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
66+
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
67+
sudo echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
68+
sudo apt-get update
69+
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
70+
source /opt/intel/oneapi/setvars.sh
71+
echo "CXX=$(which icpc)" >> $GITHUB_ENV
72+
echo "CC=$(which icc)" >> $GITHUB_ENV
73+
echo "FC=$(which ifort)" >> $GITHUB_ENV
74+
echo "OMPI_FC=$(which ifort)" >> $GITHUB_ENV
75+
echo "OMPI_CXX=$(which icpc)" >> $GITHUB_ENV
76+
echo "OMPI_MPICC=$(which icc)" >> $GITHUB_ENV
77+
echo "MPI_HOME=/opt/intel/oneapi/mpi/2021.7.1/" >> $GITHUB_ENV
78+
echo "I_MPI_ROOT=/opt/intel/oneapi/mpi/2021.7.1/" >> $GITHUB_ENV
7979
80-
# - name: Build
81-
# run: |
82-
# if [ '${{ matrix.intel }}' == 'true' ]; then source /opt/intel/oneapi/setvars.sh; fi
83-
# /bin/bash mfc.sh build -j $(nproc) --${{ matrix.debug }} --${{ matrix.mpi }}
80+
- name: Build
81+
run: |
82+
if [ '${{ matrix.intel }}' == 'true' ]; then source /opt/intel/oneapi/setvars.sh; fi
83+
/bin/bash mfc.sh build -j $(nproc) --${{ matrix.debug }} --${{ matrix.mpi }}
8484
85-
# - name: Test
86-
# run: |
87-
# if [ '${{ matrix.intel }}' == 'true' ]; then source /opt/intel/oneapi/setvars.sh; fi
88-
# /bin/bash mfc.sh test -j $(nproc) $OPT1 $OPT2
89-
# env:
90-
# OPT1: ${{ matrix.mpi == 'mpi' && '--test-all' || '' }}
91-
# OPT2: ${{ matrix.debug == 'debug' && '-% 20' || '' }}
85+
- name: Test
86+
run: |
87+
if [ '${{ matrix.intel }}' == 'true' ]; then source /opt/intel/oneapi/setvars.sh; fi
88+
/bin/bash mfc.sh test -j $(nproc) $OPT1 $OPT2
89+
env:
90+
OPT1: ${{ matrix.mpi == 'mpi' && '--test-all' || '' }}
91+
OPT2: ${{ matrix.debug == 'debug' && '-% 20' || '' }}
9292

93-
# docker:
94-
# name: Github | Docker
95-
# runs-on: ubuntu-latest
96-
# steps:
97-
# - name: Clone
98-
# uses: actions/checkout@v3
93+
docker:
94+
name: Github | Docker
95+
runs-on: ubuntu-latest
96+
steps:
97+
- name: Clone
98+
uses: actions/checkout@v3
9999

100-
# - name: Test
101-
# run: sudo ./mfc.sh docker ./mfc.sh test -j $(nproc) -a
100+
- name: Test
101+
run: sudo ./mfc.sh docker ./mfc.sh test -j $(nproc) -a
102102

103-
# self:
104-
# name: Georgia Tech | Phoenix (NVHPC)
105-
# if: github.repository == 'MFlowCode/MFC'
106-
# continue-on-error: true
107-
# strategy:
108-
# matrix:
109-
# device: ['cpu', 'gpu']
110-
# runs-on:
111-
# group: phoenix
112-
# labels: self-hosted
113-
# steps:
114-
# - name: Clone
115-
# uses: actions/checkout@v3
103+
self:
104+
name: Georgia Tech | Phoenix (NVHPC)
105+
if: github.repository == 'MFlowCode/MFC'
106+
continue-on-error: true
107+
strategy:
108+
matrix:
109+
device: ['cpu', 'gpu']
110+
runs-on:
111+
group: phoenix
112+
labels: self-hosted
113+
steps:
114+
- name: Clone
115+
uses: actions/checkout@v3
116116

117-
# - name: Build & Test
118-
# run: bash .github/workflows/phoenix/submit.sh .github/workflows/phoenix/test.sh ${{ matrix.device }}
117+
- name: Build & Test
118+
run: bash .github/workflows/phoenix/submit.sh .github/workflows/phoenix/test.sh ${{ matrix.device }}
119119

120-
# - name: Archive Logs
121-
# uses: actions/upload-artifact@v3
122-
# if: always()
123-
# with:
124-
# name: logs
125-
# path: test-${{ matrix.device }}.out
120+
- name: Archive Logs
121+
uses: actions/upload-artifact@v3
122+
if: always()
123+
with:
124+
name: logs
125+
path: test-${{ matrix.device }}.out
126126

0 commit comments

Comments
 (0)