Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move cygwin workflow to cdash reports in daily-build #5004

Merged
merged 10 commits into from
Oct 25, 2024
Merged
6 changes: 0 additions & 6 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,6 @@ jobs:
with:
build_mode: "Release"

call-release-cmake-cygwin:
name: "CMake Cygwin Workflows"
uses: ./.github/workflows/cygwin-cmake.yml
with:
build_mode: "Release"

call-release-cmake-xpr:
name: "CMake TestExpress Workflows"
uses: ./.github/workflows/testxpr-cmake.yml
Expand Down
108 changes: 81 additions & 27 deletions .github/workflows/cygwin-cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,20 @@ name: hdf5 dev CMake cygwin
on:
workflow_call:
inputs:
build_mode:
description: "release vs. debug build"
snap_name:
description: 'The name in the source tarballs'
type: string
required: false
default: hdfsrc
file_base:
description: "The common base name of the source tarballs"
required: true
type: string
use_environ:
description: 'Environment to locate files'
type: string
required: true
default: snapshots

permissions:
contents: read
Expand All @@ -30,36 +40,80 @@ jobs:
with:
packages: cmake gcc-fortran make ninja zlib-devel flex bison perl

- name: CMake Configure
- name: Set file base name (Cygwin)
id: set-file-base
run: |
FILE_NAME_BASE=$(echo "${{ inputs.file_base }}")
echo "FILE_BASE=$FILE_NAME_BASE" >> $GITHUB_OUTPUT
if [[ '${{ inputs.use_environ }}' == 'release' ]]
then
SOURCE_NAME_BASE=$(echo "${{ inputs.snap_name }}")
else
SOURCE_NAME_BASE=$(echo "hdfsrc")
fi
echo "SOURCE_BASE=$SOURCE_NAME_BASE" >> $GITHUB_OUTPUT
shell: C:\cygwin\bin\bash.exe -eo pipefail -o igncr '{0}'

# Get files created by release script
- name: Get zip-tarball (Cygwin)
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: zip-tarball
path: ${{ github.workspace }}

- name: List files for the space (Cygwin)
run: |
export PATH=/usr/bin:$PATH
mkdir build
cd build
cmake -C ../config/cmake/cacheinit.cmake \
-G Ninja \
--log-level=VERBOSE \
-DCMAKE_BUILD_TYPE=${{ inputs.build_mode }} \
-DBUILD_SHARED_LIBS:BOOL=OFF \
-DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF \
-DHDF5_BUILD_CPP_LIB:BOOL=OFF \
-DLIBAEC_USE_LOCALCONTENT=OFF \
-DZLIB_USE_LOCALCONTENT=OFF \
-DHDF5_BUILD_FORTRAN:BOOL=ON \
-DHDF5_BUILD_JAVA:BOOL=OFF \
..
ls -l ${{ github.workspace }}
ls ${{ runner.workspace }}

- name: CMake Build
- name: Uncompress source (Cygwin)
working-directory: ${{ github.workspace }}
run: 7z x ${{ steps.set-file-base.outputs.FILE_BASE }}.zip
shell: C:\cygwin\bin\bash.exe -eo pipefail -o igncr '{0}'

- name: Copy script files for the space (Cygwin)
run: |
export PATH=/usr/bin:$PATH
cd build
cmake --build . --parallel 3 --config ${{ inputs.build_mode }}
cp ${{ github.workspace }}/${{ steps.set-file-base.outputs.SOURCE_BASE }}/config/cmake/scripts/CTestScript.cmake ${{ runner.workspace }}/hdf5
cp ${{ github.workspace }}/${{ steps.set-file-base.outputs.SOURCE_BASE }}/config/cmake/scripts/HDF5config.cmake ${{ runner.workspace }}/hdf5

- name: List files for the hdf5 (Cygwin)
run: |
ls ${{ runner.workspace }}/hdf5

- name: Create options file (Cygwin)
uses: "DamianReeves/write-file-action@master"
with:
path: ${{ runner.workspace }}/hdf5/HDF5options.cmake
write-mode: overwrite
contents: |
set (CTEST_DROP_SITE_INIT "my.cdash.org")
# Change following line to submit to your CDash dashboard to a different CDash project
#set (CTEST_DROP_LOCATION_INIT "/submit.php?project=HDF5")
set (SITE_BUILDNAME_SUFFIX "${{ steps.set-file-base.outputs.FILE_BASE }}")
set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} --log-level=VERBOSE")
set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_GENERATE_HEADERS=OFF")
set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_JAVA:BOOL=OFF")
set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_CPP_LIB:BOOL=OFF")
set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=OFF")
set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=ON")
set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=ON")
set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_SZIP_ENCODING:BOOL=ON")
set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_PLUGIN_SUPPORT:BOOL=ON")
set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DLIBAEC_USE_LOCALCONTENT:BOOL=OFF")
set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DZLIB_USE_LOCALCONTENT:BOOL=OFF")

- name: CMake Run Tests
- name: Run ctest (Cygwin)
shell: C:\cygwin\bin\bash.exe -eo pipefail -o igncr '{0}'
run: |
export PATH=/usr/bin:$PATH
cd build
ctest . --parallel 2 -C ${{ inputs.build_mode }} -V
# ctest . --parallel 2 -C ${{ inputs.build_mode }} -V -R "FORTRAN|H5TEST"
export PATH=/usr/bin:$PATH
cd "${{ runner.workspace }}/hdf5"
ctest -S HDF5config.cmake,CTEST_SITE_EXT=GH-CYG,LOCAL_SUBMIT=ON,NINJA=TRUE,BUILD_GENERATOR=Unix,CTEST_SOURCE_NAME=${{ steps.set-file-base.outputs.SOURCE_BASE }} -C Release -VV -O hdf5.log
continue-on-error: true

# Save log files created by ctest script
- name: Save log (Cygwin)
uses: actions/upload-artifact@v4
with:
name: gcc-cygwin-log
path: ${{ runner.workspace }}/hdf5/hdf5.log
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`
9 changes: 9 additions & 0 deletions .github/workflows/daily-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,15 @@ jobs:
use_tag: snapshot
use_environ: snapshots

call-release-cmake-cygwin:
needs: [get-old-names, call-workflow-tarball]
name: "CMake Cygwin Workflows"
uses: ./.github/workflows/cygwin-cmake.yml
with:
file_base: ${{ needs.call-workflow-tarball.outputs.file_base }}
use_environ: snapshots
if: ${{ ((needs.call-workflow-tarball.outputs.has_changes == 'true') || (needs.get-old-names.outputs.run-ignore == 'ignore')) }}

call-workflow-c-script:
needs: [get-old-names, call-workflow-tarball]
uses: ./.github/workflows/cmake-script.yml
Expand Down
Loading