Update CI to test nvidia-hpc compilers #19
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Meson | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
types: [opened, synchronize, reopened] | |
jobs: | |
build: | |
name: GALAHAD/${{ matrix.os }}/${{ matrix.compiler }}/${{ matrix.version }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [windows-latest, ubuntu-latest, macos-latest] | |
version: ['12'] | |
include: | |
- compiler: gcc | |
int64: false | |
- os: ubuntu-latest | |
compiler: gcc | |
version: '13' | |
int64: true | |
allow_failure: true | |
- os: windows-latest | |
compiler: intel | |
version: '2023.2' | |
int64: false | |
allow_failure: true | |
- os: ubuntu-latest | |
compiler: intel | |
version: '2023.2' | |
int64: false | |
allow_failure: true | |
- os: ubuntu-latest | |
compiler: nvidia-hpc | |
version: '23.11' | |
int64: false | |
allow_failure: true | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Check out GALAHAD | |
uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Install Meson and Ninja | |
run: pip install meson ninja numpy | |
- name: Set the environment variables GALAHAD, JULIA_GALAHAD_LIBRARY_PATH, DEPS and LIBDIR | |
shell: bash | |
run: | | |
echo "GALAHAD=$GITHUB_WORKSPACE" >> $GITHUB_ENV | |
echo "JULIA_GALAHAD_LIBRARY_PATH=$GITHUB_WORKSPACE/galahad/lib" >> $GITHUB_ENV | |
echo "DEPS=$GITHUB_WORKSPACE/.." >> $GITHUB_ENV | |
if [[ "${{matrix.os}}" == "windows-latest" ]]; then | |
echo "LIBDIR=bin" >> $GITHUB_ENV | |
else | |
echo "LIBDIR=lib" >> $GITHUB_ENV | |
fi | |
- name: Install dependencies | |
shell: bash | |
run: | | |
cd $DEPS | |
mkdir deps | |
if [[ "${{matrix.int64}}" == "true" ]]; then | |
PLATFORM="" | |
if [[ "${{matrix.os}}" == "ubuntu-latest" ]]; then | |
PLATFORM="x86_64-linux-gnu" | |
fi | |
if [[ "${{matrix.os}}" == "macos-latest" ]]; then | |
PLATFORM=x86_64-apple-darwin"" | |
fi | |
if [[ "${{matrix.os}}" == "windows-latest" ]]; then | |
PLATFORM="x86_64-w64-mingw32" | |
choco install wget | |
fi | |
wget https://github.com/JuliaBinaryWrappers/OpenBLAS_jll.jl/releases/download/OpenBLAS-v0.3.25%2B0/OpenBLAS.v0.3.25.$PLATFORM-libgfortran5.tar.gz | |
tar -xzvf OpenBLAS.v0.3.25.$PLATFORM-libgfortran5.tar.gz -C deps | |
fi | |
- name: Set the environment variable LD_LIBRARY_PATH | |
if: matrix.os != 'windows-latest' | |
shell: bash | |
run: echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$GITHUB_WORKSPACE/galahad/lib" >> $GITHUB_ENV | |
- name: Set environment variables for OpenMP | |
if: matrix.os != 'windows-latest' | |
shell: bash | |
run: | | |
echo "OMP_CANCELLATION=TRUE" >> $GITHUB_ENV | |
echo "OMP_PROC_BIND=TRUE" >> $GITHUB_ENV | |
- name: Install compilers | |
uses: fortran-lang/setup-fortran@v1 | |
with: | |
compiler: ${{ matrix.compiler }} | |
version: ${{ matrix.version }} | |
- name: Update Intel compilers | |
if: matrix.compiler == 'intel' | |
shell: bash | |
run: echo "FC=ifort" >> $GITHUB_ENV | |
- name: Setup GALAHAD | |
shell: bash | |
run: | | |
if [[ "${{matrix.int64}}" == "true" ]]; then | |
meson setup builddir --buildtype=debug -Dexamples=true -Dtests=true \ | |
--prefix=$GITHUB_WORKSPACE/galahad -Dpythoniface=true \ | |
-Dgalahad_int64=true -Dlibblas_path=$DEPS/deps/$LIBDIR \ | |
-Dliblapack_path=$DEPS/deps/$LIBDIR -Dlibblas=openblas64_ \ | |
-Dliblapack=openblas64_ | |
elif [[ "${{matrix.compiler}}" == "nvidia-hpc" ]]; then | |
meson setup builddir --buildtype=debug -Dexamples=true -Dtests=true \ | |
--prefix=$GITHUB_WORKSPACE/galahad -Dpythoniface=true \ | |
-Dc_std=none -Dcpp_std=none -Dgalahad_int64=false | |
else | |
meson setup builddir --buildtype=debug -Dexamples=true -Dtests=true \ | |
--prefix=$GITHUB_WORKSPACE/galahad -Dpythoniface=true \ | |
-Dgalahad_int64=false | |
fi | |
- name: Build GALAHAD | |
shell: bash | |
run: | | |
meson compile -C builddir | |
- uses: actions/upload-artifact@v3 | |
if: failure() | |
with: | |
name: ${{ matrix.os }}_${{ matrix.compiler }}_${{ matrix.version }}_meson-log.txt | |
path: builddir/meson-logs/meson-log.txt | |
- name: Install GALAHAD | |
shell: bash | |
run: | | |
meson install -C builddir | |
- uses: actions/upload-artifact@v3 | |
if: failure() | |
with: | |
name: ${{ matrix.os }}_${{ matrix.compiler }}_${{ matrix.version }}_install-log.txt | |
path: builddir/meson-logs/install-log.txt | |
# Uncomment this section to obtain ssh access to VM | |
# - name: Setup tmate session | |
# if: matrix.os == 'windows-latest' | |
# uses: mxschmitt/action-tmate@v3 | |
- name: Test GALAHAD | |
shell: bash | |
run: | | |
meson test -C builddir | |
- uses: actions/upload-artifact@v3 | |
if: failure() | |
with: | |
name: ${{ matrix.os }}_${{ matrix.compiler }}_${{ matrix.version }}_testlog.txt | |
path: builddir/meson-logs/testlog.txt |