cminpack icon indicating copy to clipboard operation
cminpack copied to clipboard

improvement: BLAS support on all CI configurations on Github workflows

Open luau-project opened this issue 7 months ago • 3 comments

What?

I have improved BLAS building/testing on all supported CI configurations on Github workflows (Ubuntu, MSYS2, MSVC).

Why?

It eases the process to check if future changes to the code is somewhat damaging the current state for BLAS support.

How?

  • On Ubuntu, I simplified the building/testing with BLAS by installing the library libblas-dev;
  • On MSYS2, there are builtin packages named mingw-w64-x86_64-blas, mingw-w64-ucrt-x86_64-blas and mingw-w64-clang-x86_64-blas for every MSYS2 environment (mingw64, ucrt64, clang64), respectively. So, I'm just installing it and building/testing against it;
  • On MSVC, the most challenging changes, I had to do a major rework to support BLAS:
    1. First, since BLAS is a Fortran library, and there's not a "simple" manner to install a Fortran compiler which generates MSVC ABI-compatible binaries, I had to install LLVM flang-new https://flang.llvm.org/docs/ Fortran compiler from conda-forge channel using miniconda https://docs.anaconda.com/miniconda/;
    2. Then I download BLAS from its repository https://github.com/Reference-LAPACK/lapack and build the library with LLVM flang-new;
    3. Then I'm uploading the built BLAS library as artifact;
    4. All these steps from (i) to (iii) were done in a separate job, called build-BLAS;
    5. The main cminpack testing job (cminpack-visual-studio) downloads the built BLAS library from the build-BLAS job execution and performs the building / testing of cminpack.

[!NOTE]

In the MSVC CI rework, I had to remove the building/testing of x86 binaries.

luau-project avatar Jul 01 '24 19:07 luau-project