Skip to content

Nightly Build

Nightly Build #4

Workflow file for this run

name: Nightly Build
on:
schedule:
# Every day at 6:11 AM UTC or 2:11 AM EST
- cron: '11 6 * * *'
pull_request:
paths: .github/workflows/Nightly.yml
workflow_dispatch:
jobs:
matrix-jobs:
runs-on: ${{ matrix.os }}
name: ${{ matrix.name }}
strategy:
matrix:
include:
- os: coverage-x64
name: coverage
cmake-build-type: "RelWithDebInfo"
ctest-cache: |
CMAKE_CXX_FLAGS:STRING=-g -O0 --coverage
CMAKE_C_FLAGS:STRING=-g -O0 --coverage
CMAKE_EXE_LINKER_FLAGS:STRING=-g -O0 -lgcov
CTEST_CUSTOM_COVERAGE_EXCLUDE:STRING=".*/ITK-prefix/.*" ".*/GTest-prefix/.*"
ctest-extra-args: |
-Ddashboard_do_coverage=1 \
-Ddashboard_track="Nightly" \
-DCTEST_COVERAGE_COMMAND="$(which gcov)"
- os: coverage-x64
name: valgrind
cmake-build-type: "RelWithDebInfo"
ctest-test-timeout: 10000
ctest-extra-args: |
-Ddashboard_do_memcheck=1 \
-Ddashboard_track="Nightly" \
-DCTEST_MEMORYCHECK_COMMAND="$(type -p valgrind)" \
-DCTEST_MEMORYCHECK_COMMAND_OPTIONS="--trace-children=yes --quiet --tool=memcheck --leak-check=yes --show-reachable=yes --num-callers=50 --verbose --demangle=yes --gen-suppressions=all --child-silent-after-fork=yes" \
-DCTEST_MEMORYCHECK_SUPPRESSIONS_FILE="${CTEST_SOURCE_DIRECTORY}/CMake/Valgrind-Ubuntu2004.supp"
env:
CTEST_SOURCE_DIRECTORY: "${{ github.workspace }}"
CTEST_BINARY_DIRECTORY: "${{ github.workspace }}/bld"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: "${{ github.event.pull_request.head.sha }}"
- uses: actions/checkout@v4
with:
path: SimpleITK-dashboard
ref: dashboard
- name: Generate External Data Hash
shell: bash
run: |
git log -n 1 "${{ github.workspace }}/Testing/Data/" | tee "${{ github.workspace }}/external-data.hashable"
- uses: actions/cache@v4
id: cache
with:
path: ${{ runner.temp }}/.ExternalData
key: external-data-v1-${{ hashFiles( format( '{0}/{1}', github.workspace, 'external-data.hashable') ) }}
enableCrossOsArchive: true
restore-keys: |
external-data-v1-
- name: Build and Test
shell: bash
env:
DASHBOARD_BRANCH_DIRECTORY: "${{ github.workspace }}/SimpleITK-dashboard"
ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS: 2
CTEST_CONFIGURATION_TYPE: ${{ matrix.cmake-build-type }}
CTEST_CMAKE_GENERATOR: "Ninja"
CTEST_OUTPUT_ON_FAILURE: 1
CTEST_TEST_TIMEOUT: ${{ matrix.ctest-test-timeout }}
CTEST_CACHE: |
WRAP_DEFAULT:BOOL=OFF
BUILD_EXAMPLES:BOOL=ON
BUILD_TESTING:BOOL=ON
${{ matrix.ctest-cache }}
run: |
cmake --version
gcov --version
ctest -S ${CTEST_SOURCE_DIRECTORY}/.github/workflows/github_actions.cmake -V -- \
${{ matrix.ctest-extra-args }}
itk-nightly:
runs-on: ${{ matrix.os }}
name: ${{ matrix.name }}
timeout-minutes: ${{ matrix.timeout }}
strategy:
fail-fast: false
matrix:
include:
- os: coverage-x64
name: itk-valgrind
cmake-build-type: Debug
ctest-test-timeout: 3600
timeout: 600
ctest-cache: |
CMAKE_CXX_FLAGS:STRING=-O0
CMAKE_C_FLAGS:STRING=-O0
ctest-extra-args: |
-Ddashboard_do_memcheck=1 \
-DCTEST_TEST_ARGS="EXCLUDE_LABEL;RUNS_LONG" \
-DCTEST_MEMORYCHECK_COMMAND="$(type -p valgrind)" \
-DCTEST_MEMORYCHECK_COMMAND_OPTIONS="--trace-children=yes --quiet --tool=memcheck --leak-check=yes --show-reachable=yes --num-callers=50 --verbose --demangle=yes --gen-suppressions=all --child-silent-after-fork=yes" \
-DCTEST_MEMORYCHECK_SUPPRESSIONS_FILE="${CTEST_SOURCE_DIRECTORY}/ITK/CMake/InsightValgrind-Ubuntu2004.supp"
- os: coverage-x64
name: itk-coverage
cmake-build-type: Debug
ctest-test-timeout: 1800
timeout: 180
ctest-cache: |
CMAKE_CXX_FLAGS:STRING=--coverage
CMAKE_C_FLAGS:STRING=--coverage
CMAKE_EXE_LINKER_FLAGS=-lgcov
ctest-extra-args: |
-Ddashboard_do_coverage=1 \
-DCTEST_COVERAGE_COMMAND="$(which gcov)"
env:
CTEST_SOURCE_DIRECTORY: "${{ github.workspace }}"
DASHBOARD_BRANCH_DIRECTORY: "${{ github.workspace }}/ITK-dashboard"
steps:
- uses: actions/checkout@v4
with:
repository: InsightSoftwareConsortium/ITK
path: ITK-dashboard
ref: dashboard
- name: CTest Build and Test
shell: bash
env:
ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS: 2
CTEST_CONFIGURATION_TYPE: ${{ matrix.cmake-build-type }}
CTEST_CMAKE_GENERATOR: "Ninja"
CTEST_OUTPUT_ON_FAILURE: 1
CTEST_TEST_TIMEOUT: ${{ matrix.ctest-test-timeout }}
CTEST_BUILD_NAME: "${{ matrix.name }} ${{ github.run_id }} "
run: |
cat > dashboard.cmake << EOF
set(CTEST_SITE "GHA-SIMPLEITK-\$ENV{RUNNER_OS}-\$ENV{RUNNER_ARCH}")
set(CTEST_BUILD_NAME "\$ENV{CTEST_BUILD_NAME}")
set(CTEST_BUILD_CONFIGURATION "\$ENV{CTEST_CONFIGURATION_TYPE}")
set(CTEST_DASHBOARD_ROOT "\$ENV{CTEST_SOURCE_DIRECTORY}")
set(CTEST_OUTPUT_ON_FAILURE \$ENV{CTEST_OUTPUT_ON_FAILURE})
set(CTEST_CMAKE_GENERATOR "\$ENV{CTEST_CMAKE_GENERATOR}")
set(CTEST_SOURCE_DIRECTORY "\${CTEST_DASHBOARD_ROOT}/ITK")
set(dashboard_model Nightly )
include( ProcessorCount )
ProcessorCount( NPROC )
message(STATUS "NPROC: \${NPROC}")
set(CTEST_TEST_ARGS \${CTEST_TEST_ARGS} PARALLEL_LEVEL \${NPROC})
set( CTEST_TEST_TIMEOUT \$ENV{CTEST_TEST_TIMEOUT} )
set(dashboard_track "Nightly")
set(dashboard_cache "
BUILD_DOCUMENTS:BOOL=OFF
BUILD_EXAMPLES:BOOL=ON
BUILD_SHARED_LIBS:BOOL=ON
BUILD_TESTING:BOOL=ON
ITK_LEGACY_SILENT:BOOL=ON
Module_ITKReview:BOOL=ON
Module_ITKIODCMTK:BOOL=ON
${{ matrix.ctest-cache }}
")
include(\$ENV{DASHBOARD_BRANCH_DIRECTORY}/itk_common.cmake)
EOF
cat dashboard.cmake
ctest -V -S dashboard.cmake -- ${{ matrix.ctest-extra-args }}
df -h