single source of truth

This commit is contained in:
Martin Diehl 2021-12-11 23:08:18 +01:00
parent ad5262a7a8
commit 3192a31e1e
1 changed files with 22 additions and 21 deletions

View File

@ -2,11 +2,12 @@ name: Grid and Mesh Solver
on: [push] on: [push]
env: env:
HOMEBREW_NO_ANALYTICS: "ON" # Make Homebrew installation a little quicker PETSC_VERSION: '3.16.2'
HOMEBREW_NO_AUTO_UPDATE: "ON" HOMEBREW_NO_ANALYTICS: 'ON' # Make Homebrew installation a little quicker
HOMEBREW_NO_BOTTLE_SOURCE_FALLBACK: "ON" HOMEBREW_NO_AUTO_UPDATE: 'ON'
HOMEBREW_NO_GITHUB_API: "ON" HOMEBREW_NO_BOTTLE_SOURCE_FALLBACK: 'ON'
HOMEBREW_NO_INSTALL_CLEANUP: "ON" HOMEBREW_NO_GITHUB_API: 'ON'
HOMEBREW_NO_INSTALL_CLEANUP: 'ON'
jobs: jobs:
@ -48,17 +49,17 @@ jobs:
uses: actions/cache@v2 uses: actions/cache@v2
with: with:
path: download path: download
key: petsc-3.16.2.tar.gz key: petsc-${{ env.PETSC_VERSION }}.tar.gz
- name: PETSc - Download - name: PETSc - Download
if: steps.petsc-download.outputs.cache-hit != 'true' if: steps.petsc-download.outputs.cache-hit != 'true'
run: | run: |
wget -q https://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-3.16.2.tar.gz -P download wget -q https://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-${PETSC_VERSION}.tar.gz -P download
- name: PETSc - Prepare - name: PETSc - Prepare
run: | run: |
tar -xf download/petsc-3.16.2.tar.gz -C . tar -xf download/petsc-${PETSC_VERSION}.tar.gz -C .
export PETSC_DIR=${PWD}/petsc-3.16.2 export PETSC_DIR=${PWD}/petsc-${PETSC_VERSION}
export PETSC_ARCH=gcc${GCC_V} export PETSC_ARCH=gcc${GCC_V}
printenv >> $GITHUB_ENV printenv >> $GITHUB_ENV
@ -66,13 +67,13 @@ jobs:
id: petsc-install id: petsc-install
uses: actions/cache@v2 uses: actions/cache@v2
with: with:
path: petsc-3.16.2 path: petsc-${{ env.PETSC_VERSION }}
key: petsc-3.16.2-${{ matrix.os }}-gcc${{ matrix.gcc_v }}-${{ hashFiles('**/petscversion.h') }} key: petsc-${{ env.PETSC_VERSION }}-${{ matrix.os }}-gcc${{ matrix.gcc_v }}-${{ hashFiles('**/petscversion.h') }}
- name: PETSc - Install (Linux) - name: PETSc - Install (Linux)
if: contains( matrix.os, 'ubuntu') if: contains( matrix.os, 'ubuntu')
run: | run: |
cd petsc-3.16.2 cd petsc-${PETSC_VERSION}
./configure --with-fc=gfortran --with-cc=gcc --with-cxx=g++ \ ./configure --with-fc=gfortran --with-cc=gcc --with-cxx=g++ \
--download-mpich --download-fftw --download-hdf5 --download-hdf5-fortran-bindings=1 --download-zlib \ --download-mpich --download-fftw --download-hdf5 --download-hdf5-fortran-bindings=1 --download-zlib \
--with-mpi-f90module-visibility=0 --with-mpi-f90module-visibility=0
@ -81,7 +82,7 @@ jobs:
- name: PETSc - Install (macOS) - name: PETSc - Install (macOS)
if: contains( matrix.os, 'macos') if: contains( matrix.os, 'macos')
run: | run: |
cd petsc-3.16.2 cd petsc-${PETSC_VERSION}
./configure --with-fc=gfortran-${GCC_V} --with-cc=gcc-${GCC_V} --with-cxx=g++-${GCC_V} \ ./configure --with-fc=gfortran-${GCC_V} --with-cc=gcc-${GCC_V} --with-cxx=g++-${GCC_V} \
--download-openmpi --download-fftw --download-hdf5 --download-hdf5-fortran-bindings=1 --download-zlib --download-openmpi --download-fftw --download-hdf5 --download-hdf5-fortran-bindings=1 --download-zlib
make all make all
@ -132,17 +133,17 @@ jobs:
uses: actions/cache@v2 uses: actions/cache@v2
with: with:
path: download path: download
key: petsc-3.16.2.tar.gz key: petsc-${{ env.PETSC_VERSION }}.tar.gz
- name: PETSc - Download - name: PETSc - Download
if: steps.petsc-download.outputs.cache-hit != 'true' if: steps.petsc-download.outputs.cache-hit != 'true'
run: | run: |
wget -q https://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-3.16.2.tar.gz -P download wget -q https://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-${PETSC_VERSION}.tar.gz -P download
- name: PETSc - Prepare - name: PETSc - Prepare
run: | run: |
tar -xf download/petsc-3.16.2.tar.gz -C . tar -xf download/petsc-${PETSC_VERSION}.tar.gz -C .
export PETSC_DIR=${PWD}/petsc-3.16.2 export PETSC_DIR=${PWD}/petsc-${PETSC_VERSION}
export PETSC_ARCH=intel-${INTEL_V} export PETSC_ARCH=intel-${INTEL_V}
printenv >> $GITHUB_ENV printenv >> $GITHUB_ENV
@ -150,13 +151,13 @@ jobs:
id: petsc-install id: petsc-install
uses: actions/cache@v2 uses: actions/cache@v2
with: with:
path: petsc-3.16.2 path: petsc-${{ env.PETSC_VERSION }}
key: petsc-3.16.2-intel-${{ matrix.intel_v }}-${{ hashFiles('**/petscversion.h') }} key: petsc-${{ env.PETSC_VERSION }}-intel-${{ matrix.intel_v }}-${{ hashFiles('**/petscversion.h') }}
- name: PETSc - Install (classic) - name: PETSc - Install (classic)
if: contains( matrix.intel_v, 'classic') if: contains( matrix.intel_v, 'classic')
run: | run: |
cd petsc-3.16.2 cd petsc-${PETSC_VERSION}
./configure --with-fc=mpiifort --with-cc=mpiicc --with-cxx=mpiicpc \ ./configure --with-fc=mpiifort --with-cc=mpiicc --with-cxx=mpiicpc \
--download-fftw --download-hdf5 --download-hdf5-fortran-bindings=1 --download-zlib --download-fftw --download-hdf5 --download-hdf5-fortran-bindings=1 --download-zlib
make all make all
@ -164,7 +165,7 @@ jobs:
- name: PETSc - Install (LLVM) - name: PETSc - Install (LLVM)
if: contains( matrix.intel_v, 'llvm') if: contains( matrix.intel_v, 'llvm')
run: | run: |
cd petsc-3.16.2 cd petsc-${PETSC_VERSION}
./configure --with-fc=mpiifort --with-cc="mpiicc -cc=icx" --with-cxx="mpiicpc -cxx=icpx" \ ./configure --with-fc=mpiifort --with-cc="mpiicc -cc=icx" --with-cxx="mpiicpc -cxx=icpx" \
--download-fftw --download-hdf5 --download-hdf5-fortran-bindings=1 --download-zlib --download-fftw --download-hdf5 --download-hdf5-fortran-bindings=1 --download-zlib
make all make all