|
1 |
| -# name: 'Test Suite' |
2 |
| - |
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' |
14 |
| - |
15 |
| -# pull_request: |
16 |
| - |
17 |
| -# workflow_dispatch: |
| 1 | +name: 'Test Suite' |
| 2 | + |
| 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' |
| 14 | + |
| 15 | + pull_request: |
| 16 | + |
| 17 | + workflow_dispatch: |
18 | 18 |
|
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 |
37 |
| - |
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 |
| 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 |
| 37 | + |
| 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 |
45 | 45 |
|
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 |
53 |
| - |
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 |
| 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 |
| 53 | +
|
| 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 |
59 | 59 |
|
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 |
79 |
| - |
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 }} |
84 |
| - |
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' || '' }} |
92 |
| - |
93 |
| -# - name: Ensure empty diff |
94 |
| -# run: git diff --exit-code tests/ |
95 |
| - |
96 |
| -# docker: |
97 |
| -# name: Github | Docker |
98 |
| -# runs-on: ubuntu-latest |
99 |
| -# steps: |
100 |
| -# - name: Clone |
101 |
| -# uses: actions/checkout@v3 |
102 |
| - |
103 |
| -# - name: Test |
104 |
| -# run: sudo ./mfc.sh docker ./mfc.sh test -j $(nproc) -a |
105 |
| - |
106 |
| -# - name: Ensure empty diff |
107 |
| -# run: git diff --exit-code tests/ |
108 |
| - |
109 |
| -# self: |
110 |
| -# name: Georgia Tech | Phoenix (NVHPC) |
111 |
| -# if: github.repository == 'MFlowCode/MFC' |
112 |
| -# continue-on-error: true |
113 |
| -# strategy: |
114 |
| -# matrix: |
115 |
| -# device: ['cpu', 'gpu'] |
116 |
| -# runs-on: |
117 |
| -# group: phoenix |
118 |
| -# labels: self-hosted |
119 |
| -# steps: |
120 |
| -# - name: Clone |
121 |
| -# uses: actions/checkout@v3 |
122 |
| - |
123 |
| -# - name: Build |
124 |
| -# run: | |
125 |
| -# . ./mfc.sh load -c p -m gpu |
126 |
| -# ./mfc.sh build -j 2 $(if [ '${{ matrix.device }}' == 'gpu' ]; then echo '--gpu'; fi) |
127 |
| - |
128 |
| -# - name: Test |
129 |
| -# run: | |
130 |
| -# . ./mfc.sh load -c p -m gpu |
131 |
| -# mv misc/run-phoenix-release-${{ matrix.device }}.sh ./ |
132 |
| -# sbatch run-phoenix-release-${{ matrix.device }}.sh |
133 |
| - |
134 |
| -# - name: Ensure empty diff |
135 |
| -# run: exit $(git status --porcelain tests/ | wc -l) |
136 |
| - |
137 |
| -# - name: Print |
138 |
| -# if: always() |
139 |
| -# run: | |
140 |
| -# cat test.out |
| 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 |
| 79 | +
|
| 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 }} |
| 84 | +
|
| 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' || '' }} |
| 92 | + |
| 93 | + - name: Ensure empty diff |
| 94 | + run: git diff --exit-code tests/ |
| 95 | + |
| 96 | + docker: |
| 97 | + name: Github | Docker |
| 98 | + runs-on: ubuntu-latest |
| 99 | + steps: |
| 100 | + - name: Clone |
| 101 | + uses: actions/checkout@v3 |
| 102 | + |
| 103 | + - name: Test |
| 104 | + run: sudo ./mfc.sh docker ./mfc.sh test -j $(nproc) -a |
| 105 | + |
| 106 | + - name: Ensure empty diff |
| 107 | + run: git diff --exit-code tests/ |
| 108 | + |
| 109 | + self: |
| 110 | + name: Georgia Tech | Phoenix (NVHPC) |
| 111 | + if: github.repository == 'MFlowCode/MFC' |
| 112 | + continue-on-error: true |
| 113 | + strategy: |
| 114 | + matrix: |
| 115 | + device: ['cpu', 'gpu'] |
| 116 | + runs-on: |
| 117 | + group: phoenix |
| 118 | + labels: self-hosted |
| 119 | + steps: |
| 120 | + - name: Clone |
| 121 | + uses: actions/checkout@v3 |
| 122 | + |
| 123 | + - name: Build |
| 124 | + run: | |
| 125 | + . ./mfc.sh load -c p -m gpu |
| 126 | + ./mfc.sh build -j 2 $(if [ '${{ matrix.device }}' == 'gpu' ]; then echo '--gpu'; fi) |
| 127 | +
|
| 128 | + - name: Test |
| 129 | + run: | |
| 130 | + . ./mfc.sh load -c p -m gpu |
| 131 | + mv misc/run-phoenix-release-${{ matrix.device }}.sh ./ |
| 132 | + sbatch run-phoenix-release-${{ matrix.device }}.sh |
| 133 | +
|
| 134 | + - name: Ensure empty diff |
| 135 | + run: exit $(git status --porcelain tests/ | wc -l) |
| 136 | + |
| 137 | + - name: Print |
| 138 | + if: always() |
| 139 | + run: | |
| 140 | + cat test.out |
0 commit comments