Skip to content

Commit 311331f

Browse files
committed
CI: split and optimize the BLAS CI process
1 parent 0ce2372 commit 311331f

File tree

3 files changed

+140
-134
lines changed

3 files changed

+140
-134
lines changed

.github/workflows/CI.yml

-66
Original file line numberDiff line numberDiff line change
@@ -92,69 +92,3 @@ jobs:
9292
- name: Install project
9393
if: ${{ contains(matrix.build, 'cmake') }}
9494
run: cmake --install ${{ env.BUILD_DIR }}
95-
96-
Build-with-MKL:
97-
runs-on: ubuntu-latest
98-
strategy:
99-
fail-fast: false
100-
matrix:
101-
toolchain:
102-
- {compiler: intel, version: '2024.1'}
103-
build: [cmake]
104-
env:
105-
BUILD_DIR: ${{ matrix.build == 'cmake' && 'build' || '.' }}
106-
APT_PACKAGES: >-
107-
intel-oneapi-mkl
108-
intel-oneapi-mkl-devel
109-
steps:
110-
- name: Checkout code
111-
uses: actions/checkout@v4
112-
113-
- name: Set up Python 3.x
114-
uses: actions/setup-python@v5 # Use pip to install latest CMake, & FORD/Jin2For, etc.
115-
with:
116-
python-version: 3.x
117-
118-
- name: Install fypp
119-
run: pip install --upgrade fypp ninja
120-
121-
- name: Setup Fortran compiler
122-
uses: fortran-lang/setup-fortran@v1.6.1
123-
id: setup-fortran
124-
with:
125-
compiler: ${{ matrix.toolchain.compiler }}
126-
version: ${{ matrix.toolchain.version }}
127-
128-
- name: Install Intel oneAPI MKL
129-
run: |
130-
sudo apt-get install ${APT_PACKAGES}
131-
source /opt/intel/oneapi/mkl/latest/env/vars.sh
132-
printenv >> $GITHUB_ENV
133-
134-
# Build and test with external BLAS and LAPACK (MKL on Ubuntu with Intel compilers)
135-
- name: Configure with CMake and MKL
136-
run: >-
137-
cmake -Wdev -G Ninja
138-
-DCMAKE_BUILD_TYPE=Release
139-
-DCMAKE_MAXIMUM_RANK:String=4
140-
-DCMAKE_INSTALL_PREFIX=$PWD/_dist
141-
-DFIND_BLAS:STRING=TRUE
142-
-S . -B ${{ env.BUILD_DIR }}
143-
144-
- name: Build and compile with MKL
145-
run: cmake --build ${{ env.BUILD_DIR }} --parallel
146-
147-
- name: catch build fail with MKL
148-
if: failure()
149-
run: cmake --build ${{ env.BUILD_DIR }} --verbose --parallel 1
150-
151-
- name: test with MKL
152-
run: >-
153-
ctest
154-
--test-dir ${{ env.BUILD_DIR }}
155-
--parallel
156-
--output-on-failure
157-
--no-tests=error
158-
159-
- name: Install project with MKL
160-
run: cmake --install ${{ env.BUILD_DIR }}

.github/workflows/ci_BLAS.yml

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

.github/workflows/ci_windows.yml

-68
Original file line numberDiff line numberDiff line change
@@ -67,71 +67,3 @@ jobs:
6767

6868
- name: Install project
6969
run: PATH=$PATH:/mingw64/bin/ cmake --install build
70-
71-
msys2-build-with-OpenBLAS:
72-
runs-on: windows-latest
73-
strategy:
74-
fail-fast: false
75-
matrix:
76-
include: [
77-
{ msystem: MINGW64, arch: x86_64 }
78-
]
79-
defaults:
80-
run:
81-
shell: msys2 {0}
82-
steps:
83-
- uses: actions/checkout@v2
84-
85-
- name: Setup MinGW native environment
86-
uses: msys2/setup-msys2@v2
87-
with:
88-
msystem: ${{ matrix.msystem }}
89-
update: false
90-
install: >-
91-
git
92-
mingw-w64-${{ matrix.arch }}-gcc
93-
mingw-w64-${{ matrix.arch }}-gcc-fortran
94-
mingw-w64-${{ matrix.arch }}-python
95-
mingw-w64-${{ matrix.arch }}-python-pip
96-
mingw-w64-${{ matrix.arch }}-python-setuptools
97-
mingw-w64-${{ matrix.arch }}-cmake
98-
mingw-w64-${{ matrix.arch }}-ninja
99-
mingw-w64-${{ matrix.arch }}-openblas
100-
101-
- name: Install fypp
102-
run: pip install fypp
103-
104-
# Build and test with external BLAS and LAPACK (OpenBLAS on MINGW64)
105-
- name: Configure with CMake and OpenBLAS
106-
run: >-
107-
PATH=$PATH:/mingw64/bin/ cmake
108-
-Wdev
109-
-B build
110-
-DCMAKE_BUILD_TYPE=Debug
111-
-DCMAKE_Fortran_FLAGS_DEBUG="-Wall -Wextra -Wimplicit-interface -fPIC -g -fcheck=all -fbacktrace"
112-
-DCMAKE_MAXIMUM_RANK:String=4
113-
-DCMAKE_INSTALL_PREFIX=$PWD/_dist
114-
-DFIND_BLAS:STRING=TRUE
115-
env:
116-
FC: gfortran
117-
CC: gcc
118-
CXX: g++
119-
120-
- name: CMake build with OpenBLAS
121-
run: PATH=$PATH:/mingw64/bin/ cmake --build build --parallel
122-
123-
- name: catch build fail
124-
if: failure()
125-
run: PATH=$PATH:/mingw64/bin/ cmake --build build --verbose --parallel 1
126-
127-
- name: CTest with OpenBLAS
128-
run: PATH=$PATH:/mingw64/bin/ ctest --test-dir build --output-on-failure --parallel -V -LE quadruple_precision
129-
130-
- uses: actions/upload-artifact@v1
131-
if: failure()
132-
with:
133-
name: WindowsCMakeTestlog_openblas
134-
path: build/Testing/Temporary/LastTest.log
135-
136-
- name: Install project with OpenBLAS
137-
run: PATH=$PATH:/mingw64/bin/ cmake --install build

0 commit comments

Comments
 (0)