11name : continuous build
22
3- on : [push, pull_request]
3+ on : [push, pull_request, workflow_dispatch ]
44
55concurrency :
66 group : ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
@@ -11,18 +11,25 @@ permissions:
1111
1212jobs :
1313 build :
14- if : " github.repository == 'OpenMathLib/OpenBLAS'"
14+ if : " github.repository == 'OpenMathLib/OpenBLAS' || github.event_name == 'workflow_dispatch' "
1515 runs-on : ${{ matrix.os }}
1616
1717 strategy :
1818 fail-fast : false
1919 matrix :
20- os : [ubuntu-latest, macos-latest]
20+ os : [ubuntu-latest, macos-latest, ubuntu-24.04-arm]
21+ cc : [gcc, clang, clang-21]
2122 fortran : [gfortran, flang]
2223 build : [cmake, make]
2324 exclude :
25+ - os : macos-latest
26+ cc : gcc
27+ - os : macos-latest
28+ cc : clang-21
2429 - os : macos-latest
2530 fortran : flang
31+ - os : ubuntu-24.04-arm
32+ fortran : flang
2633
2734 steps :
2835 - name : Checkout repository
@@ -42,10 +49,23 @@ jobs:
4249 - name : Install Dependencies
4350 run : |
4451 if [ "$RUNNER_OS" == "Linux" ]; then
52+ cat << EOF | sudo tee -a /etc/apt/apt.conf.d/01norecommend
53+ APT::Install-Recommends "0";
54+ APT::Install-Suggests "0";
55+ EOF
4556 sudo apt-get update
46- sudo apt-get install -y gfortran cmake ccache
47- wget http://security.ubuntu.com/ubuntu/pool/universe/n/ncurses/libtinfo5_6.3-2ubuntu0.1_amd64.deb
48- sudo apt install ./libtinfo5_6.3-2ubuntu0.1_amd64.deb
57+ sudo apt-get install -y ccache
58+ if [ "${{ matrix.cc }}" == "clang-21" ]; then
59+ wget https://apt.llvm.org/llvm.sh
60+ chmod +x llvm.sh
61+ sudo ./llvm.sh 21
62+ fi
63+ if [ "${{ matrix.fortran }}" == "flang" ]; then
64+ wget http://security.ubuntu.com/ubuntu/pool/universe/n/ncurses/libtinfo5_6.3-2ubuntu0.1_amd64.deb
65+ sudo apt install ./libtinfo5_6.3-2ubuntu0.1_amd64.deb
66+ else
67+ sudo apt-get install -y ${{ matrix.fortran }}
68+ fi
4969 elif [ "$RUNNER_OS" == "macOS" ]; then
5070 # It looks like "gfortran" isn't working correctly unless "gcc" is re-installed.
5171 brew reinstall gcc
@@ -64,12 +84,12 @@ jobs:
6484 # GNU make and cmake call the compilers differently. It looks like
6585 # that causes the cache to mismatch. Keep the ccache for both build
6686 # tools separate to avoid polluting each other.
67- key : ccache-${{ runner.os }}-${{ matrix.build }}-${{ matrix.fortran }}-${{ github.ref }}-${{ github.sha }}
87+ key : ccache-${{ runner.os }}-${{ runner.arch }}-${{ matrix.build }}-${{ matrix.cc }}-${{ matrix.fortran }}-${{ github.ref }}-${{ github.sha }}
6888 # Restore a matching ccache cache entry. Prefer same branch and same Fortran compiler.
6989 restore-keys : |
70- ccache-${{ runner.os }}-${{ matrix.build }}-${{ matrix.fortran }}-${{ github.ref }}
71- ccache-${{ runner.os }}-${{ matrix.build }}-${{ matrix.fortran }}
72- ccache-${{ runner.os }}-${{ matrix.build }}
90+ ccache-${{ runner.os }}-${{ runner.arch }}-${{ matrix.build }}-${{ matrix.cc }}-${{ matrix.fortran }}-${{ github.ref }}
91+ ccache-${{ runner.os }}-${{ runner.arch }}-${{ matrix.build }}-${{ matrix.cc }}-${{ matrix.fortran }}
92+ ccache-${{ runner.os }}-${{ runner.arch }}-${{ matrix.build }}-${{ matrix.cc }}
7393
7494 - name : Configure ccache
7595 run : |
89109 echo "max_size = 300M" > ~/.ccache/ccache.conf
90110 echo "compression = true" >> ~/.ccache/ccache.conf
91111 ccache -s
92-
112+
93113 - name : Add gfortran runtime to link path
94114 if : matrix.build == 'make' && runner.os == 'macOS'
95115 run : |
@@ -110,7 +130,7 @@ jobs:
110130 fi
111131 case "${{ matrix.build }}" in
112132 "make")
113- make -j$(nproc) DYNAMIC_ARCH=1 USE_OPENMP=0 FC="ccache ${{ matrix.fortran }}"
133+ make -j$(nproc) DYNAMIC_ARCH=1 USE_OPENMP=0 CC="ccache ${{ matrix.cc }}" FC="ccache ${{ matrix.fortran }}"
114134 ;;
115135 "cmake")
116136 mkdir build && cd build
@@ -119,6 +139,7 @@ jobs:
119139 -DBUILD_WITHOUT_LAPACK=0 \
120140 -DCMAKE_VERBOSE_MAKEFILE=ON \
121141 -DCMAKE_BUILD_TYPE=Release \
142+ -DCMAKE_C_COMPILER=${{ matrix.cc }} \
122143 -DCMAKE_Fortran_COMPILER=${{ matrix.fortran }} \
123144 -DCMAKE_C_COMPILER_LAUNCHER=ccache \
124145 -DCMAKE_Fortran_COMPILER_LAUNCHER=ccache \
@@ -142,13 +163,13 @@ jobs:
142163 "make")
143164 MAKE_FLAGS='DYNAMIC_ARCH=1 USE_OPENMP=0'
144165 echo "::group::Tests in 'test' directory"
145- make -C test $MAKE_FLAGS FC="ccache ${{ matrix.fortran }}"
166+ make -C test $MAKE_FLAGS CC="ccache ${{ matrix.cc }}" FC="ccache ${{ matrix.fortran }}"
146167 echo "::endgroup::"
147168 echo "::group::Tests in 'ctest' directory"
148- make -C ctest $MAKE_FLAGS FC="ccache ${{ matrix.fortran }}"
169+ make -C ctest $MAKE_FLAGS CC="ccache ${{ matrix.cc }}" FC="ccache ${{ matrix.fortran }}"
149170 echo "::endgroup::"
150171 echo "::group::Tests in 'utest' directory"
151- make -C utest $MAKE_FLAGS FC="ccache ${{ matrix.fortran }}"
172+ make -C utest $MAKE_FLAGS CC="ccache ${{ matrix.cc }}" FC="ccache ${{ matrix.fortran }}"
152173 echo "::endgroup::"
153174 ;;
154175 "cmake")
@@ -372,15 +393,15 @@ jobs:
372393 steps :
373394 - name : Checkout repository
374395 uses : actions/checkout@v3
375-
396+
376397 - name : Install Dependencies
377398 run : |
378399 sudo apt-get update
379400 sudo apt-get install -y gcc gfortran make
380-
401+
381402 - name : Build OpenBLAS
382403 run : |
383- make -j${nproc}
404+ make -j${nproc}
384405 make -j${nproc} lapack-test
385-
386-
406+
407+
0 commit comments