|
| 1 | +name: CI_BLAS |
| 2 | + |
| 3 | +on: [push, pull_request] |
| 4 | + |
| 5 | +env: |
| 6 | + CTEST_TIME_TIMEOUT: "5" # some failures hang forever |
| 7 | + CMAKE_GENERATOR: Ninja |
| 8 | + |
| 9 | +jobs: |
| 10 | + msys2-build: |
| 11 | + runs-on: windows-latest |
| 12 | + strategy: |
| 13 | + fail-fast: false |
| 14 | + matrix: |
| 15 | + include: [{ msystem: UCRT64, arch: x86_64 }] |
| 16 | + defaults: |
| 17 | + run: |
| 18 | + shell: msys2 {0} |
| 19 | + steps: |
| 20 | + - uses: actions/checkout@v2 |
| 21 | + |
| 22 | + - name: Setup MinGW native environment |
| 23 | + uses: msys2/setup-msys2@v2 |
| 24 | + with: |
| 25 | + msystem: ${{ matrix.msystem }} |
| 26 | + update: false |
| 27 | + install: >- |
| 28 | + git |
| 29 | + mingw-w64-${{ matrix.msystem }}-${{ matrix.arch }}-gcc |
| 30 | + mingw-w64-${{ matrix.msystem }}-${{ matrix.arch }}-gcc-fortran |
| 31 | + mingw-w64-${{ matrix.msystem }}-${{ matrix.arch }}-python |
| 32 | + mingw-w64-${{ matrix.msystem }}-${{ matrix.arch }}-python-fypp |
| 33 | + mingw-w64-${{ matrix.msystem }}-${{ matrix.arch }}-cmake |
| 34 | + mingw-w64-${{ matrix.msystem }}-${{ matrix.arch }}-ninja |
| 35 | + mingw-w64-${{ matrix.msystem }}-${{ matrix.arch }}-openblas |
| 36 | +
|
| 37 | + # Build and test with external BLAS and LAPACK (OpenBLAS on UCRT64) |
| 38 | + - name: Configure with CMake and OpenBLAS |
| 39 | + run: >- |
| 40 | + PATH=$PATH:/ucrt64/bin/ cmake |
| 41 | + -Wdev |
| 42 | + -B build |
| 43 | + -DCMAKE_BUILD_TYPE=Debug |
| 44 | + -DCMAKE_Fortran_FLAGS_DEBUG="-Wall -Wextra -Wimplicit-interface -fPIC -g -fcheck=all -fbacktrace" |
| 45 | + -DCMAKE_MAXIMUM_RANK:String=4 |
| 46 | + -DCMAKE_INSTALL_PREFIX=$PWD/_dist |
| 47 | + -DFIND_BLAS:STRING=TRUE |
| 48 | + env: |
| 49 | + FC: gfortran |
| 50 | + CC: gcc |
| 51 | + CXX: g++ |
| 52 | + |
| 53 | + - name: CMake build with OpenBLAS |
| 54 | + run: PATH=$PATH:/ucrt64/bin/ cmake --build build --parallel |
| 55 | + |
| 56 | + - name: catch build fail |
| 57 | + if: failure() |
| 58 | + run: PATH=$PATH:/ucrt64/bin/ cmake --build build --verbose --parallel 1 |
| 59 | + |
| 60 | + - name: CTest with OpenBLAS |
| 61 | + run: PATH=$PATH:/ucrt64/bin/ ctest --test-dir build --output-on-failure --parallel -V -LE quadruple_precision |
| 62 | + |
| 63 | + - uses: actions/upload-artifact@v1 |
| 64 | + if: failure() |
| 65 | + with: |
| 66 | + name: WindowsCMakeTestlog_openblas |
| 67 | + path: build/Testing/Temporary/LastTest.log |
| 68 | + |
| 69 | + - name: Install project with OpenBLAS |
| 70 | + run: PATH=$PATH:/ucrt64/bin/ cmake --install build |
| 71 | + |
| 72 | + Build: |
| 73 | + runs-on: ubuntu-latest |
| 74 | + strategy: |
| 75 | + fail-fast: false |
| 76 | + matrix: |
| 77 | + toolchain: |
| 78 | + - { compiler: intel, version: "2024.1" } |
| 79 | + build: [cmake] |
| 80 | + env: |
| 81 | + BUILD_DIR: ${{ matrix.build == 'cmake' && 'build' || '.' }} |
| 82 | + APT_PACKAGES: >- |
| 83 | + intel-oneapi-mkl |
| 84 | + intel-oneapi-mkl-devel |
| 85 | + steps: |
| 86 | + - name: Checkout code |
| 87 | + uses: actions/checkout@v4 |
| 88 | + |
| 89 | + - name: Set up Python 3.x |
| 90 | + uses: actions/setup-python@v5 # Use pip to install latest CMake, & FORD/Jin2For, etc. |
| 91 | + with: |
| 92 | + python-version: 3.x |
| 93 | + |
| 94 | + - name: Install fypp |
| 95 | + run: pip install --upgrade fypp ninja |
| 96 | + |
| 97 | + - name: Setup Fortran compiler |
| 98 | + uses: fortran-lang/setup-fortran@v1.6.1 |
| 99 | + id: setup-fortran |
| 100 | + with: |
| 101 | + compiler: ${{ matrix.toolchain.compiler }} |
| 102 | + version: ${{ matrix.toolchain.version }} |
| 103 | + |
| 104 | + - name: Install Intel oneAPI MKL |
| 105 | + run: | |
| 106 | + sudo apt-get install ${APT_PACKAGES} |
| 107 | + source /opt/intel/oneapi/mkl/latest/env/vars.sh |
| 108 | + printenv >> $GITHUB_ENV |
| 109 | +
|
| 110 | + # Build and test with external BLAS and LAPACK (MKL on Ubuntu with Intel compilers) |
| 111 | + - name: Configure with CMake and MKL |
| 112 | + run: >- |
| 113 | + cmake -Wdev -G Ninja |
| 114 | + -DCMAKE_BUILD_TYPE=Release |
| 115 | + -DCMAKE_MAXIMUM_RANK:String=4 |
| 116 | + -DCMAKE_INSTALL_PREFIX=$PWD/_dist |
| 117 | + -DFIND_BLAS:STRING=TRUE |
| 118 | + -S . -B ${{ env.BUILD_DIR }} |
| 119 | +
|
| 120 | + - name: Build and compile with MKL |
| 121 | + run: cmake --build ${{ env.BUILD_DIR }} --parallel |
| 122 | + |
| 123 | + - name: catch build fail with MKL |
| 124 | + if: failure() |
| 125 | + run: cmake --build ${{ env.BUILD_DIR }} --verbose --parallel 1 |
| 126 | + |
| 127 | + - name: test with MKL |
| 128 | + run: >- |
| 129 | + ctest |
| 130 | + --test-dir ${{ env.BUILD_DIR }} |
| 131 | + --parallel |
| 132 | + --output-on-failure |
| 133 | + --no-tests=error |
| 134 | +
|
| 135 | + - name: Install project with MKL |
| 136 | + run: cmake --install ${{ env.BUILD_DIR }} |
0 commit comments