Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d134ca0070 | ||
|
|
525fccc323 |
@@ -0,0 +1,413 @@
|
||||
name: CMake
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- try-github-actions-for-windows
|
||||
paths:
|
||||
- .github/workflows/cmake.yml
|
||||
- lapack_testing.py
|
||||
- '**CMakeLists.txt'
|
||||
- 'BLAS/**'
|
||||
- 'CBLAS/**'
|
||||
- 'CMAKE/**'
|
||||
- 'INSTALL/**'
|
||||
- 'LAPACKE/**'
|
||||
- 'SRC/**'
|
||||
- 'TESTING/**'
|
||||
- '!**README'
|
||||
- '!**Makefile'
|
||||
- '!**md'
|
||||
pull_request:
|
||||
paths:
|
||||
- .github/workflows/cmake.yml
|
||||
- lapack_testing.py
|
||||
- '**CMakeLists.txt'
|
||||
- 'BLAS/**'
|
||||
- 'CBLAS/**'
|
||||
- 'CMAKE/**'
|
||||
- 'INSTALL/**'
|
||||
- 'LAPACKE/**'
|
||||
- 'SRC/**'
|
||||
- 'TESTING/**'
|
||||
- '!**README'
|
||||
- '!**Makefile'
|
||||
- '!**md'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
CFLAGS: "-Wall -pedantic"
|
||||
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
jobs:
|
||||
|
||||
test-install-release:
|
||||
# Use GNU compilers
|
||||
|
||||
# The CMake configure and build commands are platform agnostic and should work equally
|
||||
# well on Windows or Mac. You can convert this to a matrix build if you need
|
||||
# cross-platform coverage.
|
||||
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
env:
|
||||
BUILD_TYPE: Release
|
||||
FFLAGS: ${{ matrix.fflags }}
|
||||
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
os: [ macos-latest, ubuntu-latest, ubuntu-24.04-arm, windows-latest ]
|
||||
fflags: [
|
||||
"-Wall -Wno-unused-dummy-argument -Wno-unused-variable -Wno-unused-label -Werror=conversion -fimplicit-none -frecursive -fcheck=all",
|
||||
"-Wall -Wno-unused-dummy-argument -Wno-unused-variable -Wno-unused-label -Werror=conversion -fimplicit-none -frecursive -fcheck=all -fopenmp" ]
|
||||
|
||||
steps:
|
||||
|
||||
- name: Checkout LAPACK
|
||||
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
|
||||
|
||||
- name: Use GCC-14 on MacOS
|
||||
if: ${{ matrix.os == 'macos-latest' }}
|
||||
run: >
|
||||
cmake -B build -G Ninja
|
||||
-D CMAKE_C_COMPILER="gcc-14"
|
||||
-D CMAKE_Fortran_COMPILER="gfortran-14"
|
||||
-D USE_FLAT_NAMESPACE:BOOL=ON
|
||||
|
||||
- name: Special flags for Windows
|
||||
if: ${{ matrix.os == 'windows-latest' }}
|
||||
run: >
|
||||
cmake -B build -G Ninja
|
||||
-D CMAKE_EXE_LINKER_FLAGS="-Wl,--stack=2097152"
|
||||
|
||||
- name: Configure CMake
|
||||
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using
|
||||
# a single-configuration generator such as make or Ninja.
|
||||
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
|
||||
run: >
|
||||
cmake -B build -G Ninja
|
||||
-D CMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
|
||||
-D CMAKE_INSTALL_PREFIX=${{github.workspace}}/lapack_install
|
||||
-D CBLAS:BOOL=ON
|
||||
-D LAPACKE:BOOL=ON
|
||||
-D BUILD_TESTING:BOOL=ON
|
||||
-D LAPACKE_WITH_TMG:BOOL=ON
|
||||
-D BUILD_SHARED_LIBS:BOOL=ON
|
||||
|
||||
- name: Build
|
||||
# Execute tests defined by the CMake configuration.
|
||||
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
|
||||
run: cmake --build build
|
||||
|
||||
- name: Test with OpenMP
|
||||
working-directory: ${{github.workspace}}/build
|
||||
if: ${{ contains( matrix.fflags, 'openmp' ) && (matrix.os != 'windows-latest') }}
|
||||
run: ctest -C ${{env.BUILD_TYPE}} --schedule-random -j1 --output-on-failure --timeout 100
|
||||
|
||||
- name: Test
|
||||
working-directory: ${{github.workspace}}/build
|
||||
if: ${{ !contains( matrix.fflags, 'openmp' ) && (matrix.os != 'windows-latest') }}
|
||||
run: ctest -C ${{env.BUILD_TYPE}} --schedule-random -j2 --output-on-failure --timeout 100
|
||||
|
||||
- name: Upload test results
|
||||
id: upload-test-results
|
||||
# Uploaded even when the tests failed; that is when the results
|
||||
# are needed most. The test summary below links to the artifact.
|
||||
if: ${{ !cancelled() && matrix.os != 'windows-latest' }}
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||
with:
|
||||
name: test-results-${{ matrix.os }}-${{ contains( matrix.fflags, 'openmp' ) && 'openmp' || 'no-openmp' }}
|
||||
path: |
|
||||
build/TESTING/testing_results.txt
|
||||
build/lapack_testing_junit.xml
|
||||
if-no-files-found: warn
|
||||
retention-days: 14
|
||||
|
||||
- name: Write test summary
|
||||
if: ${{ !cancelled() && matrix.os != 'windows-latest' }}
|
||||
env:
|
||||
ARTIFACT_URL: ${{ steps.upload-test-results.outputs.artifact-url }}
|
||||
run: |
|
||||
cd build 2>/dev/null || exit 0
|
||||
python3 lapack_testing.py -d TESTING --merge-apis --markdown summary.md || true
|
||||
if [ -f summary.md ]; then
|
||||
cat summary.md >> "$GITHUB_STEP_SUMMARY"
|
||||
if [ -n "$ARTIFACT_URL" ]; then
|
||||
printf '\nThe raw output of every test run (`testing_results.txt`) and a JUnit XML report are in the [test-results artifact](%s).\n' "$ARTIFACT_URL" >> "$GITHUB_STEP_SUMMARY"
|
||||
fi
|
||||
fi
|
||||
|
||||
- name: Install
|
||||
# Since we use a single configuration generator, Ninja, there is no need to provide
|
||||
# the '--config ${{env.BUILD_TYPE}}' option for the build step in the 'cmake --build' command.
|
||||
run: cmake --build build --target install -j2
|
||||
|
||||
test-extended-api-only:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
env:
|
||||
BUILD_TYPE: Release
|
||||
FFLAGS: "-Wall -Wno-unused-dummy-argument -Wno-unused-variable -Wno-unused-label -Werror=conversion -fimplicit-none -frecursive -fcheck=all"
|
||||
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
shared_libs: [ OFF, ON ]
|
||||
|
||||
steps:
|
||||
|
||||
- name: Checkout LAPACK
|
||||
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
|
||||
|
||||
- name: Install ninja-build tool
|
||||
uses: seanmiddleditch/gha-setup-ninja@16b940825621068d98711680b6c3ff92201f8fc0 # v3
|
||||
|
||||
- name: Configure CMake
|
||||
run: >
|
||||
cmake -B build -G Ninja
|
||||
-D CMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
|
||||
-D BUILD_SHARED_LIBS:BOOL=${{matrix.shared_libs}}
|
||||
-D BUILD_DEFAULT_API:BOOL=OFF
|
||||
-D BUILD_INDEX64_EXT_API:BOOL=ON
|
||||
-D BUILD_TESTING:BOOL=ON
|
||||
-D CBLAS:BOOL=ON
|
||||
-D LAPACKE:BOOL=ON
|
||||
-D LAPACKE_WITH_TMG:BOOL=ON
|
||||
|
||||
- name: Build
|
||||
run: cmake --build build --config ${{env.BUILD_TYPE}}
|
||||
|
||||
- name: Test
|
||||
working-directory: ${{github.workspace}}/build
|
||||
run: ctest -C ${{env.BUILD_TYPE}} --schedule-random -j2 --output-on-failure --timeout 100
|
||||
|
||||
- name: Upload test results
|
||||
id: upload-test-results
|
||||
if: ${{ !cancelled() }}
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||
with:
|
||||
name: test-results-extended-api-shared-${{ matrix.shared_libs }}
|
||||
path: |
|
||||
build/TESTING/testing_results.txt
|
||||
build/lapack_testing_junit.xml
|
||||
if-no-files-found: warn
|
||||
retention-days: 14
|
||||
|
||||
- name: Write test summary
|
||||
if: ${{ !cancelled() }}
|
||||
env:
|
||||
ARTIFACT_URL: ${{ steps.upload-test-results.outputs.artifact-url }}
|
||||
run: |
|
||||
cd build 2>/dev/null || exit 0
|
||||
python3 lapack_testing.py -d TESTING --merge-apis --markdown summary.md || true
|
||||
if [ -f summary.md ]; then
|
||||
cat summary.md >> "$GITHUB_STEP_SUMMARY"
|
||||
if [ -n "$ARTIFACT_URL" ]; then
|
||||
printf '\nThe raw output of every test run (`testing_results.txt`) and a JUnit XML report are in the [test-results artifact](%s).\n' "$ARTIFACT_URL" >> "$GITHUB_STEP_SUMMARY"
|
||||
fi
|
||||
fi
|
||||
|
||||
coverage:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
env:
|
||||
BUILD_TYPE: Coverage
|
||||
FFLAGS: "-fopenmp"
|
||||
|
||||
steps:
|
||||
|
||||
- name: Checkout LAPACK
|
||||
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
|
||||
with:
|
||||
# Codecov cannot determine which commit a report belongs to from a
|
||||
# depth-1 clone of a pull request merge commit.
|
||||
fetch-depth: 2
|
||||
|
||||
- name: Install ninja-build tool
|
||||
uses: seanmiddleditch/gha-setup-ninja@16b940825621068d98711680b6c3ff92201f8fc0 # v3
|
||||
|
||||
- name: Configure CMake
|
||||
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using
|
||||
# a single-configuration generator such as make or Ninja.
|
||||
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
|
||||
run: >
|
||||
cmake -B build -G Ninja
|
||||
-D CMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
|
||||
-D CMAKE_INSTALL_PREFIX=${{github.workspace}}/lapack_install
|
||||
-D CBLAS:BOOL=ON
|
||||
-D LAPACKE:BOOL=ON
|
||||
-D BUILD_TESTING:BOOL=ON
|
||||
-D LAPACKE_WITH_TMG:BOOL=ON
|
||||
-D BUILD_SHARED_LIBS:BOOL=ON
|
||||
|
||||
- name: Install
|
||||
# Since we use a single configuration generator, Ninja, there is no need to provide
|
||||
# the '--config ${{env.BUILD_TYPE}}' option for the build step in the 'cmake --build' command.
|
||||
run: cmake --build build --target install -j2
|
||||
|
||||
- name: Test
|
||||
working-directory: ${{github.workspace}}/build
|
||||
run: ctest -C ${{env.BUILD_TYPE}} --schedule-random -j2 --output-on-failure --timeout 1800
|
||||
|
||||
- name: Coverage
|
||||
# Since we use a single configuration generator, Ninja, there is no need to provide
|
||||
# the '--config ${{env.BUILD_TYPE}}' option for the build step in the 'cmake --build' command.
|
||||
if: ${{ !cancelled() }}
|
||||
run: cmake --build build --target coverage
|
||||
|
||||
- name: Summarize coverage
|
||||
# The coverage target discards gcov's output, so an entirely empty report
|
||||
# is indistinguishable from a good one unless we look at the numbers.
|
||||
# Print them, and fail if nothing was measured at all.
|
||||
if: ${{ !cancelled() }}
|
||||
run: |
|
||||
gcda=$(find build -name '*.gcda' | wc -l)
|
||||
reports=$(find build -name '*.gcov' | wc -l)
|
||||
echo "counter files (.gcda): ${gcda}"
|
||||
echo "gcov reports (.gcov): ${reports}"
|
||||
if [ "${gcda}" -eq 0 ] || [ "${reports}" -eq 0 ]; then
|
||||
echo "::error::No coverage data was recorded; the report would be empty."
|
||||
exit 1
|
||||
fi
|
||||
# In a gcov report an executed line is prefixed with its execution
|
||||
# count and an unexecuted one with '#####' or '====='; everything else
|
||||
# ('-') is not executable.
|
||||
set -- $(find build -name '*.gcov' -exec cat {} + | awk '
|
||||
/^ *[0-9]+[*]?:/ { hit++; next }
|
||||
/^ *(#####|=====):/ { miss++ }
|
||||
END { printf "%d %d\n", hit + 0, hit + miss + 0 }')
|
||||
hit=$1
|
||||
total=$2
|
||||
if [ "${hit}" -eq 0 ]; then
|
||||
echo "::error::Coverage report is empty: not a single line was executed."
|
||||
exit 1
|
||||
fi
|
||||
percent=$(awk -v h="${hit}" -v t="${total}" 'BEGIN { printf "%.2f", 100 * h / t }')
|
||||
echo "lines executed: ${hit} of ${total} (${percent}%)"
|
||||
printf '## Coverage\n\n%s%% of lines executed (%s of %s) across %s files.\n' \
|
||||
"${percent}" "${hit}" "${total}" "${reports}" >> "$GITHUB_STEP_SUMMARY"
|
||||
|
||||
- name: Upload coverage report to Codecov
|
||||
if: ${{ !cancelled() }}
|
||||
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
|
||||
with:
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
# The .gcov files already exist, so there is no need for the uploader
|
||||
# to run gcov a second time itself.
|
||||
plugins: noop
|
||||
verbose: true
|
||||
# Pull requests from forks have no access to repository secrets, so
|
||||
# they can only upload if the Codecov organization permits tokenless
|
||||
# uploads. Do not turn that into a CI failure for the contributor.
|
||||
fail_ci_if_error: ${{ secrets.CODECOV_TOKEN != '' }}
|
||||
|
||||
test-install-cblas-lapacke-without-fortran-compiler:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
env:
|
||||
BUILD_TYPE: Release
|
||||
|
||||
steps:
|
||||
|
||||
- name: Checkout LAPACK
|
||||
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
|
||||
|
||||
- name: Install ninja-build tool
|
||||
uses: seanmiddleditch/gha-setup-ninja@16b940825621068d98711680b6c3ff92201f8fc0 # v3
|
||||
|
||||
- name: Install basics
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install -y cmake liblapack-dev libblas-dev
|
||||
sudo apt purge gfortran
|
||||
|
||||
- name: Configure CMake
|
||||
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using
|
||||
# a single-configuration generator such as make or Ninja.
|
||||
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
|
||||
run: >
|
||||
cmake -B build -G Ninja
|
||||
-D CMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
|
||||
-D CMAKE_INSTALL_PREFIX=${{github.workspace}}/lapack_install
|
||||
-D CBLAS:BOOL=ON
|
||||
-D LAPACKE:BOOL=ON
|
||||
-D USE_OPTIMIZED_BLAS:BOOL=ON
|
||||
-D USE_OPTIMIZED_LAPACK:BOOL=ON
|
||||
-D BUILD_TESTING:BOOL=OFF
|
||||
-D LAPACKE_WITH_TMG:BOOL=OFF
|
||||
-D BUILD_SHARED_LIBS:BOOL=ON
|
||||
|
||||
- name: Install
|
||||
# Since we use a single configuration generator, Ninja, there is no need to provide
|
||||
# the '--config ${{env.BUILD_TYPE}}' option for the build step in the 'cmake --build' command.
|
||||
run: cmake --build build --target install -j2
|
||||
|
||||
memory-check:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
env:
|
||||
BUILD_TYPE: Debug
|
||||
|
||||
steps:
|
||||
|
||||
- name: Checkout LAPACK
|
||||
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
|
||||
|
||||
- name: Install ninja-build tool
|
||||
uses: seanmiddleditch/gha-setup-ninja@16b940825621068d98711680b6c3ff92201f8fc0 # v3
|
||||
|
||||
- name: Install APT packages
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install -y cmake valgrind gfortran
|
||||
|
||||
- name: Configure CMake
|
||||
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using
|
||||
# a single-configuration generator such as make or Ninja.
|
||||
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
|
||||
run: >
|
||||
cmake -B build -G Ninja
|
||||
-D CMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
|
||||
-D CBLAS:BOOL=ON
|
||||
-D LAPACKE:BOOL=ON
|
||||
-D BUILD_TESTING:BOOL=ON
|
||||
-D LAPACKE_WITH_TMG:BOOL=ON
|
||||
-D BUILD_SHARED_LIBS:BOOL=ON
|
||||
-D LAPACK_TESTING_USE_PYTHON:BOOL=OFF
|
||||
|
||||
- name: Build
|
||||
# Since we use a single configuration generator, Ninja, there is no need to provide
|
||||
# the '--config ${{env.BUILD_TYPE}}' option for the build step in the 'cmake --build' command.
|
||||
run: cmake --build build
|
||||
|
||||
- name: Test
|
||||
working-directory: ${{github.workspace}}/build
|
||||
run: |
|
||||
ctest -C ${{env.BUILD_TYPE}} --output-on-failure --schedule-random -j2 -T memcheck > memcheck.out
|
||||
cat memcheck.out
|
||||
if tail -n 1 memcheck.out | grep -q "Memory checking results:"; then
|
||||
exit 0
|
||||
else
|
||||
for f in Testing/Temporary/MemoryChecker.*.log; do
|
||||
if tail -n 1 $f | grep -q "ERROR SUMMARY: 0 errors"; then
|
||||
tail -n 1 $f
|
||||
continue
|
||||
else
|
||||
echo "Memory check failed in $f"
|
||||
cat $f
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
exit 0
|
||||
fi
|
||||
@@ -1,460 +0,0 @@
|
||||
name: Compilers
|
||||
|
||||
# Build and test BLAS, CBLAS, LAPACK, and LAPACKE with a variety of compilers:
|
||||
# GFortran, NAG Fortran Compiler, LLVM Flang, Intel oneAPI compilers and the
|
||||
# Arm Toolchain for Linux. Each of them is exercised against static and against
|
||||
# shared libraries, always in Release mode.
|
||||
#
|
||||
# The NAG Fortran Compiler is licence managed and its key is tied to the
|
||||
# platform it was issued for, so each of its configurations reads a repository
|
||||
# secret of its own: NAG_KUSARI_KEY_LINUX_X86_64, NAG_KUSARI_KEY_LINUX_ARM64
|
||||
# and NAG_KUSARI_KEY_MACOS_ARM64. A configuration whose secret is not set is
|
||||
# skipped.
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- .github/workflows/compilers.yml
|
||||
- lapack_testing.py
|
||||
- '**CMakeLists.txt'
|
||||
- 'BLAS/**'
|
||||
- 'CBLAS/**'
|
||||
- 'CMAKE/**'
|
||||
- 'INSTALL/**'
|
||||
- 'LAPACKE/**'
|
||||
- 'SRC/**'
|
||||
- 'TESTING/**'
|
||||
- '!**README'
|
||||
- '!**Makefile'
|
||||
- '!**md'
|
||||
pull_request:
|
||||
paths:
|
||||
- .github/workflows/compilers.yml
|
||||
- lapack_testing.py
|
||||
- '**CMakeLists.txt'
|
||||
- 'BLAS/**'
|
||||
- 'CBLAS/**'
|
||||
- 'CMAKE/**'
|
||||
- 'INSTALL/**'
|
||||
- 'LAPACKE/**'
|
||||
- 'SRC/**'
|
||||
- 'TESTING/**'
|
||||
- '!**README'
|
||||
- '!**Makefile'
|
||||
- '!**md'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
jobs:
|
||||
default-test-install:
|
||||
name: ${{ matrix.toolchain.os }}-${{ matrix.toolchain.FC }} (${{ matrix.lib_type }})
|
||||
runs-on: ${{ matrix.toolchain.os }}
|
||||
|
||||
env:
|
||||
FC: ${{ matrix.toolchain.FC }}
|
||||
CC: ${{ matrix.toolchain.CC }}
|
||||
FFLAGS: ${{ matrix.toolchain.FFLAGS }}
|
||||
CFLAGS: ${{ matrix.toolchain.CFLAGS }}
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
lib_type: [ static, shared ]
|
||||
toolchain:
|
||||
- FC: gfortran
|
||||
CC: gcc
|
||||
os: ubuntu-26.04
|
||||
CFLAGS: "-Wall -pedantic"
|
||||
FFLAGS: "-Wall -pedantic -Wno-unused-dummy-argument -Wno-unused-variable -Wno-unused-label"
|
||||
- FC: gfortran
|
||||
CC: gcc
|
||||
os: ubuntu-26.04-arm
|
||||
CFLAGS: "-Wall -pedantic"
|
||||
FFLAGS: "-Wall -pedantic -Wno-unused-dummy-argument -Wno-unused-variable -Wno-unused-label"
|
||||
- FC: gfortran
|
||||
CC: gcc
|
||||
os: windows-2025
|
||||
CFLAGS: "-Wall -pedantic"
|
||||
FFLAGS: "-Wall -pedantic -Wno-unused-dummy-argument -Wno-unused-variable -Wno-unused-label"
|
||||
- FC: gfortran-14
|
||||
CC: gcc-14
|
||||
os: macos-26
|
||||
CFLAGS: "-Wall -pedantic"
|
||||
FFLAGS: "-Wall -pedantic -Wno-unused-dummy-argument -Wno-unused-variable -Wno-unused-label"
|
||||
- FC: flang
|
||||
CC: clang
|
||||
os: ubuntu-26.04
|
||||
CFLAGS: "-Wall -pedantic"
|
||||
FFLAGS: "-Wall -pedantic"
|
||||
- FC: flang
|
||||
CC: clang
|
||||
os: ubuntu-26.04-arm
|
||||
CFLAGS: "-Wall -pedantic"
|
||||
FFLAGS: "-Wall -pedantic"
|
||||
- FC: nagfor
|
||||
CC: gcc
|
||||
os: ubuntu-26.04
|
||||
CFLAGS: "-Wall -pedantic"
|
||||
FFLAGS: ""
|
||||
nag_url: https://support.nag.com/downloads/impl/npl6a72na_amd64.tgz
|
||||
nag_secret: NAG_KUSARI_KEY_LINUX_X86_64
|
||||
- FC: ifx
|
||||
CC: icx
|
||||
os: ubuntu-24.04
|
||||
CFLAGS: "-Wall -pedantic"
|
||||
FFLAGS: "-Wall -pedantic -warn nounused"
|
||||
- FC: nagfor
|
||||
CC: gcc
|
||||
os: ubuntu-26.04-arm
|
||||
CFLAGS: "-Wall -pedantic"
|
||||
FFLAGS: ""
|
||||
nag_url: https://support.nag.com/downloads/impl/npla872na_arm64linux.tgz
|
||||
nag_secret: NAG_KUSARI_KEY_LINUX_ARM64
|
||||
- FC: armflang
|
||||
CC: armclang
|
||||
os: ubuntu-24.04-arm
|
||||
CFLAGS: "-Wall -pedantic"
|
||||
FFLAGS: "-Wall -pedantic"
|
||||
- FC: nagfor
|
||||
CC: gcc
|
||||
name: mac_arm64 / nagfor + AppleClang
|
||||
os: macos-26
|
||||
CFLAGS: "-Wall -pedantic"
|
||||
FFLAGS: ""
|
||||
nag_url: https://support.nag.com/downloads/impl/npma872na_macarm64.dmg
|
||||
nag_secret: NAG_KUSARI_KEY_MACOS_ARM64
|
||||
- FC: flang
|
||||
CC: cl
|
||||
os: windows-2025-vs2026
|
||||
CFLAGS: "/W3"
|
||||
FFLAGS: "-Wall -pedantic"
|
||||
- FC: ifx
|
||||
CC: icx
|
||||
os: windows-2025-vs2026
|
||||
CFLAGS: "/W3"
|
||||
FFLAGS: "/warn:nounused"
|
||||
|
||||
steps:
|
||||
- name: Checkout LAPACK
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
|
||||
- name: Install the NAG Fortran Compiler
|
||||
if: ${{ matrix.toolchain.FC == 'nagfor' }}
|
||||
env:
|
||||
# The secrets context cannot be reached from the matrix, but it can be
|
||||
# indexed with a name taken from it. The guard keeps the index away
|
||||
# from an undefined name for the non-NAG toolchains.
|
||||
NAG_KUSARI_KEY: ${{ matrix.toolchain.nag_secret && secrets[matrix.toolchain.nag_secret] || '' }}
|
||||
NAG_KUSARI_SECRET: ${{ matrix.toolchain.nag_secret }}
|
||||
NAG_URL: ${{ matrix.toolchain.nag_url }}
|
||||
run: |
|
||||
# Repository secrets are not exposed to pull requests from forks, so
|
||||
# the compiler cannot be licensed there. Skip instead of failing the
|
||||
# run of a contributor who cannot do anything about it.
|
||||
if [ -z "${NAG_KUSARI_KEY}" ]; then
|
||||
echo "::warning title=NAG Fortran Compiler skipped::" \
|
||||
"The ${NAG_KUSARI_SECRET} secret is not available (pull requests" \
|
||||
"from forks cannot read repository secrets), so the compiler" \
|
||||
"cannot be licensed for this platform."
|
||||
echo "SKIP_TOOLCHAIN=true" >> "$GITHUB_ENV"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Kusari looks for the licence key in a file of its own; anywhere
|
||||
# outside its handful of default locations has to be named explicitly
|
||||
# through NAG_KUSARI_FILE.
|
||||
key_file="${RUNNER_TEMP}/nag.key"
|
||||
printf '%s\n' "${NAG_KUSARI_KEY}" > "${key_file}"
|
||||
chmod 600 "${key_file}"
|
||||
export NAG_KUSARI_FILE="${key_file}"
|
||||
echo "NAG_KUSARI_FILE=${key_file}" >> "$GITHUB_ENV"
|
||||
|
||||
# Linux is shipped as a tarball, macOS as a disk image; both unpack to
|
||||
# the same distribution layout.
|
||||
case "${NAG_URL}" in
|
||||
*.dmg)
|
||||
curl -fsSL -o "${RUNNER_TEMP}/nagfor.dmg" "${NAG_URL}"
|
||||
dist="${RUNNER_TEMP}/nag-mount"
|
||||
hdiutil attach "${RUNNER_TEMP}/nagfor.dmg" \
|
||||
-nobrowse -readonly -mountpoint "${dist}"
|
||||
;;
|
||||
*)
|
||||
curl -fsSL -o "${RUNNER_TEMP}/nagfor.tgz" "${NAG_URL}"
|
||||
tar xzf "${RUNNER_TEMP}/nagfor.tgz" -C "${RUNNER_TEMP}"
|
||||
# The directory carries the platform in its name
|
||||
# (NAG_Fortran-amd64, NAG_Fortran-arm64linux, ...), so look it up
|
||||
# rather than assuming one.
|
||||
dist=$(find "${RUNNER_TEMP}" -maxdepth 1 -type d -name 'NAG_Fortran-*' \
|
||||
| head -n 1)
|
||||
;;
|
||||
esac
|
||||
if [ -z "${dist}" ] || [ ! -f "${dist}/INSTALLU.sh" ]; then
|
||||
echo "::error::No NAG Fortran Compiler distribution found in ${RUNNER_TEMP}."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# INSTALLU.sh is the unattended installer. It takes both target
|
||||
# directories from the environment, they have to be absolute and they
|
||||
# have to differ from each other. /usr/local/lib/NAG_Fortran is the
|
||||
# compiler's own default library directory on every platform here,
|
||||
# which keeps the installed nagfor a plain binary rather than a -Qpath
|
||||
# wrapper script.
|
||||
cd "${dist}"
|
||||
sudo env \
|
||||
INSTALL_TO_BINDIR=/usr/local/bin \
|
||||
INSTALL_TO_LIBDIR=/usr/local/lib/NAG_Fortran \
|
||||
./INSTALLU.sh
|
||||
|
||||
nagfor -version
|
||||
|
||||
# Confirm the key is usable rather than merely present. -xlicinfo
|
||||
# reports the licence status but exits with status 2 whether or not a
|
||||
# licence was found, so it cannot be used as a bare command: what
|
||||
# counts is its output, which reports a failure as a line starting
|
||||
# with 'Error:'.
|
||||
licence_info=$(nagfor -xlicinfo 2>&1) || true
|
||||
printf '%s\n' "${licence_info}"
|
||||
if printf '%s\n' "${licence_info}" | grep -q '^Error:'; then
|
||||
echo "::error title=NAG Fortran Compiler licence invalid::" \
|
||||
"nagfor found no usable licence in ${NAG_KUSARI_FILE}; check that" \
|
||||
"the ${NAG_KUSARI_SECRET} secret holds a key for this platform."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Install flang 21 and clang 21
|
||||
if: ${{ matrix.toolchain.FC == 'flang' && runner.os == 'Linux' }}
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y flang-21 clang-21
|
||||
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-21 100
|
||||
sudo update-alternatives --install /usr/bin/flang flang /usr/bin/flang-21 100
|
||||
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-21 100
|
||||
flang --version
|
||||
clang --version
|
||||
|
||||
- name: Install the Intel oneAPI compilers
|
||||
if: ${{ matrix.toolchain.FC == 'ifx' && runner.os == 'Linux' }}
|
||||
run: |
|
||||
# ifx and icx are not in the Ubuntu archive; Intel ships them from its
|
||||
# own APT repository.
|
||||
curl -fsSL https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \
|
||||
| gpg --dearmor \
|
||||
| sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null
|
||||
echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg]" \
|
||||
"https://apt.repos.intel.com/oneapi all main" \
|
||||
| sudo tee /etc/apt/sources.list.d/oneAPI.list > /dev/null
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y \
|
||||
intel-oneapi-compiler-fortran intel-oneapi-compiler-dpcpp-cpp
|
||||
|
||||
# setvars.sh only changes the shell that sources it, and every step
|
||||
# runs in a shell of its own, so announce it through TOOLCHAIN_SETUP
|
||||
# and let the steps below source it themselves.
|
||||
echo "TOOLCHAIN_SETUP=/opt/intel/oneapi/setvars.sh" >> "$GITHUB_ENV"
|
||||
|
||||
source /opt/intel/oneapi/setvars.sh
|
||||
ifx --version
|
||||
icx --version
|
||||
|
||||
- name: Install the Arm Toolchain for Linux
|
||||
if: ${{ matrix.toolchain.FC == 'armflang' }}
|
||||
env:
|
||||
ARM_REPO: https://developer.arm.com/packages/arm-toolchains/ubuntu
|
||||
run: |
|
||||
# armclang and armflang come from Arm's own APT repository, whose
|
||||
# configuration package carries both the sources list and the signing
|
||||
# key. Its version moves independently of the toolchain, so look the
|
||||
# file up instead of pinning it.
|
||||
deb=$(curl -fsSL "${ARM_REPO}/dists/noble/main/binary-arm64/Packages" \
|
||||
| awk '/^Package: arm-toolchains-repository$/ { found = 1 }
|
||||
found && /^Filename:/ { print $2; exit }')
|
||||
if [ -z "${deb}" ]; then
|
||||
echo "::error::Could not find the arm-toolchains-repository package."
|
||||
exit 1
|
||||
fi
|
||||
curl -fsSL -o "${RUNNER_TEMP}/arm-repo.deb" "${ARM_REPO}/${deb}"
|
||||
sudo apt-get install -y "${RUNNER_TEMP}/arm-repo.deb"
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y arm-toolchain-for-linux
|
||||
|
||||
# The package ships a modulefile generator rather than an environment
|
||||
# script, so set up what that module would: its bin directory, plus
|
||||
# the library paths the compilers and the built shared libraries need.
|
||||
prefix=/opt/arm/arm-toolchain-for-linux
|
||||
libs="${prefix}/lib:${prefix}/lib/aarch64-unknown-linux-gnu"
|
||||
echo "${prefix}/bin" >> "$GITHUB_PATH"
|
||||
echo "CPATH=${prefix}/include${CPATH:+:${CPATH}}" >> "$GITHUB_ENV"
|
||||
echo "LIBRARY_PATH=${libs}${LIBRARY_PATH:+:${LIBRARY_PATH}}" >> "$GITHUB_ENV"
|
||||
echo "LD_LIBRARY_PATH=${libs}${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}" >> "$GITHUB_ENV"
|
||||
|
||||
"${prefix}/bin/armflang" --version
|
||||
"${prefix}/bin/armclang" --version
|
||||
|
||||
- name: Install flang (Windows)
|
||||
if: ${{ matrix.toolchain.FC == 'flang' && runner.os == 'Windows' }}
|
||||
shell: cmd
|
||||
env:
|
||||
FLANG_VERSION: 22.1.8
|
||||
run: |
|
||||
call "%CONDA%\Scripts\conda.exe" install -y -q -c conda-forge ^
|
||||
flang=%FLANG_VERSION% flang-rt_win-64=%FLANG_VERSION% || exit /b 1
|
||||
|
||||
echo %CONDA%\Library\bin>> %GITHUB_PATH%
|
||||
echo LIB=%CONDA%\Library\lib>> %GITHUB_ENV%
|
||||
echo INCLUDE=%CONDA%\Library\include>> %GITHUB_ENV%
|
||||
|
||||
"%CONDA%\Library\bin\flang.exe" --version || exit /b 1
|
||||
|
||||
- name: Install the Intel oneAPI compilers (Windows)
|
||||
if: ${{ matrix.toolchain.FC == 'ifx' && runner.os == 'Windows' }}
|
||||
shell: cmd
|
||||
env:
|
||||
ONEAPI_VERSION: 2026.1.1
|
||||
run: |
|
||||
call "%CONDA%\Scripts\conda.exe" install -y -q ^
|
||||
-c https://software.repos.intel.com/python/conda/ ^
|
||||
ifx_impl_win-64=%ONEAPI_VERSION% ^
|
||||
dpcpp_impl_win-64=%ONEAPI_VERSION% || exit /b 1
|
||||
|
||||
echo ONEAPI_PATH=%CONDA%\Library\bin>> %GITHUB_ENV%
|
||||
echo ONEAPI_LIB=%CONDA%\Library\lib;%CONDA%\compiler\lib>> %GITHUB_ENV%
|
||||
echo ONEAPI_INCLUDE=%CONDA%\opt\compiler\include;%CONDA%\opt\compiler\include\intel64;%CONDA%\Library\include>> %GITHUB_ENV%
|
||||
|
||||
"%CONDA%\Library\bin\ifx.exe" --version || exit /b 1
|
||||
"%CONDA%\Library\bin\icx.exe" --version || exit /b 1
|
||||
|
||||
- name: Write the Windows toolchain setup script
|
||||
if: ${{ runner.os == 'Windows' }}
|
||||
shell: cmd
|
||||
run: |
|
||||
set "VSWHERE=%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"
|
||||
for /f "usebackq tokens=*" %%i in (`"%VSWHERE%" -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -find VC\Auxiliary\Build\vcvars64.bat`) do set "VCVARS=%%i"
|
||||
if not defined VCVARS (
|
||||
echo ::error::Could not locate vcvars64.bat via vswhere.
|
||||
exit /b 1
|
||||
)
|
||||
echo Using %VCVARS%
|
||||
|
||||
set "SETUP=%RUNNER_TEMP%\toolchain.bat"
|
||||
> "%SETUP%" echo @echo off
|
||||
>>"%SETUP%" echo call "%VCVARS%" ^|^| exit /b 1
|
||||
>>"%SETUP%" echo if defined ONEAPI_PATH set "PATH=%%ONEAPI_PATH%%;%%PATH%%"
|
||||
>>"%SETUP%" echo if defined ONEAPI_LIB set "LIB=%%ONEAPI_LIB%%;%%LIB%%"
|
||||
>>"%SETUP%" echo if defined ONEAPI_INCLUDE set "INCLUDE=%%ONEAPI_INCLUDE%%;%%INCLUDE%%"
|
||||
type "%SETUP%"
|
||||
echo TOOLCHAIN_SETUP=%SETUP%>> %GITHUB_ENV%
|
||||
|
||||
- name: Configure CMake
|
||||
if: ${{ runner.os != 'Windows' && env.SKIP_TOOLCHAIN != 'true' }}
|
||||
run: |
|
||||
[ -z "${TOOLCHAIN_SETUP-}" ] || source "${TOOLCHAIN_SETUP}"
|
||||
|
||||
extra=()
|
||||
if [ "${RUNNER_OS}" = "macOS" ] && [ "${{ matrix.lib_type }}" = shared ]; then
|
||||
# Symbol resolution in the test suite needs flat namespaces on macOS
|
||||
extra+=(-D USE_FLAT_NAMESPACE:BOOL=ON)
|
||||
fi
|
||||
|
||||
cmake -B build -G Ninja \
|
||||
-D CMAKE_BUILD_TYPE=Release \
|
||||
-D CMAKE_Fortran_COMPILER="${FC}" \
|
||||
-D CMAKE_C_COMPILER="${CC}" \
|
||||
-D CMAKE_INSTALL_PREFIX=${{ github.workspace }}/lapack_install \
|
||||
-D CBLAS:BOOL=ON \
|
||||
-D LAPACKE:BOOL=ON \
|
||||
-D BUILD_TESTING:BOOL=ON \
|
||||
-D LAPACKE_WITH_TMG:BOOL=ON \
|
||||
-D BUILD_SHARED_LIBS:BOOL=${{ matrix.lib_type == 'shared' && 'ON' || 'OFF' }} \
|
||||
"${extra[@]}"
|
||||
|
||||
- name: Build
|
||||
if: ${{ runner.os != 'Windows' && env.SKIP_TOOLCHAIN != 'true' }}
|
||||
run: |
|
||||
[ -z "${TOOLCHAIN_SETUP-}" ] || source "${TOOLCHAIN_SETUP}"
|
||||
cmake --build build
|
||||
|
||||
- name: Test
|
||||
if: ${{ runner.os != 'Windows' && env.SKIP_TOOLCHAIN != 'true' }}
|
||||
working-directory: ${{ github.workspace }}/build
|
||||
run: |
|
||||
[ -z "${TOOLCHAIN_SETUP-}" ] || source "${TOOLCHAIN_SETUP}"
|
||||
ctest -C Release --schedule-random -j2 --output-on-failure --timeout 1800
|
||||
|
||||
- name: Configure CMake (Windows)
|
||||
if: ${{ runner.os == 'Windows' }}
|
||||
shell: cmd
|
||||
run: |
|
||||
call "%TOOLCHAIN_SETUP%" || exit /b 1
|
||||
cmake -B build -G Ninja ^
|
||||
-D CMAKE_BUILD_TYPE=Release ^
|
||||
-D CMAKE_Fortran_COMPILER=%FC% ^
|
||||
-D CMAKE_C_COMPILER=%CC% ^
|
||||
-D CMAKE_INSTALL_PREFIX=${{ github.workspace }}\lapack_install ^
|
||||
-D CBLAS:BOOL=ON ^
|
||||
-D LAPACKE:BOOL=ON ^
|
||||
-D BUILD_TESTING:BOOL=ON ^
|
||||
-D LAPACKE_WITH_TMG:BOOL=ON ^
|
||||
-D BUILD_SHARED_LIBS:BOOL=${{ matrix.lib_type == 'shared' && 'ON' || 'OFF' }}
|
||||
|
||||
- name: Build (Windows)
|
||||
if: ${{ runner.os == 'Windows' }}
|
||||
shell: cmd
|
||||
run: |
|
||||
call "%TOOLCHAIN_SETUP%" || exit /b 1
|
||||
cmake --build build
|
||||
|
||||
- name: Test (Windows)
|
||||
if: ${{ runner.os == 'Windows' }}
|
||||
shell: cmd
|
||||
working-directory: ${{ github.workspace }}\build
|
||||
run: |
|
||||
call "%TOOLCHAIN_SETUP%" || exit /b 1
|
||||
ctest -C Release --schedule-random -j2 --output-on-failure --timeout 1800
|
||||
|
||||
- name: Upload test results
|
||||
id: upload-test-results
|
||||
# Uploaded even when the tests failed; that is when the results are
|
||||
# needed most. The test summary below links to the artifact.
|
||||
if: ${{ !cancelled() && env.SKIP_TOOLCHAIN != 'true' }}
|
||||
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||
with:
|
||||
name: test-results-${{ matrix.toolchain.FC }}-${{ matrix.toolchain.os }}-${{ matrix.lib_type }}
|
||||
path: |
|
||||
build/TESTING/testing_results.txt
|
||||
build/lapack_testing_junit.xml
|
||||
if-no-files-found: warn
|
||||
retention-days: 14
|
||||
|
||||
- name: Write test summary
|
||||
if: ${{ !cancelled() && env.SKIP_TOOLCHAIN != 'true' }}
|
||||
env:
|
||||
ARTIFACT_URL: ${{ steps.upload-test-results.outputs.artifact-url }}
|
||||
run: |
|
||||
cd build 2>/dev/null || exit 0
|
||||
python3 lapack_testing.py -d TESTING --merge-apis --markdown summary.md || true
|
||||
if [ -f summary.md ]; then
|
||||
cat summary.md >> "$GITHUB_STEP_SUMMARY"
|
||||
if [ -n "$ARTIFACT_URL" ]; then
|
||||
printf '\nThe raw output of every test run (`testing_results.txt`) and a JUnit XML report are in the [test-results artifact](%s).\n' "$ARTIFACT_URL" >> "$GITHUB_STEP_SUMMARY"
|
||||
fi
|
||||
fi
|
||||
|
||||
- name: Install
|
||||
if: ${{ runner.os != 'Windows' && env.SKIP_TOOLCHAIN != 'true' }}
|
||||
run: |
|
||||
[ -z "${TOOLCHAIN_SETUP-}" ] || source "${TOOLCHAIN_SETUP}"
|
||||
cmake --build build --target install -j2
|
||||
|
||||
- name: Install (Windows)
|
||||
if: ${{ runner.os == 'Windows' }}
|
||||
shell: cmd
|
||||
run: |
|
||||
call "%TOOLCHAIN_SETUP%" || exit /b 1
|
||||
cmake --build build --target install -j2
|
||||
@@ -1,12 +1,10 @@
|
||||
name: Makefile
|
||||
|
||||
# This workflow builds and installs LAPACK using the Makefile build system.
|
||||
# Only GFortran is tested.
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- try-github-actions
|
||||
paths:
|
||||
- .github/workflows/makefile.yml
|
||||
- '**Makefile'
|
||||
@@ -37,8 +35,11 @@ permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
CC: "gcc"
|
||||
FC: "gfortran"
|
||||
CFLAGS: "-O3 -flto -Wall -pedantic-errors"
|
||||
FFLAGS: "-O2 -flto -Wall -Wno-unused-dummy-argument -Wno-unused-variable -Wno-unused-label -Wmaybe-uninitialized -Werror=conversion -pedantic -fimplicit-none -frecursive -fopenmp -fcheck=all"
|
||||
FFLAGS: "-O2 -flto -Wall -Werror=conversion -pedantic -fimplicit-none -frecursive -fopenmp -fcheck=all"
|
||||
FFLAGS_NOOPT: "-O0 -flto -Wall -fimplicit-none -frecursive -fopenmp -fcheck=all"
|
||||
LDFLAGS: ""
|
||||
AR: "ar"
|
||||
ARFLAGS: "cr"
|
||||
@@ -49,32 +50,12 @@ defaults:
|
||||
shell: bash
|
||||
|
||||
jobs:
|
||||
build-install:
|
||||
name: ${{ matrix.toolchain.os }}-${{ matrix.toolchain.FC }}
|
||||
runs-on: ${{ matrix.toolchain.os }}
|
||||
|
||||
env:
|
||||
FC: ${{ matrix.toolchain.FC }}
|
||||
CC: ${{ matrix.toolchain.CC }}
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
toolchain:
|
||||
- FC: gfortran
|
||||
CC: gcc
|
||||
os: ubuntu-26.04
|
||||
- FC: gfortran
|
||||
CC: gcc
|
||||
os: ubuntu-26.04-arm
|
||||
- FC: gfortran-14
|
||||
CC: gcc-14
|
||||
os: macos-26
|
||||
|
||||
install-ubuntu:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout LAPACK
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
|
||||
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
|
||||
- name: Set configurations
|
||||
run: |
|
||||
echo "SHELL = /bin/sh" >> make.inc
|
||||
@@ -86,9 +67,32 @@ jobs:
|
||||
echo "TMGLIB = ${{github.workspace}}/libtmglib.a" >> make.inc
|
||||
echo "LAPACKELIB = ${{github.workspace}}/liblapacke.a" >> make.inc
|
||||
echo "DOCSDIR = ${{github.workspace}}/DOCS" >> make.inc
|
||||
|
||||
- name: Build
|
||||
run: make -s -j2 all
|
||||
|
||||
- name: Install
|
||||
run: make -j2 lapack_install
|
||||
run: |
|
||||
make -s -j2 all
|
||||
make -j2 lapack_install
|
||||
|
||||
install-macos:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- name: Checkout LAPACK
|
||||
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
|
||||
- name: Set configurations
|
||||
run: |
|
||||
echo "SHELL = /bin/sh" >> make.inc
|
||||
echo "FFLAGS_DRV = ${{env.FFLAGS}}" >> make.inc
|
||||
echo "TIMER = INT_ETIME" >> make.inc
|
||||
echo "BLASLIB = ${{github.workspace}}/librefblas.a" >> make.inc
|
||||
echo "CBLASLIB = ${{github.workspace}}/libcblas.a" >> make.inc
|
||||
echo "LAPACKLIB = ${{github.workspace}}/liblapack.a" >> make.inc
|
||||
echo "TMGLIB = ${{github.workspace}}/libtmglib.a" >> make.inc
|
||||
echo "LAPACKELIB = ${{github.workspace}}/liblapacke.a" >> make.inc
|
||||
echo "DOCSDIR = ${{github.workspace}}/DOCS" >> make.inc
|
||||
- name: Alias for GCC compilers
|
||||
run: |
|
||||
sudo ln -s $(which gcc-14) /usr/local/bin/gcc
|
||||
sudo ln -s $(which gfortran-14) /usr/local/bin/gfortran
|
||||
- name: Install
|
||||
run: |
|
||||
make -s -j2 all
|
||||
make -j2 lapack_install
|
||||
|
||||
@@ -9,13 +9,13 @@ on:
|
||||
jobs:
|
||||
build-linux-x64:
|
||||
name: blas / lapack -- Linux (x86_64) -- Release ${{ github.ref_name }}
|
||||
runs-on: ubuntu-24.04
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout lapack
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Julia
|
||||
uses: julia-actions/setup-julia@fa02766e078afaaf09b14210362cee14137e6a32 # v3.0.2
|
||||
uses: julia-actions/setup-julia@v2
|
||||
with:
|
||||
version: "1.7"
|
||||
arch: x64
|
||||
@@ -37,20 +37,20 @@ jobs:
|
||||
run: julia --color=no .github/julia/generate_binaries.jl
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: blas_lapack_binaries.${{ github.ref_name }}.x86_64-linux-gnu-libgfortran5.tar.gz
|
||||
path: ./blas_lapack_binaries.${{ github.ref_name }}.x86_64-linux-gnu-libgfortran5.tar.gz
|
||||
|
||||
build-linux-aarch64:
|
||||
name: blas / lapack -- Linux (aarch64) -- Release ${{ github.ref_name }}
|
||||
runs-on: ubuntu-24.04
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout lapack
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Julia
|
||||
uses: julia-actions/setup-julia@fa02766e078afaaf09b14210362cee14137e6a32 # v3.0.2
|
||||
uses: julia-actions/setup-julia@v2
|
||||
with:
|
||||
version: "1.7"
|
||||
arch: x64
|
||||
@@ -72,20 +72,20 @@ jobs:
|
||||
run: julia --color=no .github/julia/generate_binaries.jl
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: blas_lapack_binaries.${{ github.ref_name }}.aarch64-linux-gnu-libgfortran5.tar.gz
|
||||
path: ./blas_lapack_binaries.${{ github.ref_name }}.aarch64-linux-gnu-libgfortran5.tar.gz
|
||||
|
||||
build-windows-x64:
|
||||
name: blas / lapack -- Windows (x86_64) -- Release ${{ github.ref_name }}
|
||||
runs-on: ubuntu-24.04
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout lapack
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Julia
|
||||
uses: julia-actions/setup-julia@fa02766e078afaaf09b14210362cee14137e6a32 # v3.0.2
|
||||
uses: julia-actions/setup-julia@v2
|
||||
with:
|
||||
version: "1.7"
|
||||
arch: x64
|
||||
@@ -106,20 +106,20 @@ jobs:
|
||||
run: julia --color=no .github/julia/generate_binaries.jl
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: blas_lapack_binaries.${{ github.ref_name }}.x86_64-w64-mingw32-libgfortran5.zip
|
||||
path: ./blas_lapack_binaries.${{ github.ref_name }}.x86_64-w64-mingw32-libgfortran5.zip
|
||||
|
||||
build-mac-x64:
|
||||
name: blas / lapack -- macOS (x86_64) -- Release ${{ github.ref_name }}
|
||||
runs-on: ubuntu-24.04
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout lapack
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Julia
|
||||
uses: julia-actions/setup-julia@fa02766e078afaaf09b14210362cee14137e6a32 # v3.0.2
|
||||
uses: julia-actions/setup-julia@v2
|
||||
with:
|
||||
version: "1.7"
|
||||
arch: x64
|
||||
@@ -141,20 +141,20 @@ jobs:
|
||||
run: julia --color=no .github/julia/generate_binaries.jl
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: blas_lapack_binaries.${{ github.ref_name }}.x86_64-apple-darwin-libgfortran5.tar.gz
|
||||
path: ./blas_lapack_binaries.${{ github.ref_name }}.x86_64-apple-darwin-libgfortran5.tar.gz
|
||||
|
||||
build-mac-aarch64:
|
||||
name: blas / lapack -- macOS (aarch64) -- Release ${{ github.ref_name }}
|
||||
runs-on: ubuntu-24.04
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout lapack
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Julia
|
||||
uses: julia-actions/setup-julia@fa02766e078afaaf09b14210362cee14137e6a32 # v3.0.2
|
||||
uses: julia-actions/setup-julia@v2
|
||||
with:
|
||||
version: "1.7"
|
||||
arch: x64
|
||||
@@ -176,7 +176,7 @@ jobs:
|
||||
run: julia --color=no .github/julia/generate_binaries.jl
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: blas_lapack_binaries.${{ github.ref_name }}.aarch64-apple-darwin-libgfortran5.tar.gz
|
||||
path: ./blas_lapack_binaries.${{ github.ref_name }}.aarch64-apple-darwin-libgfortran5.tar.gz
|
||||
@@ -184,13 +184,13 @@ jobs:
|
||||
release:
|
||||
name: Create Release and Upload Binaries
|
||||
needs: [build-windows-x64, build-linux-x64, build-linux-aarch64, build-mac-x64, build-mac-aarch64]
|
||||
runs-on: ubuntu-24.04
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout lapack
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Download artifacts
|
||||
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: .
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ permissions: read-all
|
||||
jobs:
|
||||
analysis:
|
||||
name: Scorecard analysis
|
||||
runs-on: ubuntu-24.04
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
# Needed to upload the results to code-scanning dashboard.
|
||||
security-events: write
|
||||
@@ -32,12 +32,12 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: "Checkout code"
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # tag=v4.2.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: "Run analysis"
|
||||
uses: ossf/scorecard-action@2d1146689b8cda280b9bc96326124645441f03bc # v2.4.4
|
||||
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
|
||||
with:
|
||||
results_file: results.sarif
|
||||
results_format: sarif
|
||||
@@ -59,7 +59,7 @@ jobs:
|
||||
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
|
||||
# format to the repository Actions tab.
|
||||
- name: "Upload artifact"
|
||||
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
|
||||
with:
|
||||
name: SARIF file
|
||||
path: results.sarif
|
||||
@@ -67,6 +67,6 @@ jobs:
|
||||
|
||||
# Upload the results to GitHub's code scanning dashboard.
|
||||
- name: "Upload to code-scanning"
|
||||
uses: github/codeql-action/upload-sarif@42947a340483f03ba47bb1a039b2c519aab3df85 # v3.37.8
|
||||
uses: github/codeql-action/upload-sarif@662472033e021d55d94146f66f6058822b0b39fd # v3.27.0
|
||||
with:
|
||||
sarif_file: results.sarif
|
||||
|
||||
@@ -1,420 +0,0 @@
|
||||
name: Special Build Configurations
|
||||
|
||||
# This workflow builds and tests LAPACK with special configurations that are not
|
||||
# covered by the compilers workflow: OpenMP, extended API only,
|
||||
# CBLAS and LAPACKE without a Fortran compiler, memory checking with Valgrind,
|
||||
# and gcov coverage.
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- .github/workflows/special.yml
|
||||
- lapack_testing.py
|
||||
- '**CMakeLists.txt'
|
||||
- 'BLAS/**'
|
||||
- 'CBLAS/**'
|
||||
- 'CMAKE/**'
|
||||
- 'INSTALL/**'
|
||||
- 'LAPACKE/**'
|
||||
- 'SRC/**'
|
||||
- 'TESTING/**'
|
||||
- '!**README'
|
||||
- '!**Makefile'
|
||||
- '!**md'
|
||||
pull_request:
|
||||
paths:
|
||||
- .github/workflows/special.yml
|
||||
- lapack_testing.py
|
||||
- '**CMakeLists.txt'
|
||||
- 'BLAS/**'
|
||||
- 'CBLAS/**'
|
||||
- 'CMAKE/**'
|
||||
- 'INSTALL/**'
|
||||
- 'LAPACKE/**'
|
||||
- 'SRC/**'
|
||||
- 'TESTING/**'
|
||||
- '!**README'
|
||||
- '!**Makefile'
|
||||
- '!**md'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
CFLAGS: "-Wall -pedantic"
|
||||
FFLAGS: "-Wall -Wno-unused-dummy-argument -Wno-unused-variable -Wno-unused-label -Werror=conversion -fimplicit-none -frecursive -fcheck=all"
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
jobs:
|
||||
openmp-build:
|
||||
name: openmp-${{ matrix.toolchain.os }}-${{ matrix.toolchain.FC }} (${{ matrix.lib_type }})
|
||||
runs-on: ${{ matrix.toolchain.os }}
|
||||
|
||||
env:
|
||||
FFLAGS: "-Wall -Wno-unused-dummy-argument -Wno-unused-variable -Wno-unused-label -Werror=conversion -fimplicit-none -frecursive -fcheck=all -fopenmp"
|
||||
FC: ${{ matrix.toolchain.FC }}
|
||||
CC: ${{ matrix.toolchain.CC }}
|
||||
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
lib_type: [ static, shared ]
|
||||
toolchain:
|
||||
- FC: gfortran
|
||||
CC: gcc
|
||||
os: ubuntu-26.04
|
||||
- FC: gfortran
|
||||
CC: gcc
|
||||
os: ubuntu-26.04-arm
|
||||
- FC: gfortran
|
||||
CC: gcc
|
||||
os: windows-2025
|
||||
- FC: gfortran-14
|
||||
CC: gcc-14
|
||||
os: macos-26
|
||||
|
||||
steps:
|
||||
- name: Checkout LAPACK
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
|
||||
- name: Configure CMake
|
||||
run: >
|
||||
cmake -B build -G Ninja
|
||||
-D CMAKE_BUILD_TYPE=Release
|
||||
-D CMAKE_Fortran_COMPILER="${FC}"
|
||||
-D CMAKE_C_COMPILER="${CC}"
|
||||
-D CMAKE_INSTALL_PREFIX=${{github.workspace}}/lapack_install
|
||||
-D CBLAS:BOOL=ON
|
||||
-D LAPACKE:BOOL=ON
|
||||
-D BUILD_TESTING:BOOL=ON
|
||||
-D LAPACKE_WITH_TMG:BOOL=ON
|
||||
-D BUILD_SHARED_LIBS:BOOL=${{ matrix.lib_type == 'shared' && 'ON' || 'OFF' }}
|
||||
|
||||
- name: Build
|
||||
run: cmake --build build -j2
|
||||
|
||||
- name: Test with OpenMP
|
||||
working-directory: ${{github.workspace}}/build
|
||||
run: ctest --schedule-random -j1 --output-on-failure --timeout 100
|
||||
|
||||
- name: Upload test results
|
||||
id: upload-test-results
|
||||
# Uploaded even when the tests failed; that is when the results
|
||||
# are needed most. The test summary below links to the artifact.
|
||||
if: ${{ !cancelled() }}
|
||||
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||
with:
|
||||
name: test-results-openmp-${{ matrix.toolchain.os }}
|
||||
path: |
|
||||
build/TESTING/testing_results.txt
|
||||
build/lapack_testing_junit.xml
|
||||
if-no-files-found: warn
|
||||
retention-days: 14
|
||||
|
||||
- name: Write test summary
|
||||
if: ${{ !cancelled() }}
|
||||
env:
|
||||
ARTIFACT_URL: ${{ steps.upload-test-results.outputs.artifact-url }}
|
||||
run: |
|
||||
cd build 2>/dev/null || exit 0
|
||||
python3 lapack_testing.py -d TESTING --merge-apis --markdown summary.md || true
|
||||
if [ -f summary.md ]; then
|
||||
cat summary.md >> "$GITHUB_STEP_SUMMARY"
|
||||
if [ -n "$ARTIFACT_URL" ]; then
|
||||
printf '\nThe raw output of every test run (`testing_results.txt`) and a JUnit XML report are in the [test-results artifact](%s).\n' "$ARTIFACT_URL" >> "$GITHUB_STEP_SUMMARY"
|
||||
fi
|
||||
fi
|
||||
|
||||
- name: Install
|
||||
run: cmake --build build --target install -j2
|
||||
|
||||
test-extended-api-only:
|
||||
name: extended-api-only (${{ matrix.lib_type }})
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
lib_type: [ static, shared ]
|
||||
|
||||
steps:
|
||||
- name: Checkout LAPACK
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
|
||||
- name: Configure CMake
|
||||
run: >
|
||||
cmake -B build -G Ninja
|
||||
-D CMAKE_BUILD_TYPE=Release
|
||||
-D CMAKE_INSTALL_PREFIX=${{github.workspace}}/lapack_install
|
||||
-D CBLAS:BOOL=ON
|
||||
-D LAPACKE:BOOL=ON
|
||||
-D BUILD_TESTING:BOOL=ON
|
||||
-D LAPACKE_WITH_TMG:BOOL=ON
|
||||
-D BUILD_SHARED_LIBS:BOOL=${{ matrix.lib_type == 'shared' && 'ON' || 'OFF' }}
|
||||
-D BUILD_DEFAULT_API:BOOL=OFF
|
||||
-D BUILD_INDEX64_EXT_API:BOOL=ON
|
||||
|
||||
- name: Build
|
||||
run: cmake --build build -j2
|
||||
|
||||
- name: Test
|
||||
working-directory: ${{github.workspace}}/build
|
||||
run: ctest --schedule-random -j2 --output-on-failure --timeout 100
|
||||
|
||||
- name: Upload test results
|
||||
id: upload-test-results
|
||||
if: ${{ !cancelled() }}
|
||||
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||
with:
|
||||
name: test-results-extended-api-${{ matrix.lib_type }}
|
||||
path: |
|
||||
build/TESTING/testing_results.txt
|
||||
build/lapack_testing_junit.xml
|
||||
if-no-files-found: warn
|
||||
retention-days: 14
|
||||
|
||||
- name: Write test summary
|
||||
if: ${{ !cancelled() }}
|
||||
env:
|
||||
ARTIFACT_URL: ${{ steps.upload-test-results.outputs.artifact-url }}
|
||||
run: |
|
||||
cd build 2>/dev/null || exit 0
|
||||
python3 lapack_testing.py -d TESTING --merge-apis --markdown summary.md || true
|
||||
if [ -f summary.md ]; then
|
||||
cat summary.md >> "$GITHUB_STEP_SUMMARY"
|
||||
if [ -n "$ARTIFACT_URL" ]; then
|
||||
printf '\nThe raw output of every test run (`testing_results.txt`) and a JUnit XML report are in the [test-results artifact](%s).\n' "$ARTIFACT_URL" >> "$GITHUB_STEP_SUMMARY"
|
||||
fi
|
||||
fi
|
||||
|
||||
- name: Install
|
||||
run: cmake --build build --target install -j2
|
||||
|
||||
cblas-lapacke-without-fortran-compiler:
|
||||
name: cblas + lapacke (${{ matrix.lib_type }})
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
lib_type: [ static, shared ]
|
||||
|
||||
steps:
|
||||
- name: Checkout LAPACK
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
|
||||
- name: Install LAPACK and BLAS, remove gfortran
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install -y liblapack-dev libblas-dev
|
||||
sudo apt purge gfortran
|
||||
|
||||
- name: Configure CMake
|
||||
run: >
|
||||
cmake -B build -G Ninja
|
||||
-D CMAKE_BUILD_TYPE=Release
|
||||
-D CMAKE_INSTALL_PREFIX=${{github.workspace}}/lapack_install
|
||||
-D CBLAS:BOOL=ON
|
||||
-D LAPACKE:BOOL=ON
|
||||
-D USE_OPTIMIZED_BLAS:BOOL=ON
|
||||
-D USE_OPTIMIZED_LAPACK:BOOL=ON
|
||||
-D BUILD_TESTING:BOOL=OFF
|
||||
-D LAPACKE_WITH_TMG:BOOL=OFF
|
||||
-D BUILD_SHARED_LIBS:BOOL=${{ matrix.lib_type == 'shared' && 'ON' || 'OFF' }}
|
||||
|
||||
- name: Build
|
||||
run: cmake --build build -j2
|
||||
|
||||
- name: Install
|
||||
run: cmake --build build --target install -j2
|
||||
|
||||
memory-check:
|
||||
name: valgrind memory check
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
steps:
|
||||
- name: Checkout LAPACK
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
|
||||
- name: Install APT packages
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install -y valgrind
|
||||
|
||||
- name: Configure CMake
|
||||
run: >
|
||||
cmake -B build -G Ninja
|
||||
-D CMAKE_BUILD_TYPE=Debug
|
||||
-D CBLAS:BOOL=ON
|
||||
-D LAPACKE:BOOL=ON
|
||||
-D BUILD_TESTING:BOOL=ON
|
||||
-D LAPACKE_WITH_TMG:BOOL=ON
|
||||
-D BUILD_SHARED_LIBS:BOOL=ON
|
||||
-D LAPACK_TESTING_USE_PYTHON:BOOL=OFF
|
||||
|
||||
- name: Build
|
||||
run: cmake --build build -j2
|
||||
|
||||
- name: Test
|
||||
working-directory: ${{github.workspace}}/build
|
||||
run: |
|
||||
ctest --output-on-failure --schedule-random -j2 -T memcheck > memcheck.out 2>&1 || true
|
||||
cat memcheck.out
|
||||
|
||||
- name: Upload valgrind logs
|
||||
id: upload-valgrind-logs
|
||||
if: ${{ !cancelled() }}
|
||||
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||
with:
|
||||
name: valgrind-logs
|
||||
path: |
|
||||
build/memcheck.out
|
||||
build/Testing/Temporary/MemoryChecker.*.log
|
||||
build/Testing/Temporary/LastDynamicAnalysis_*.log
|
||||
build/Testing/*/DynamicAnalysis.xml
|
||||
if-no-files-found: warn
|
||||
retention-days: 14
|
||||
|
||||
- name: Check memory checking results
|
||||
working-directory: ${{github.workspace}}/build
|
||||
run: |
|
||||
shopt -s nullglob
|
||||
logs=( Testing/Temporary/MemoryChecker.*.log )
|
||||
if [ ${#logs[@]} -eq 0 ]; then
|
||||
echo "::error::No MemoryChecker logs found; valgrind did not run"
|
||||
exit 1
|
||||
fi
|
||||
# A systematic problem makes nearly every test report a defect, so
|
||||
# only the first few logs are echoed here; the artifact has them all.
|
||||
max_dump=5
|
||||
dumped=0
|
||||
failed=()
|
||||
for f in "${logs[@]}"; do
|
||||
if tail -n 1 "$f" | grep -q "ERROR SUMMARY: 0 errors"; then
|
||||
continue
|
||||
fi
|
||||
failed+=( "$f" )
|
||||
if [ "$dumped" -lt "$max_dump" ]; then
|
||||
echo "::group::$f"
|
||||
cat "$f"
|
||||
echo "::endgroup::"
|
||||
dumped=$(( dumped + 1 ))
|
||||
fi
|
||||
done
|
||||
if [ ${#failed[@]} -eq 0 ]; then
|
||||
echo "All ${#logs[@]} logs reported no valgrind errors"
|
||||
exit 0
|
||||
fi
|
||||
echo "::error::Memory check failed in ${#failed[@]} of ${#logs[@]} tests"
|
||||
printf '%s\n' "${failed[@]}"
|
||||
if [ ${#failed[@]} -gt "$max_dump" ]; then
|
||||
echo "Only the first $max_dump logs are shown above;" \
|
||||
"every log is in the valgrind-logs artifact."
|
||||
fi
|
||||
exit 1
|
||||
|
||||
- name: Write memory check summary
|
||||
if: ${{ !cancelled() }}
|
||||
env:
|
||||
ARTIFACT_URL: ${{ steps.upload-valgrind-logs.outputs.artifact-url }}
|
||||
run: |
|
||||
cd build 2>/dev/null || exit 0
|
||||
[ -f memcheck.out ] || exit 0
|
||||
defects=$(sed -n '/^Memory checking results:/,$p' memcheck.out | tail -n +2) || true
|
||||
{
|
||||
echo '## valgrind memory check'
|
||||
echo
|
||||
if [ -n "$defects" ]; then
|
||||
echo 'Defects reported by CTest:'
|
||||
echo
|
||||
echo "$defects" | sed 's/^/- /'
|
||||
else
|
||||
echo 'No defects reported.'
|
||||
fi
|
||||
if [ -n "$ARTIFACT_URL" ]; then
|
||||
printf '\nThe full valgrind output for every test is in the [valgrind-logs artifact](%s).\n' "$ARTIFACT_URL"
|
||||
fi
|
||||
} >> "$GITHUB_STEP_SUMMARY"
|
||||
|
||||
coverage:
|
||||
name: gcov coverage
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
env:
|
||||
FFLAGS: "-Wall -pedantic -Wno-unused-dummy-argument -Wno-unused-variable -Wno-unused-label -fopenmp"
|
||||
|
||||
steps:
|
||||
- name: Checkout LAPACK
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
# Codecov cannot determine which commit a report belongs to from a
|
||||
# depth-1 clone of a pull request merge commit.
|
||||
fetch-depth: 2
|
||||
|
||||
- name: Configure CMake
|
||||
run: >
|
||||
cmake -B build -G Ninja
|
||||
-D CMAKE_BUILD_TYPE=Coverage
|
||||
-D CMAKE_INSTALL_PREFIX=${{github.workspace}}/lapack_install
|
||||
-D CBLAS:BOOL=ON
|
||||
-D LAPACKE:BOOL=ON
|
||||
-D BUILD_TESTING:BOOL=ON
|
||||
-D LAPACKE_WITH_TMG:BOOL=ON
|
||||
-D BUILD_SHARED_LIBS:BOOL=ON
|
||||
|
||||
- name: Build
|
||||
run: cmake --build build -j2
|
||||
|
||||
- name: Test
|
||||
working-directory: ${{github.workspace}}/build
|
||||
run: ctest --schedule-random -j2 --output-on-failure --timeout 1800
|
||||
|
||||
- name: Coverage
|
||||
if: ${{ !cancelled() }}
|
||||
run: cmake --build build --target coverage
|
||||
|
||||
# The coverage target discards gcov's output, so an entirely empty report
|
||||
# is indistinguishable from a good one unless we look at the numbers.
|
||||
# Print them, and fail if nothing was measured at all.
|
||||
- name: Summarize coverage
|
||||
if: ${{ !cancelled() }}
|
||||
run: |
|
||||
gcda=$(find build -name '*.gcda' | wc -l)
|
||||
reports=$(find build -name '*.gcov' | wc -l)
|
||||
echo "counter files (.gcda): ${gcda}"
|
||||
echo "gcov reports (.gcov): ${reports}"
|
||||
if [ "${gcda}" -eq 0 ] || [ "${reports}" -eq 0 ]; then
|
||||
echo "::error::No coverage data was recorded; the report would be empty."
|
||||
exit 1
|
||||
fi
|
||||
# In a gcov report an executed line is prefixed with its execution
|
||||
# count and an unexecuted one with '#####' or '====='; everything else
|
||||
# ('-') is not executable.
|
||||
set -- $(find build -name '*.gcov' -exec cat {} + | awk '
|
||||
/^ *[0-9]+[*]?:/ { hit++; next }
|
||||
/^ *(#####|=====):/ { miss++ }
|
||||
END { printf "%d %d\n", hit + 0, hit + miss + 0 }')
|
||||
hit=$1
|
||||
total=$2
|
||||
if [ "${hit}" -eq 0 ]; then
|
||||
echo "::error::Coverage report is empty: not a single line was executed."
|
||||
exit 1
|
||||
fi
|
||||
percent=$(awk -v h="${hit}" -v t="${total}" 'BEGIN { printf "%.2f", 100 * h / t }')
|
||||
echo "lines executed: ${hit} of ${total} (${percent}%)"
|
||||
printf '## Coverage\n\n%s%% of lines executed (%s of %s) across %s files.\n' \
|
||||
"${percent}" "${hit}" "${total}" "${reports}" >> "$GITHUB_STEP_SUMMARY"
|
||||
|
||||
- name: Upload coverage report to Codecov
|
||||
if: ${{ !cancelled() }}
|
||||
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
|
||||
with:
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
plugins: noop
|
||||
verbose: true
|
||||
fail_ci_if_error: ${{ secrets.CODECOV_TOKEN != '' }}
|
||||
@@ -186,11 +186,6 @@ macro(CheckLAPACKCompilerFlags)
|
||||
elseif(CMAKE_Fortran_COMPILER_ID STREQUAL "Flang")
|
||||
add_compile_options("$<$<COMPILE_LANGUAGE:Fortran>:-Mrecursive>")
|
||||
|
||||
# LLVM Flang
|
||||
elseif(CMAKE_Fortran_COMPILER_ID STREQUAL "LLVMFlang")
|
||||
# Nothing to do here for now, but this is a placeholder for future
|
||||
# LLVM Flang specific flags
|
||||
|
||||
# Compaq Fortran
|
||||
elseif(CMAKE_Fortran_COMPILER_ID STREQUAL "Compaq")
|
||||
if(WIN32)
|
||||
@@ -218,6 +213,8 @@ macro(CheckLAPACKCompilerFlags)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
else()
|
||||
message(WARNING "Fortran local arrays should be allocated on the stack."
|
||||
" Please use a compiler which guarantees that feature."
|
||||
|
||||
+4
-2
@@ -100,17 +100,19 @@
|
||||
*> The order of the bidiagonal matrix. N >= 0.
|
||||
*> \endverbatim
|
||||
*>
|
||||
*> \param[in] D
|
||||
*> \param[in,out] D
|
||||
*> \verbatim
|
||||
*> D is DOUBLE PRECISION array, dimension (N)
|
||||
*> The n diagonal elements of the bidiagonal matrix B.
|
||||
*> On exit, very small entries are set to 0.
|
||||
*> \endverbatim
|
||||
*>
|
||||
*> \param[in] E
|
||||
*> \param[in,out] E
|
||||
*> \verbatim
|
||||
*> E is DOUBLE PRECISION array, dimension (max(1,N-1))
|
||||
*> The (n-1) superdiagonal elements of the bidiagonal matrix
|
||||
*> B in elements 1 to N-1.
|
||||
*> On exit, very small entries are set to 0.
|
||||
*> \endverbatim
|
||||
*>
|
||||
*> \param[in] VL
|
||||
|
||||
+4
-2
@@ -100,17 +100,19 @@
|
||||
*> The order of the bidiagonal matrix. N >= 0.
|
||||
*> \endverbatim
|
||||
*>
|
||||
*> \param[in] D
|
||||
*> \param[in,out] D
|
||||
*> \verbatim
|
||||
*> D is REAL array, dimension (N)
|
||||
*> The n diagonal elements of the bidiagonal matrix B.
|
||||
*> On exit, very small entries are set to 0.
|
||||
*> \endverbatim
|
||||
*>
|
||||
*> \param[in] E
|
||||
*> \param[in,out] E
|
||||
*> \verbatim
|
||||
*> E is REAL array, dimension (max(1,N-1))
|
||||
*> The (n-1) superdiagonal elements of the bidiagonal matrix
|
||||
*> B in elements 1 to N-1.
|
||||
*> On exit, very small entries are set to 0.
|
||||
*> \endverbatim
|
||||
*>
|
||||
*> \param[in] VL
|
||||
|
||||
Reference in New Issue
Block a user