Blas\Lapack (#52) #32
This file contains hidden or 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: Compiler Compatibility | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - release/* | |
| schedule: | |
| - cron: "17 4 * * 1" | |
| workflow_dispatch: | |
| concurrency: | |
| group: fortran-toolchain-smoke-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| PRIK_IFX_VERSION: "2026.1.1" | |
| PRIK_FLANG_VERSION: "22.1.8" | |
| PRIK_FLANG_RUNTIME_VERSION: "22.1.7" | |
| jobs: | |
| toolchain-smoke: | |
| name: Compiler smoke · ${{ matrix.display_name }} | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 60 | |
| permissions: | |
| contents: read | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - toolchain: ifx | |
| display_name: Ubuntu 24.04 · Intel IFX 2026.1.1 · Python 3.12 | |
| environment: prik-ifx-2026.1.1 | |
| fortran_compiler: ifx | |
| c_compiler: icx | |
| cache_version: "2026.1.1-v2" | |
| - toolchain: flang | |
| display_name: Ubuntu 24.04 · LLVM Flang 22.1.8 · Python 3.12 | |
| environment: prik-flang-22.1.8 | |
| fortran_compiler: flang | |
| c_compiler: clang | |
| cache_version: "22.1.8-runtime-22.1.7-v1" | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 2 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install test dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install -e ".[qa]" | |
| - name: Cache compiler environment | |
| id: compiler-cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ runner.temp }}/${{ matrix.environment }} | |
| key: fortran-toolchain-${{ runner.os }}-${{ matrix.toolchain }}-${{ matrix.cache_version }} | |
| - name: Install Intel IFX and ICX | |
| if: matrix.toolchain == 'ifx' && steps.compiler-cache.outputs.cache-hit != 'true' | |
| shell: bash | |
| run: | | |
| conda create --yes --solver=libmamba \ | |
| --prefix "$RUNNER_TEMP/${{ matrix.environment }}" \ | |
| --override-channels \ | |
| --channel https://software.repos.intel.com/python/conda/ \ | |
| --channel conda-forge \ | |
| "ifx_linux-64=$PRIK_IFX_VERSION" \ | |
| "dpcpp_linux-64=$PRIK_IFX_VERSION" | |
| - name: Install LLVM Flang and Clang | |
| if: matrix.toolchain == 'flang' && steps.compiler-cache.outputs.cache-hit != 'true' | |
| shell: bash | |
| run: | | |
| conda create --yes --solver=libmamba \ | |
| --prefix "$RUNNER_TEMP/${{ matrix.environment }}" \ | |
| --override-channels \ | |
| --channel conda-forge \ | |
| "flang=$PRIK_FLANG_VERSION" \ | |
| "clang=$PRIK_FLANG_VERSION" \ | |
| "libflang-rt=$PRIK_FLANG_RUNTIME_VERSION" | |
| - name: Export coherent compiler profile | |
| shell: bash | |
| run: | | |
| toolchain_prefix="$RUNNER_TEMP/${{ matrix.environment }}" | |
| echo "$toolchain_prefix/bin" >> "$GITHUB_PATH" | |
| echo "LD_LIBRARY_PATH=$toolchain_prefix/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" >> "$GITHUB_ENV" | |
| - name: Verify compiler pair | |
| shell: bash | |
| run: | | |
| "${RUNNER_TEMP}/${{ matrix.environment }}/bin/${{ matrix.fortran_compiler }}" --version | |
| "${RUNNER_TEMP}/${{ matrix.environment }}/bin/${{ matrix.c_compiler }}" --version | |
| - name: Show repository-owned lane plan | |
| run: | | |
| python tools/run_fortran_toolchain_lane.py \ | |
| --compiler "$RUNNER_TEMP/${{ matrix.environment }}/bin/${{ matrix.fortran_compiler }}" \ | |
| --junit-dir "$RUNNER_TEMP" \ | |
| --plan | |
| - name: Run profile checks and strict smoke | |
| env: | |
| PYTHONPATH: . | |
| HYPOTHESIS_PROFILE: ci | |
| run: | | |
| python tools/run_fortran_toolchain_lane.py \ | |
| --compiler "$RUNNER_TEMP/${{ matrix.environment }}/bin/${{ matrix.fortran_compiler }}" \ | |
| --junit-dir "$RUNNER_TEMP" | |
| - name: Summarize failed pytest nodes | |
| if: failure() | |
| shell: bash | |
| run: | | |
| shopt -s nullglob | |
| reports=("$RUNNER_TEMP"/pytest-toolchain-*-results.xml) | |
| for report in "${reports[@]}"; do | |
| python tools/print_pytest_failures.py "$report" | |
| done | |
| macos-flang-smoke: | |
| name: Compiler smoke · macOS 15 ARM64 · LLVM Flang · Python 3.12 | |
| runs-on: macos-15 | |
| timeout-minutes: 60 | |
| permissions: | |
| contents: read | |
| env: | |
| HOMEBREW_NO_AUTO_UPDATE: "1" | |
| PRIK_MACOS_FLANG_ENVIRONMENT: prik-flang-macos | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 2 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install test dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install -e ".[qa]" | |
| - name: Install LLVM Flang and Clang | |
| shell: bash | |
| run: | | |
| brew install flang | |
| toolchain_prefix="$RUNNER_TEMP/$PRIK_MACOS_FLANG_ENVIRONMENT" | |
| flang_prefix="$(brew --prefix flang)" | |
| llvm_prefix="$(brew --prefix llvm)" | |
| flang_c_include="$flang_prefix/include/flang" | |
| test -f "$flang_c_include/ISO_Fortran_binding.h" | |
| mkdir -p "$toolchain_prefix/bin" | |
| ln -sf "$flang_prefix/bin/flang" "$toolchain_prefix/bin/flang" | |
| ln -sf "$llvm_prefix/bin/clang" "$toolchain_prefix/bin/clang" | |
| echo "$toolchain_prefix/bin" >> "$GITHUB_PATH" | |
| echo "C_INCLUDE_PATH=$flang_c_include${C_INCLUDE_PATH:+:$C_INCLUDE_PATH}" >> "$GITHUB_ENV" | |
| echo "DYLD_LIBRARY_PATH=$flang_prefix/lib:$llvm_prefix/lib${DYLD_LIBRARY_PATH:+:$DYLD_LIBRARY_PATH}" \ | |
| >> "$GITHUB_ENV" | |
| - name: Verify macOS compiler pair | |
| shell: bash | |
| run: | | |
| echo "runner image: ${ImageOS:-unknown} ${ImageVersion:-unknown}" | |
| sw_vers | |
| uname -m | |
| python --version | |
| command -v flang | |
| flang --version | |
| command -v clang | |
| clang --version | |
| printf '#include <ISO_Fortran_binding.h>\n' | | |
| clang -std=c99 -fsyntax-only -x c - | |
| - name: Show repository-owned lane plan | |
| run: | | |
| python tools/run_fortran_toolchain_lane.py \ | |
| --compiler flang \ | |
| --junit-dir "$RUNNER_TEMP" \ | |
| --plan | |
| - name: Run profile checks and strict smoke | |
| env: | |
| PYTHONPATH: . | |
| HYPOTHESIS_PROFILE: ci | |
| run: | | |
| python tools/run_fortran_toolchain_lane.py \ | |
| --compiler flang \ | |
| --junit-dir "$RUNNER_TEMP" | |
| - name: Summarize failed pytest nodes | |
| if: failure() | |
| shell: bash | |
| run: | | |
| shopt -s nullglob | |
| reports=("$RUNNER_TEMP"/pytest-toolchain-*-results.xml) | |
| for report in "${reports[@]}"; do | |
| python tools/print_pytest_failures.py "$report" | |
| done |