faster install

This commit is contained in:
Martin Diehl 2021-09-05 16:46:09 +02:00
parent fc7b16655d
commit 4a57b025b1
1 changed files with 49 additions and 34 deletions

View File

@ -26,12 +26,7 @@ jobs:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Set up Python 3.x - name: GCC - Install (Linux)
uses: actions/setup-python@v1
with:
python-version: 3.x
- name: Install GCC (Linux)
if: contains( matrix.os, 'ubuntu') if: contains( matrix.os, 'ubuntu')
run: | run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test sudo add-apt-repository ppa:ubuntu-toolchain-r/test
@ -42,28 +37,39 @@ jobs:
--slave /usr/bin/g++ g++ /usr/bin/g++-${GCC_V} \ --slave /usr/bin/g++ g++ /usr/bin/g++-${GCC_V} \
--slave /usr/bin/gcov gcov /usr/bin/gcov-${GCC_V} --slave /usr/bin/gcov gcov /usr/bin/gcov-${GCC_V}
- name: Install GCC (macOS) - name: GCC - Install (macOS)
if: contains( matrix.os, 'macos') if: contains( matrix.os, 'macos')
run: | run: |
brew install gcc@${GCC_V} || brew upgrade gcc@${GCC_V} || true brew install gcc@${GCC_V} || brew upgrade gcc@${GCC_V} || true
brew link gcc@${GCC_V} brew link gcc@${GCC_V}
- name: Get PETSc - name: PETSc - Cache download
if: steps.${{ matrix.os }}-gcc${{ matrix.gcc_v }}-${{ hashFiles('**/petscversion.h') }}-6.outputs.cache-hit != 'true' id: petsc-download
uses: actions/cache@v2
with:
path: download
key: petsc-3.15.4.tar.gz
- name: PETSc - Download
if: steps.petsc-download.outputs.cache-hit != 'true'
run: | run: |
wget -q https://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-3.15.4.tar.gz wget -q https://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-3.15.4.tar.gz -P download
tar -xf petsc-3.15.4.tar.gz
- name: PETSc - Prepare
run: |
tar -xf download/petsc-3.15.4.tar.gz -C .
export PETSC_DIR=${PWD}/petsc-3.15.4 export PETSC_DIR=${PWD}/petsc-3.15.4
export PETSC_ARCH=gcc${GCC_V} export PETSC_ARCH=gcc${GCC_V}
printenv >> $GITHUB_ENV printenv >> $GITHUB_ENV
- name: Cache PETSc installation - name: PETSc - Cache installation
id: petsc-install
uses: actions/cache@v2 uses: actions/cache@v2
with: with:
path: petsc-3.15.4 path: petsc-3.15.4
key: ${{ matrix.os }}-gcc${{ matrix.gcc_v }}-${{ hashFiles('**/petscversion.h') }}-6 key: petsc-3.15.4-${{ matrix.os }}-gcc${{ matrix.gcc_v }}-${{ hashFiles('**/petscversion.h') }}
- name: Install PETSc (Linux) - name: PETSc - Install (Linux)
if: contains( matrix.os, 'ubuntu') if: contains( matrix.os, 'ubuntu')
run: | run: |
cd petsc-3.15.4 cd petsc-3.15.4
@ -72,7 +78,7 @@ jobs:
--with-mpi-f90module-visibility=0 --with-mpi-f90module-visibility=0
make all make all
- name: Install PETSc (macOS) - name: PETSc - Install (macOS)
if: contains( matrix.os, 'macos') if: contains( matrix.os, 'macos')
run: | run: |
cd petsc-3.15.4 cd petsc-3.15.4
@ -80,7 +86,7 @@ jobs:
--download-openmpi --download-fftw --download-hdf5 --download-zlib --download-openmpi --download-fftw --download-hdf5 --download-zlib
make all make all
- name: Compile DAMASK - name: DAMASK - Compile
run: | run: |
cmake -B build/grid -DDAMASK_SOLVER=grid -DCMAKE_INSTALL_PREFIX=${PWD} cmake -B build/grid -DDAMASK_SOLVER=grid -DCMAKE_INSTALL_PREFIX=${PWD}
cmake --build build/grid --parallel cmake --build build/grid --parallel
@ -89,7 +95,7 @@ jobs:
cmake --build build/mesh --parallel cmake --build build/mesh --parallel
cmake --install build/mesh cmake --install build/mesh
- name: Run DAMASK - name: DAMASK - Run
run: | run: |
./bin/DAMASK_grid -l tensionX.yaml -g 20grains16x16x16.vti -w examples/grid ./bin/DAMASK_grid -l tensionX.yaml -g 20grains16x16x16.vti -w examples/grid
@ -107,38 +113,47 @@ jobs:
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Set up Python 3.x - name: Intel - Install
uses: actions/setup-python@v1
with:
python-version: 3.x
- name: Install Intel
run: | run: |
wget -q https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB wget -q https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB rm GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list 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 update
sudo apt-get install intel-hpckit sudo apt-get install \
intel-basekit \
intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic intel-oneapi-compiler-fortran \
intel-oneapi-openmp intel-oneapi-mkl-devel
source /opt/intel/oneapi/setvars.sh source /opt/intel/oneapi/setvars.sh
printenv >> $GITHUB_ENV printenv >> $GITHUB_ENV
- name: Get PETSc - name: PETSc - Cache download
if: steps.intel-${{ matrix.intel_v }}-${{ hashFiles('**/petscversion.h') }}-6.outputs.cache-hit != 'true' id: petsc-download
uses: actions/cache@v2
with:
path: download
key: petsc-3.15.4.tar.gz
- name: PETSc - Download
if: steps.petsc-download.outputs.cache-hit != 'true'
run: | run: |
wget -q https://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-3.15.4.tar.gz wget -q https://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-3.15.4.tar.gz -P download
tar -xf petsc-3.15.4.tar.gz
- name: PETSc - Prepare
run: |
tar -xf download/petsc-3.15.4.tar.gz -C .
export PETSC_DIR=${PWD}/petsc-3.15.4 export PETSC_DIR=${PWD}/petsc-3.15.4
export PETSC_ARCH=intel-${INTEL_V} export PETSC_ARCH=intel-${INTEL_V}
printenv >> $GITHUB_ENV printenv >> $GITHUB_ENV
- name: Cache PETSc installation - name: PETSc - Cache installation
id: petsc-install
uses: actions/cache@v2 uses: actions/cache@v2
with: with:
path: petsc-3.15.4 path: petsc-3.15.4
key: intel-${{ matrix.intel_v }}-${{ hashFiles('**/petscversion.h') }}-6 key: petsc-3.15.4-intel-${{ matrix.intel_v }}-${{ hashFiles('**/petscversion.h') }}
- name: Install PETSc Intel (classic) - name: PETSc - Install (classic)
if: contains( matrix.intel_v, 'classic') if: contains( matrix.intel_v, 'classic')
run: | run: |
cd petsc-3.15.4 cd petsc-3.15.4
@ -146,7 +161,7 @@ jobs:
--download-fftw --download-hdf5 --download-zlib --download-fftw --download-hdf5 --download-zlib
make all make all
- name: Install PETSc Intel (LLVM) - name: PETSc - Install (LLVM)
if: contains( matrix.intel_v, 'llvm') if: contains( matrix.intel_v, 'llvm')
run: | run: |
cd petsc-3.15.4 cd petsc-3.15.4
@ -154,7 +169,7 @@ jobs:
--download-fftw --download-hdf5 --download-zlib --download-fftw --download-hdf5 --download-zlib
make all make all
- name: Compile DAMASK - name: DAMASK - Compile
run: | run: |
cmake -B build/grid -DDAMASK_SOLVER=grid -DCMAKE_INSTALL_PREFIX=${PWD} cmake -B build/grid -DDAMASK_SOLVER=grid -DCMAKE_INSTALL_PREFIX=${PWD}
cmake --build build/grid --parallel cmake --build build/grid --parallel
@ -163,6 +178,6 @@ jobs:
cmake --build build/mesh --parallel cmake --build build/mesh --parallel
cmake --install build/mesh cmake --install build/mesh
- name: Run DAMASK - name: DAMASK - Run
run: | run: |
./bin/DAMASK_grid -l tensionX.yaml -g 20grains16x16x16.vti -w examples/grid ./bin/DAMASK_grid -l tensionX.yaml -g 20grains16x16x16.vti -w examples/grid