feat: update CI for 20241005 #327
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: master pre-merge check | |
on: | |
push: | |
branches: | |
- master | |
- stable_v* | |
pull_request: | |
branches: | |
- master | |
- stable_v* | |
jobs: | |
cmake-win-test: | |
name: cmake build-win | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [windows-2019, windows-2022] | |
generator: ['MSYS Makefiles'] | |
shared: [on, off] | |
include: | |
- os: windows-2019 | |
shared: on | |
generator: 'Visual Studio 16 2019' | |
- os: windows-2019 | |
shared: off | |
generator: 'Visual Studio 16 2019' | |
- os: windows-2022 | |
shared: on | |
generator: 'Visual Studio 17 2022' | |
- os: windows-2022 | |
shared: off | |
generator: 'Visual Studio 17 2022' | |
steps: | |
- uses: actions/checkout@v4 | |
- name: cmake_version | |
run: cmake --version | |
- name: cmake_generage | |
run: cmake -S . -B build -G "${{ matrix.generator }}" -DENABLE_SHARED=${{ matrix.shared }} -DENABLE_TESTS=on | |
- name: cmake_build | |
run: cmake --build build --config Release --parallel 4 | |
- name: ctest | |
run: | | |
cd build | |
ctest -C Release --output-on-failure | |
cmake-mac-test: | |
name: cmake build-mac | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macos-12, macos-13, macos-14] | |
xcode_version: ['14.3.1'] | |
include: | |
- os: macos-12 | |
xcode_version: '13.4.1' | |
- os: macos-12 | |
xcode_version: '14.2' | |
- os: macos-13 | |
xcode_version: '14.3.1' | |
- os: macos-13 | |
xcode_version: '15.2' | |
- os: macos-14 | |
xcode_version: '14.3.1' | |
- os: macos-14 | |
xcode_version: '15.4' | |
exclude: | |
- os: macos-12 | |
xcode_version: '14.3.1' | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Select Xcode version | |
run: sudo xcode-select -s '/Applications/Xcode_${{matrix.xcode_version}}.app/Contents/Developer' | |
- name: Show Xcode version | |
run: xcodebuild -version | |
- name: cmake_version | |
run: cmake --version | |
- name: cmake_generage-macos | |
run: cmake -S . -B build -G "Unix Makefiles" -DENABLE_SHARED=on -DENABLE_ELEMENTS=on | |
- name: cmake_build | |
run: cmake --build build --config Release --parallel 4 | |
- name: ctest | |
run: | | |
cd build | |
ctest -C Release --output-on-failure | |
- name: lint_check | |
run: ./tools/lint_quiet.sh | |
cmake-ubuntu-test: | |
name: cmake build-ubuntu | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-24.04, ubuntu-22.04, ubuntu-20.04] | |
shared: [on, off] | |
elements: [on] | |
include: | |
- os: ubuntu-22.04 | |
elements: off | |
steps: | |
- uses: actions/checkout@v4 | |
- name: dump version | |
run: | | |
cmake --version | |
gcc --version | |
- name: cmake_configure | |
run: | | |
cmake -S . -B build -G "Unix Makefiles" -DENABLE_SHARED=${{ matrix.shared }} -DENABLE_ELEMENTS=${{ matrix.elements }} -DTARGET_RPATH=./build/Release | |
- name: cmake-build | |
run: cmake --build build --config Release --parallel 4 | |
- name: lint_check | |
run: ./tools/lint_quiet.sh | |
- name: test | |
run: | | |
cd build | |
ctest -C Release --output-on-failure | |
cd .. | |
cmake-ubuntu-coverage: | |
name: cmake build-and-coverage-ubuntu | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-22.04] | |
shared: [on] | |
elements: [on] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: dump version | |
run: | | |
cmake --version | |
gcc --version | |
- name: ubuntu-apt-install | |
run: sudo apt install lcov | |
- name: cmake-build | |
run: | | |
cmake --version | |
cmake -S . -B build -G "Unix Makefiles" -DENABLE_SHARED=${{ matrix.shared }} -DENABLE_ELEMENTS=${{ matrix.elements }} -DENABLE_DEBUG=on -DENABLE_COVERAGE=on -DCMAKE_BUILD_TYPE=Debug -DTARGET_RPATH=./build/Debug | |
cmake --build build --config Debug --parallel 4 | |
- name: lint_check | |
run: ./tools/lint_quiet.sh | |
- name: test | |
run: | | |
cd build | |
ctest -C Debug --output-on-failure -R cfd | |
cd .. | |
- name: collect coverage | |
run: | | |
cd build | |
make lcov_cfd | |
zip -r lcov_cfd_output.zip lcov_cfd_output | |
cd .. | |
- name: upload coverage | |
uses: actions/upload-artifact@v4 | |
with: | |
name: output-lcov-cfd-${{ matrix.os }} | |
path: ./build/lcov_cfd_output.zip | |
cmake-cpp-support-test: | |
name: cmake build-ubuntu C++ support test | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [windows-2022, ubuntu-22.04] | |
cppver: [11, 14, 17, 20] | |
include: | |
- os: windows-2022 | |
generator: 'Visual Studio 17 2022' | |
steps: | |
- uses: actions/checkout@v4 | |
- name: dump version | |
run: | | |
cmake --version | |
gcc --version | |
- name: cmake_configure | |
if: matrix.os != 'windows-2022' | |
run: cmake -S . -B build -G "Unix Makefiles" -DENABLE_SHARED=on -DENABLE_ELEMENTS=on -DENABLE_TESTS=on -DSTD_CPP_VERSION=${{ matrix.cppver }} -DCMAKE_BUILD_TYPE=Release -DTARGET_RPATH=./build/Release | |
- name: cmake_generage vs | |
if: matrix.os == 'windows-2022' | |
run: cmake -S . -B build -G "${{ matrix.generator }}" -A x64 -DENABLE_SHARED=on -DENABLE_TESTS=on -DSTD_CPP_VERSION=${{ matrix.cppver }} -DCMAKE_BUILD_TYPE=Release | |
- name: cmake_build | |
run: cmake --build build --config Release --parallel 4 | |
- name: test | |
run: | | |
cd build | |
ctest -C Release --output-on-failure | |
cd .. | |
ubuntu-valgrind: | |
name: valgrind-ubuntu | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-22.04] | |
shared: [on] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: dump version | |
run: | | |
cmake --version | |
gcc --version | |
- name: ubuntu-apt-install | |
run: | | |
cat /etc/os-release | |
sudo apt-get update | |
sudo apt-get install -y valgrind | |
- name: cmake-build | |
run: | | |
cmake --version | |
cmake -S . -B build -G "Unix Makefiles" -DENABLE_SHARED=${{ matrix.shared }} -DCMAKE_BUILD_TYPE=Debug -DTARGET_RPATH=./build/Debug | |
cmake --build build --config Debug --parallel 4 | |
- name: valgrind | |
run: | | |
# --valgrind-stacksize=1048576 --num-callers=12 | |
valgrind -v --tool=memcheck --leak-check=full --valgrind-stacksize=10485760 --log-file=./valgrind.log --time-stamp=yes ./build/Debug/cfd_test | |
- name: upload coverage | |
uses: actions/upload-artifact@v4 | |
with: | |
name: valgrind-log | |
path: ./valgrind.log | |
arm-build-test: | |
runs-on: ubuntu-24.04 | |
strategy: | |
matrix: | |
platform: ['linux/arm/v7', 'linux/arm64/v8'] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: docker build | |
run: | | |
docker buildx build --platform ${{matrix.platform}} -f ./Dockerfile . --no-cache | |
doxygen-ubuntu: | |
name: doxygen-check | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: install_doxygen | |
run: sudo apt install doxygen graphviz | |
- name: doxygen_check | |
run: | | |
cd doc | |
doxygen Doxyfile_quiet_all |