cminpack
cminpack copied to clipboard
improvement: BLAS support on all CI configurations on Github workflows
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
andmingw-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:
- 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/; - Then I download BLAS from its repository https://github.com/Reference-LAPACK/lapack and build the library with
LLVM flang-new
; - Then I'm uploading the built BLAS library as artifact;
- All these steps from (i) to (iii) were done in a separate job, called
build-BLAS
; - The main cminpack testing job (
cminpack-visual-studio
) downloads the built BLAS library from thebuild-BLAS
job execution and performs the building / testing of cminpack.
- 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
[!NOTE]
In the MSVC CI rework, I had to remove the building/testing of x86 binaries.