| @@ -18,8 +18,10 @@ jobs: | |||||
| fail-fast: false | fail-fast: false | ||||
| matrix: | matrix: | ||||
| build: [cmake, make] | build: [cmake, make] | ||||
| fortran: [gfortran, flang-new] | |||||
| openmp: [0, 1] | |||||
| ilp64: [0, 1] | |||||
| steps: | steps: | ||||
| - name: Checkout repository | - name: Checkout repository | ||||
| uses: actions/checkout@v3 | uses: actions/checkout@v3 | ||||
| @@ -43,6 +45,10 @@ jobs: | |||||
| # It looks like "gfortran" isn't working correctly unless "gcc" is re-installed. | # It looks like "gfortran" isn't working correctly unless "gcc" is re-installed. | ||||
| brew reinstall gcc | brew reinstall gcc | ||||
| brew install coreutils cmake ccache | brew install coreutils cmake ccache | ||||
| brew install llvm | |||||
| - export PATH=/opt/homebrew/opt/llvm/bin:$PATH | |||||
| - export LDFLAGS="-L/opt/homebrew/opt/llvm/lib" | |||||
| - export CPPFLAGS="-I/opt/homebrew/opt/llvm/include" | |||||
| else | else | ||||
| echo "::error::$RUNNER_OS not supported" | echo "::error::$RUNNER_OS not supported" | ||||
| exit 1 | exit 1 | ||||
| @@ -60,7 +66,7 @@ jobs: | |||||
| key: ccache-${{ runner.os }}-${{ matrix.build }}-${{ matrix.fortran }}-${{ github.ref }}-${{ github.sha }} | key: ccache-${{ runner.os }}-${{ matrix.build }}-${{ matrix.fortran }}-${{ github.ref }}-${{ github.sha }} | ||||
| # Restore a matching ccache cache entry. Prefer same branch and same Fortran compiler. | # Restore a matching ccache cache entry. Prefer same branch and same Fortran compiler. | ||||
| restore-keys: | | restore-keys: | | ||||
| ccache-${{ runner.os }}-${{ matrix.build }}-${{ github.ref }} | |||||
| ccache-${{ runner.os }}-${{ matrix.build }}-${{{matrix.fortran }}-${{ github.ref }} | |||||
| ccache-${{ runner.os }}-${{ matrix.build }} | ccache-${{ runner.os }}-${{ matrix.build }} | ||||
| - name: Configure ccache | - name: Configure ccache | ||||
| @@ -86,11 +92,13 @@ jobs: | |||||
| run: | | run: | | ||||
| case "${{ matrix.build }}" in | case "${{ matrix.build }}" in | ||||
| "make") | "make") | ||||
| make -j$(nproc) DYNAMIC_ARCH=1 USE_OPENMP=0 FC="ccache ${{ matrix.fortran }}" | |||||
| make -j$(nproc) DYNAMIC_ARCH=1 USE_OPENMP=${{matrix.openmp}} INTERFACE64=${{matrix.ilp64}} FC="ccache ${{ matrix.fortran }}" | |||||
| ;; | ;; | ||||
| "cmake") | "cmake") | ||||
| mkdir build && cd build | mkdir build && cd build | ||||
| cmake -DDYNAMIC_ARCH=1 \ | cmake -DDYNAMIC_ARCH=1 \ | ||||
| -DUSE_OPENMP=${{matrix.openmp}} | |||||
| -DINTERFACE64=${{matrix.ilp64}} | |||||
| -DNOFORTRAN=0 \ | -DNOFORTRAN=0 \ | ||||
| -DBUILD_WITHOUT_LAPACK=0 \ | -DBUILD_WITHOUT_LAPACK=0 \ | ||||
| -DCMAKE_VERBOSE_MAKEFILE=ON \ | -DCMAKE_VERBOSE_MAKEFILE=ON \ | ||||