diff --git a/.github/workflows/cmake-ctest.yml b/.github/workflows/cmake-ctest.yml index f199836075d..303b39e4648 100644 --- a/.github/workflows/cmake-ctest.yml +++ b/.github/workflows/cmake-ctest.yml @@ -12,6 +12,11 @@ on: description: "The common base name of the preset configuration name to control the build" required: true type: string + use_environ: + description: 'Environment to locate files' + type: string + required: true + default: snapshots permissions: contents: read @@ -41,6 +46,13 @@ jobs: run: | FILE_NAME_BASE=$(echo "${{ inputs.file_base }}") echo "FILE_BASE=$FILE_NAME_BASE" >> $GITHUB_OUTPUT + if [[ '${{ inputs.use_environ }}' == 'snapshots' ]] + then + SOURCE_NAME_BASE=$(echo "hdfsrc") + else + SOURCE_NAME_BASE=$(echo "$FILE_NAME_BASE") + fi + echo "SOURCE_BASE=$SOURCE_NAME_BASE" >> $GITHUB_OUTPUT shell: bash # Get files created by release script @@ -67,7 +79,7 @@ jobs: - name: Run ctest (Windows) run: | - cd "${{ runner.workspace }}/hdf5/hdfsrc" + cd "${{ runner.workspace }}/hdf5/${{ steps.set-file-base.outputs.SOURCE_BASE }}" cmake --workflow --preset=${{ inputs.preset_name }}-MSVC --fresh shell: bash @@ -117,6 +129,13 @@ jobs: run: | FILE_NAME_BASE=$(echo "${{ inputs.file_base }}") echo "FILE_BASE=$FILE_NAME_BASE" >> $GITHUB_OUTPUT + if [[ '${{ inputs.use_environ }}' == 'snapshots' ]] + then + SOURCE_NAME_BASE=$(echo "hdfsrc") + else + SOURCE_NAME_BASE=$(echo "$FILE_NAME_BASE") + fi + echo "SOURCE_BASE=$SOURCE_NAME_BASE" >> $GITHUB_OUTPUT # Get files created by release script - name: Get tgz-tarball (Linux) @@ -135,7 +154,7 @@ jobs: - name: Run ctest (Linux) run: | - cd "${{ runner.workspace }}/hdf5/hdfsrc" + cd "${{ runner.workspace }}/hdf5/${{ steps.set-file-base.outputs.SOURCE_BASE }}" cmake --workflow --preset=${{ inputs.preset_name }}-GNUC --fresh shell: bash @@ -157,8 +176,8 @@ jobs: run: | mkdir "${{ runner.workspace }}/builddeb" mkdir "${{ runner.workspace }}/builddeb/hdf5" - cp ${{ runner.workspace }}/hdf5/hdfsrc/COPYING ${{ runner.workspace }}/builddeb/hdf5 - cp ${{ runner.workspace }}/hdf5/hdfsrc/COPYING_LBNL_HDF5 ${{ runner.workspace }}/builddeb/hdf5 + cp ${{ runner.workspace }}/hdf5/${{ steps.set-file-base.outputs.SOURCE_BASE }}/COPYING ${{ runner.workspace }}/builddeb/hdf5 + cp ${{ runner.workspace }}/hdf5/${{ steps.set-file-base.outputs.SOURCE_BASE }}/COPYING_LBNL_HDF5 ${{ runner.workspace }}/builddeb/hdf5 cp ${{ runner.workspace }}/hdf5/build/${{ inputs.preset_name }}-GNUC/README.md ${{ runner.workspace }}/builddeb/hdf5 cp ${{ runner.workspace }}/hdf5/build/${{ inputs.preset_name }}-GNUC/*.deb ${{ runner.workspace }}/builddeb/hdf5 cd "${{ runner.workspace }}/builddeb" @@ -170,8 +189,8 @@ jobs: run: | mkdir "${{ runner.workspace }}/buildrpm" mkdir "${{ runner.workspace }}/buildrpm/hdf5" - cp ${{ runner.workspace }}/hdf5/hdfsrc/COPYING ${{ runner.workspace }}/buildrpm/hdf5 - cp ${{ runner.workspace }}/hdf5/hdfsrc/COPYING_LBNL_HDF5 ${{ runner.workspace }}/buildrpm/hdf5 + cp ${{ runner.workspace }}/hdf5/${{ steps.set-file-base.outputs.SOURCE_BASE }}/COPYING ${{ runner.workspace }}/buildrpm/hdf5 + cp ${{ runner.workspace }}/hdf5/${{ steps.set-file-base.outputs.SOURCE_BASE }}/COPYING_LBNL_HDF5 ${{ runner.workspace }}/buildrpm/hdf5 cp ${{ runner.workspace }}/hdf5/build/${{ inputs.preset_name }}-GNUC/README.md ${{ runner.workspace }}/buildrpm/hdf5 cp ${{ runner.workspace }}/hdf5/build/${{ inputs.preset_name }}-GNUC/*.rpm ${{ runner.workspace }}/buildrpm/hdf5 cd "${{ runner.workspace }}/buildrpm" @@ -234,6 +253,13 @@ jobs: run: | FILE_NAME_BASE=$(echo "${{ inputs.file_base }}") echo "FILE_BASE=$FILE_NAME_BASE" >> $GITHUB_OUTPUT + if [[ '${{ inputs.use_environ }}' == 'snapshots' ]] + then + SOURCE_NAME_BASE=$(echo "hdfsrc") + else + SOURCE_NAME_BASE=$(echo "$FILE_NAME_BASE") + fi + echo "SOURCE_BASE=$SOURCE_NAME_BASE" >> $GITHUB_OUTPUT # Get files created by release script - name: Get tgz-tarball (MacOS) @@ -261,14 +287,13 @@ jobs: - name: Run ctest (MacOS) id: run-ctest run: | - cd "${{ runner.workspace }}/hdf5/hdfsrc" + cd "${{ runner.workspace }}/hdf5/${{ steps.set-file-base.outputs.SOURCE_BASE }}" cmake --workflow --preset=${{ inputs.preset_name }}-OSX-Clang --fresh shell: bash - name: Publish binary (MacOS) id: publish-ctest-binary run: | - mkdir "${{ runner.workspace }}/build114" mkdir "${{ runner.workspace }}/build114/hdf5" cp ${{ runner.workspace }}/hdf5/hdfsrc/COPYING ${{ runner.workspace }}/build114/hdf5 @@ -326,7 +351,7 @@ jobs: - name: Run ctest (Linux S3) run: | - cd "${{ runner.workspace }}/hdf5/hdfsrc" + cd "${{ runner.workspace }}/hdf5/${{ steps.set-file-base.outputs.SOURCE_BASE }}" cmake --workflow --preset=${{ inputs.preset_name }}-GNUC-S3 --fresh shell: bash @@ -381,6 +406,13 @@ jobs: run: | FILE_NAME_BASE=$(echo "${{ inputs.file_base }}") echo "FILE_BASE=$FILE_NAME_BASE" >> $GITHUB_OUTPUT + if [[ '${{ inputs.use_environ }}' == 'snapshots' ]] + then + SOURCE_NAME_BASE=$(echo "hdfsrc") + else + SOURCE_NAME_BASE=$(echo "$FILE_NAME_BASE") + fi + echo "SOURCE_BASE=$SOURCE_NAME_BASE" >> $GITHUB_OUTPUT shell: bash # Get files created by release script @@ -411,7 +443,7 @@ jobs: CC: ${{ steps.setup-fortran.outputs.cc }} CXX: ${{ steps.setup-fortran.outputs.cxx }} run: | - cd "${{ runner.workspace }}/hdf5/hdfsrc" + cd "${{ runner.workspace }}/hdf5/${{ steps.set-file-base.outputs.SOURCE_BASE }}" cmake --workflow --preset=${{ inputs.preset_name }}-win-Intel --fresh shell: pwsh @@ -425,6 +457,15 @@ jobs: Copy-Item -Path ${{ runner.workspace }}/hdf5/build114/${{ inputs.preset_name }}-Intel/README.md -Destination ${{ runner.workspace }}/build114/hdf5/ Copy-Item -Path ${{ runner.workspace }}/hdf5/build114/${{ inputs.preset_name }}-Intel/* -Destination ${{ runner.workspace }}/build114/hdf5/ -Include *.zip cd "${{ runner.workspace }}/build114" +======= + mkdir "${{ runner.workspace }}/build" + mkdir "${{ runner.workspace }}/build/hdf5" + Copy-Item -Path ${{ runner.workspace }}/hdf5/${{ steps.set-file-base.outputs.SOURCE_BASE }}/COPYING -Destination ${{ runner.workspace }}/build/hdf5/ + Copy-Item -Path ${{ runner.workspace }}/hdf5/${{ steps.set-file-base.outputs.SOURCE_BASE }}/COPYING_LBNL_HDF5 -Destination ${{ runner.workspace }}/build/hdf5/ + Copy-Item -Path ${{ runner.workspace }}/hdf5/build/${{ inputs.preset_name }}-Intel/README.md -Destination ${{ runner.workspace }}/build/hdf5/ + Copy-Item -Path ${{ runner.workspace }}/hdf5/build/${{ inputs.preset_name }}-Intel/* -Destination ${{ runner.workspace }}/build/hdf5/ -Include *.zip + cd "${{ runner.workspace }}/build" +>>>>>>> f87725c... Merge HDF4 release workflow changes to hdf5 (#4093) 7z a -tzip ${{ steps.set-file-base.outputs.FILE_BASE }}-win-vs2022_intel.zip hdf5 shell: pwsh @@ -468,6 +509,13 @@ jobs: run: | FILE_NAME_BASE=$(echo "${{ inputs.file_base }}") echo "FILE_BASE=$FILE_NAME_BASE" >> $GITHUB_OUTPUT + if [[ '${{ inputs.use_environ }}' == 'snapshots' ]] + then + SOURCE_NAME_BASE=$(echo "hdfsrc") + else + SOURCE_NAME_BASE=$(echo "$FILE_NAME_BASE") + fi + echo "SOURCE_BASE=$SOURCE_NAME_BASE" >> $GITHUB_OUTPUT # Get files created by release script - name: Get tgz-tarball (Linux_intel) @@ -490,7 +538,7 @@ jobs: CC: ${{ steps.setup-fortran.outputs.cc }} CXX: ${{ steps.setup-fortran.outputs.cxx }} run: | - cd "${{ runner.workspace }}/hdf5/hdfsrc" + cd "${{ runner.workspace }}/hdf5/${{ steps.set-file-base.outputs.SOURCE_BASE }}" cmake --workflow --preset=${{ inputs.preset_name }}-Intel --fresh shell: bash diff --git a/.github/workflows/release-files.yml b/.github/workflows/release-files.yml index f0ab34d0891..d79ac3c1f10 100644 --- a/.github/workflows/release-files.yml +++ b/.github/workflows/release-files.yml @@ -44,9 +44,6 @@ jobs: with: fetch-depth: 0 - - run: | - git checkout ${{ inputs.file_sha }} - - uses: rickstaa/action-create-tag@a1c7777fcb2fee4f19b0f283ba888afa11678b72 # v1.7.2 id: "tag_create" with: @@ -183,7 +180,6 @@ jobs: - name: PreRelease tag id: create_prerelease - if: ${{ (inputs.use_environ == 'snapshots') }} uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v1 with: tag_name: "${{ inputs.use_tag }}" @@ -206,30 +202,6 @@ jobs: sha256sums.txt if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` - - name: Release tag - id: create_release - if: ${{ (inputs.use_environ == 'release') }} - uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v1 - with: - tag_name: "${{ inputs.use_tag }}" - prerelease: false - body_path: description.txt - files: | - ${{ steps.get-file-base.outputs.FILE_BASE }}.doxygen.zip - ${{ steps.get-file-base.outputs.FILE_BASE }}.tar.gz - ${{ steps.get-file-base.outputs.FILE_BASE }}.zip - ${{ steps.get-file-base.outputs.FILE_BASE }}-osx12.tar.gz - ${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc.tar.gz - ${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc.deb - ${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc.rpm - ${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc_s3.tar.gz - ${{ steps.get-file-base.outputs.FILE_BASE }}-win-vs2022_cl.zip - ${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_intel.tar.gz - ${{ steps.get-file-base.outputs.FILE_BASE }}-win-vs2022_intel.zip - ${{ steps.get-file-base.outputs.FILE_BASE }}.html.abi.reports - sha256sums.txt - if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` - - name: List files for the space (Linux) run: | ls -l ${{ github.workspace }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 75061178db1..a56bf3b083a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,88 +27,37 @@ jobs: TAG: ${{ inputs.use_tag }} run: echo "RELEASE_TAG=$TAG" >> $GITHUB_OUTPUT -# tarball.yml will be used for releases when pre-tag actions are implemented -# call-workflow-tarball: -# needs: log-the-inputs -# uses: ./.github/workflows/tarball.yml -# with: -# use_tag: ${{ inputs.use_tag }} -# use_environ: release - - create-files-ctest: + call-workflow-tarball: needs: log-the-inputs - runs-on: ubuntu-latest - outputs: - file_base: ${{ steps.set-file-base.outputs.FILE_BASE }} - steps: - - name: Set file base name - id: set-file-base - run: | - FILE_NAME_BASE=$(echo "${{ needs.log-the-inputs.outputs.rel_tag }}") - echo "FILE_BASE=$FILE_NAME_BASE" >> $GITHUB_OUTPUT - shell: bash - - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - name: Get Sources - uses: actions/checkout@v4.1.1 - with: - path: hdfsrc - - - name: Zip Folder - run: | - zip -r ${{ steps.set-file-base.outputs.FILE_BASE }}.zip ./hdfsrc - tar -zcvf ${{ steps.set-file-base.outputs.FILE_BASE }}.tar.gz ./hdfsrc - - - name: List files in the repository - run: | - ls -l ${{ github.workspace }} - ls $GITHUB_WORKSPACE - - # Save files created by release script - - name: Save tgz-tarball - uses: actions/upload-artifact@v4 - with: - name: tgz-tarball - path: ${{ steps.set-file-base.outputs.FILE_BASE }}.tar.gz - if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` - - - name: Save zip-tarball - uses: actions/upload-artifact@v4 - with: - name: zip-tarball - path: ${{ steps.set-file-base.outputs.FILE_BASE }}.zip - if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` - - - name: Save NEWSLETTER - uses: actions/upload-artifact@v4 - with: - name: NEWSLETTER - path: ./hdfsrc/release_docs/NEWSLETTER.txt - if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` + uses: ./.github/workflows/tarball.yml + with: +# use_tag: ${{ inputs.use_tag }} + use_environ: release call-workflow-ctest: - needs: create-files-ctest + needs: call-workflow-tarball uses: ./.github/workflows/cmake-ctest.yml with: - file_base: ${{ needs.create-files-ctest.outputs.file_base }} + file_base: ${{ needs.call-workflow-tarball.outputs.file_base }} preset_name: ci-StdShar + use_environ: release call-workflow-abi: - needs: [log-the-inputs, create-files-ctest, call-workflow-ctest] + needs: [log-the-inputs, call-workflow-tarball, call-workflow-ctest] uses: ./.github/workflows/abi-report.yml with: file_ref: '1_14_3' - file_base: ${{ needs.create-files-ctest.outputs.file_base }} + file_base: ${{ needs.call-workflow-tarball.outputs.file_base }} use_tag: ${{ needs.log-the-inputs.outputs.rel_tag }} use_environ: release call-workflow-release: - needs: [log-the-inputs, create-files-ctest, call-workflow-ctest, call-workflow-abi] + needs: [log-the-inputs, call-workflow-tarball, call-workflow-ctest, call-workflow-abi] permissions: contents: write # In order to allow tag creation uses: ./.github/workflows/release-files.yml with: - file_base: ${{ needs.create-files-ctest.outputs.file_base }} + file_base: ${{ needs.call-workflow-tarball.outputs.file_base }} file_branch: ${{ needs.log-the-inputs.outputs.rel_tag }} file_sha: ${{ needs.log-the-inputs.outputs.rel_tag }} use_tag: ${{ needs.log-the-inputs.outputs.rel_tag }}