From a7f4ba27002f8757ab54cb641c4ee036135ca3b2 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 27 Jun 2023 14:40:38 -0500 Subject: [PATCH 01/13] Update actions for release option, fix branch for daily build --- .github/workflows/daily-build.yml | 1 + .github/workflows/hdfeos5.yml | 2 +- .github/workflows/release-files.yml | 140 ++++++++++++++++++++++ .github/workflows/release.yml | 176 ++++++++-------------------- 4 files changed, 192 insertions(+), 127 deletions(-) create mode 100644 .github/workflows/release-files.yml diff --git a/.github/workflows/daily-build.yml b/.github/workflows/daily-build.yml index ec35e104a94..5467672fa46 100644 --- a/.github/workflows/daily-build.yml +++ b/.github/workflows/daily-build.yml @@ -4,6 +4,7 @@ name: hdf5 dev daily build on: workflow_dispatch: schedule: + - branches: [ develop ] - cron: "6 0 * * *" permissions: diff --git a/.github/workflows/hdfeos5.yml b/.github/workflows/hdfeos5.yml index 04c92b9f467..fd2d0116f61 100644 --- a/.github/workflows/hdfeos5.yml +++ b/.github/workflows/hdfeos5.yml @@ -1,4 +1,4 @@ -name: hdfeos5 +name: hdfeos5 dev on: workflow_dispatch: diff --git a/.github/workflows/release-files.yml b/.github/workflows/release-files.yml new file mode 100644 index 00000000000..6bf9db8db07 --- /dev/null +++ b/.github/workflows/release-files.yml @@ -0,0 +1,140 @@ +name: hdf5 dev release + +# Controls when the action will run. Triggers the workflow on a schedule +on: + workflow_call: + inputs: + file_base: + description: "The common base name of the source tarballs" + required: true + type: string + file_branch: + description: "The branch name for the source tarballs" + required: true + type: string + file_sha: + description: "The sha for the source tarballs" + required: true + type: string + +# Minimal permissions to be inherited by any job that doesn't declare its own permissions +permissions: + contents: read + +# Previous workflows must pass to get here so tag the commit that created the files +jobs: + create-tag: + runs-on: ubuntu-latest + permissions: + contents: write # In order to allow tag creation + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - name: Get Sources + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - run: | + git checkout ${{ inputs.file_sha }} + + - uses: rickstaa/action-create-tag@v1 + id: "tag_create" + with: + commit_sha: ${{ inputs.file_sha }} + tag: "snapshot" + force_push_tag: true + message: "Latest snapshot" + + # Print result using the action output. + - run: | + echo "Tag already present: ${{ steps.tag_create.outputs.tag_exists }}" + + PreRelease-getfiles: + runs-on: ubuntu-latest + needs: create-tag + environment: snapshots + permissions: + contents: write + steps: + - name: Get file base name + id: get-file-base + run: | + FILE_NAME_BASE=$(echo "${{ inputs.file_base }}") + echo "FILE_BASE=$FILE_NAME_BASE" >> $GITHUB_OUTPUT + + # Get files created by tarball script + - name: Get doxygen (Linux) + uses: actions/download-artifact@v3 + with: + name: docs-doxygen + path: ${{ github.workspace }}/${{ steps.get-file-base.outputs.FILE_BASE }}.doxygen + + - name: Zip Folder + run: zip -r ${{ steps.get-file-base.outputs.FILE_BASE }}.doxygen.zip ./${{ steps.get-file-base.outputs.FILE_BASE }}.doxygen + + - name: Get tgz-tarball (Linux) + uses: actions/download-artifact@v3 + with: + name: tgz-tarball + path: ${{ github.workspace }} + + - name: Get zip-tarball (Windows) + uses: actions/download-artifact@v3 + with: + name: zip-tarball + path: ${{ github.workspace }} + + # Get files created by cmake-ctest script + - name: Get published binary (Windows) + uses: actions/download-artifact@v3 + with: + name: zip-vs2022-binary + path: ${{ github.workspace }} + + - name: Get published binary (MacOS) + uses: actions/download-artifact@v3 + with: + name: tgz-osx12-binary + path: ${{ github.workspace }} + + - name: Get published binary (Linux) + uses: actions/download-artifact@v3 + with: + name: tgz-ubuntu-2204-binary + path: ${{ github.workspace }} + + - name: PreRelease tag + id: create_release + uses: softprops/action-gh-release@v1 + with: + tag_name: "snapshot" + prerelease: true + 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.tar.gz + ${{ steps.get-file-base.outputs.FILE_BASE }}-win_vs2022.zip + if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` + + - name: Store Release url + run: | + echo "${{ steps.create_release.outputs.upload_url }}" > ./upload_url + +# - uses: actions/upload-artifact@v3 +# with: +# path: ./upload_url +# name: upload_url + + - name: List files for the space (Linux) + run: | + ls -l ${{ github.workspace }} + ls ${{ runner.workspace }} + + - name: dev-only-docs + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ${{ github.workspace }}/${{ steps.get-file-base.outputs.FILE_BASE }}.doxygen + diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6bf9db8db07..8509656119c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,140 +1,64 @@ -name: hdf5 dev release +name: hdf5 dev release build -# Controls when the action will run. Triggers the workflow on a schedule +# Controls when the action will run. Triggers the workflow on a manual run on: - workflow_call: - inputs: - file_base: - description: "The common base name of the source tarballs" - required: true - type: string - file_branch: - description: "The branch name for the source tarballs" - required: true + workflow_dispatch: + - branches: [ develop ] + - inputs: + tag: + description: 'Release version tag' type: string - file_sha: - description: "The sha for the source tarballs" + required: false + default: snapshot + environment: + description: 'Environment to locate files' + type: choice required: true - type: string + default: snapshots + options: + - snapshots + - release -# Minimal permissions to be inherited by any job that doesn't declare its own permissions permissions: contents: read -# Previous workflows must pass to get here so tag the commit that created the files +# A workflow run is made up of one or more jobs that can run sequentially or +# in parallel. jobs: - create-tag: + log-the-inputs: runs-on: ubuntu-latest - permissions: - contents: write # In order to allow tag creation steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - name: Get Sources - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - run: | - git checkout ${{ inputs.file_sha }} - - - uses: rickstaa/action-create-tag@v1 - id: "tag_create" - with: - commit_sha: ${{ inputs.file_sha }} - tag: "snapshot" - force_push_tag: true - message: "Latest snapshot" - - # Print result using the action output. - - run: | - echo "Tag already present: ${{ steps.tag_create.outputs.tag_exists }}" - - PreRelease-getfiles: - runs-on: ubuntu-latest - needs: create-tag - environment: snapshots + echo "Tag: $TAG" + echo "Environment: $ENVIRONMENT" + env: + TAG: ${{ inputs.tag }} + ENVIRONMENT: ${{ inputs.environment }} + + call-workflow-tarball: + needs: log-the-inputs + uses: ./.github/workflows/tarball.yml + with: + use_tag: ${{ inputs.tag }} + use_environ: ${{ inputs.environment }} + + call-workflow-ctest: + needs: call-workflow-tarball + uses: ./.github/workflows/cmake-ctest.yml + with: + file_base: ${{ needs.call-workflow-tarball.outputs.file_base }} + use_tag: ${{ inputs.tag }} + use_environ: ${{ inputs.environment }} + + call-workflow-release: + needs: [call-workflow-tarball, call-workflow-ctest] permissions: - contents: write - steps: - - name: Get file base name - id: get-file-base - run: | - FILE_NAME_BASE=$(echo "${{ inputs.file_base }}") - echo "FILE_BASE=$FILE_NAME_BASE" >> $GITHUB_OUTPUT - - # Get files created by tarball script - - name: Get doxygen (Linux) - uses: actions/download-artifact@v3 - with: - name: docs-doxygen - path: ${{ github.workspace }}/${{ steps.get-file-base.outputs.FILE_BASE }}.doxygen - - - name: Zip Folder - run: zip -r ${{ steps.get-file-base.outputs.FILE_BASE }}.doxygen.zip ./${{ steps.get-file-base.outputs.FILE_BASE }}.doxygen - - - name: Get tgz-tarball (Linux) - uses: actions/download-artifact@v3 - with: - name: tgz-tarball - path: ${{ github.workspace }} - - - name: Get zip-tarball (Windows) - uses: actions/download-artifact@v3 - with: - name: zip-tarball - path: ${{ github.workspace }} - - # Get files created by cmake-ctest script - - name: Get published binary (Windows) - uses: actions/download-artifact@v3 - with: - name: zip-vs2022-binary - path: ${{ github.workspace }} - - - name: Get published binary (MacOS) - uses: actions/download-artifact@v3 - with: - name: tgz-osx12-binary - path: ${{ github.workspace }} - - - name: Get published binary (Linux) - uses: actions/download-artifact@v3 - with: - name: tgz-ubuntu-2204-binary - path: ${{ github.workspace }} - - - name: PreRelease tag - id: create_release - uses: softprops/action-gh-release@v1 - with: - tag_name: "snapshot" - prerelease: true - 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.tar.gz - ${{ steps.get-file-base.outputs.FILE_BASE }}-win_vs2022.zip - if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` - - - name: Store Release url - run: | - echo "${{ steps.create_release.outputs.upload_url }}" > ./upload_url - -# - uses: actions/upload-artifact@v3 -# with: -# path: ./upload_url -# name: upload_url - - - name: List files for the space (Linux) - run: | - ls -l ${{ github.workspace }} - ls ${{ runner.workspace }} - - - name: dev-only-docs - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ${{ github.workspace }}/${{ steps.get-file-base.outputs.FILE_BASE }}.doxygen + contents: write # In order to allow tag creation + uses: ./.github/workflows/release.yml + with: + file_base: ${{ needs.call-workflow-tarball.outputs.file_base }} + file_branch: ${{ needs.call-workflow-tarball.outputs.file_branch }} + file_sha: ${{ needs.call-workflow-tarball.outputs.file_sha }} + use_tag: ${{ inputs.tag }} + use_environ: ${{ inputs.environment }} From 82713d2a2c60b7a8d8ac0bf31905a962097e73bc Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 27 Jun 2023 14:49:43 -0500 Subject: [PATCH 02/13] Scheduled workflows run on latest commit on the develop --- .github/workflows/daily-build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/daily-build.yml b/.github/workflows/daily-build.yml index 5467672fa46..ec35e104a94 100644 --- a/.github/workflows/daily-build.yml +++ b/.github/workflows/daily-build.yml @@ -4,7 +4,6 @@ name: hdf5 dev daily build on: workflow_dispatch: schedule: - - branches: [ develop ] - cron: "6 0 * * *" permissions: From 8f9d2cda4ca8a212b574db3611e0b0f25a1513d6 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 27 Jun 2023 14:57:23 -0500 Subject: [PATCH 03/13] Use map value --- .github/workflows/release.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8509656119c..d2e4d907c9a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,8 +3,7 @@ name: hdf5 dev release build # Controls when the action will run. Triggers the workflow on a manual run on: workflow_dispatch: - - branches: [ develop ] - - inputs: + inputs: tag: description: 'Release version tag' type: string From 4a3a7d94108deef7b12ff6d2292a0ae5ffab20c6 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 27 Jun 2023 15:33:23 -0500 Subject: [PATCH 04/13] correct name of release call --- .github/workflows/daily-build.yml | 2 +- .github/workflows/release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/daily-build.yml b/.github/workflows/daily-build.yml index ec35e104a94..f094184e502 100644 --- a/.github/workflows/daily-build.yml +++ b/.github/workflows/daily-build.yml @@ -26,7 +26,7 @@ jobs: needs: [call-workflow-tarball, call-workflow-ctest] permissions: contents: write # In order to allow tag creation - uses: ./.github/workflows/release.yml + uses: ./.github/workflows/release-files.yml with: file_base: ${{ needs.call-workflow-tarball.outputs.file_base }} file_branch: ${{ needs.call-workflow-tarball.outputs.file_branch }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d2e4d907c9a..bf39ebf50a8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -53,7 +53,7 @@ jobs: needs: [call-workflow-tarball, call-workflow-ctest] permissions: contents: write # In order to allow tag creation - uses: ./.github/workflows/release.yml + uses: ./.github/workflows/release-files.yml with: file_base: ${{ needs.call-workflow-tarball.outputs.file_base }} file_branch: ${{ needs.call-workflow-tarball.outputs.file_branch }} From d5032e0d5670f1b58b8ecb33b4786927d84e6468 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 27 Jun 2023 17:21:14 -0500 Subject: [PATCH 05/13] Correct use of inputs --- .github/workflows/daily-build.yml | 7 ++++++ .github/workflows/release-files.yml | 19 +++++++++++---- .github/workflows/release.yml | 16 ++++++------- .github/workflows/tarball.yml | 36 +++++++++++++++++++++++++---- 4 files changed, 61 insertions(+), 17 deletions(-) diff --git a/.github/workflows/daily-build.yml b/.github/workflows/daily-build.yml index f094184e502..5633b3cfbbc 100644 --- a/.github/workflows/daily-build.yml +++ b/.github/workflows/daily-build.yml @@ -14,12 +14,17 @@ permissions: jobs: call-workflow-tarball: uses: ./.github/workflows/tarball.yml + with: + #use_tag: snapshot + use_environ: snapshots call-workflow-ctest: needs: call-workflow-tarball uses: ./.github/workflows/cmake-ctest.yml with: file_base: ${{ needs.call-workflow-tarball.outputs.file_base }} + #use_tag: snapshot + #use_environ: snapshots if: ${{ needs.call-workflow-tarball.outputs.has_changes == 'true' }} call-workflow-release: @@ -31,5 +36,7 @@ jobs: file_base: ${{ needs.call-workflow-tarball.outputs.file_base }} file_branch: ${{ needs.call-workflow-tarball.outputs.file_branch }} file_sha: ${{ needs.call-workflow-tarball.outputs.file_sha }} + use_tag: snapshot + use_environ: snapshots if: ${{ needs.call-workflow-tarball.outputs.has_changes == 'true' }} diff --git a/.github/workflows/release-files.yml b/.github/workflows/release-files.yml index 6bf9db8db07..94065dc25f6 100644 --- a/.github/workflows/release-files.yml +++ b/.github/workflows/release-files.yml @@ -1,9 +1,19 @@ -name: hdf5 dev release +name: hdf5 dev release-files # Controls when the action will run. Triggers the workflow on a schedule on: workflow_call: inputs: + use_tag: + description: 'Release version tag' + type: string + required: false + default: snapshot + use_environ: + description: 'Environment to locate files' + type: string + required: true + default: snapshots file_base: description: "The common base name of the source tarballs" required: true @@ -41,9 +51,10 @@ jobs: id: "tag_create" with: commit_sha: ${{ inputs.file_sha }} - tag: "snapshot" + tag: "${{ inputs.use_tag }}" force_push_tag: true message: "Latest snapshot" + if: ${{ inputs.use_environ == 'snapshots' }} # Print result using the action output. - run: | @@ -52,7 +63,7 @@ jobs: PreRelease-getfiles: runs-on: ubuntu-latest needs: create-tag - environment: snapshots + environment: ${{ inputs.use_environ }} permissions: contents: write steps: @@ -107,7 +118,7 @@ jobs: id: create_release uses: softprops/action-gh-release@v1 with: - tag_name: "snapshot" + tag_name: "${{ inputs.use_tag }}" prerelease: true files: | ${{ steps.get-file-base.outputs.FILE_BASE }}.doxygen.zip diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bf39ebf50a8..3f9260ebead 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,12 +4,12 @@ name: hdf5 dev release build on: workflow_dispatch: inputs: - tag: + use_tag: description: 'Release version tag' type: string required: false default: snapshot - environment: + use_environ: description: 'Environment to locate files' type: choice required: true @@ -38,16 +38,16 @@ jobs: needs: log-the-inputs uses: ./.github/workflows/tarball.yml with: - use_tag: ${{ inputs.tag }} - use_environ: ${{ inputs.environment }} + use_tag: ${{ inputs.use_tag }} + use_environ: ${{ inputs.use_environ }} call-workflow-ctest: needs: call-workflow-tarball uses: ./.github/workflows/cmake-ctest.yml with: file_base: ${{ needs.call-workflow-tarball.outputs.file_base }} - use_tag: ${{ inputs.tag }} - use_environ: ${{ inputs.environment }} + use_tag: ${{ inputs.use_tag }} + use_environ: ${{ inputs.use_environ }} call-workflow-release: needs: [call-workflow-tarball, call-workflow-ctest] @@ -58,6 +58,6 @@ jobs: file_base: ${{ needs.call-workflow-tarball.outputs.file_base }} file_branch: ${{ needs.call-workflow-tarball.outputs.file_branch }} file_sha: ${{ needs.call-workflow-tarball.outputs.file_sha }} - use_tag: ${{ inputs.tag }} - use_environ: ${{ inputs.environment }} + use_tag: ${{ inputs.use_tag }} + use_environ: ${{ inputs.use_environ }} diff --git a/.github/workflows/tarball.yml b/.github/workflows/tarball.yml index 499f0222e80..aecb4fb138c 100644 --- a/.github/workflows/tarball.yml +++ b/.github/workflows/tarball.yml @@ -3,6 +3,17 @@ name: hdf5 dev tarball # Controls when the action will run. Triggers the workflow on a schedule on: workflow_call: + inputs: +# use_tag: +# description: 'Release version tag' +# type: string +# required: false +# default: snapshot + use_environ: + description: 'Environment to locate files' + type: string + required: true + default: snapshots outputs: has_changes: description: "Whether there were changes the previous day" @@ -55,6 +66,7 @@ jobs: with: seconds: 86400 # One day in seconds branch: '${{ steps.get-branch-name.outputs.branch_ref }}' + if: ${{ inputs.use_environ == 'snapshots' }} - run: echo "You have ${{ steps.check-new-commits.outputs.new-commits-number }} new commit(s) in ${{ steps.get-branch-name.outputs.BRANCH_REF }} ✅!" if: ${{ steps.check-new-commits.outputs.has-new-commits == 'true' }} @@ -65,7 +77,7 @@ jobs: name: Create a source tarball runs-on: ubuntu-latest needs: check_commits - if: ${{ needs.check_commits.outputs.has_changes == 'true' }} + if: ${{ (inputs.use_environ == 'snapshots' && needs.check_commits.outputs.has_changes == 'true') || inputs.use_environ == 'release' }} outputs: file_base: ${{ steps.set-file-base.outputs.FILE_BASE }} steps: @@ -83,14 +95,28 @@ jobs: - name: Set file base name id: set-file-base run: | - FILE_NAME_BASE=$(echo "hdf5-${{ needs.check_commits.outputs.branch_ref }}-${{ needs.check_commits.outputs.branch_sha }}") + if [ ${{ inputs.use_environ }} == 'snapshots' && ${{ needs.check_commits.outputs.has_changes }} == 'true' ]; then + FILE_NAME_BASE=$(echo "hdf5-${{ needs.check_commits.outputs.branch_ref }}-${{ needs.check_commits.outputs.branch_sha }}") + else + FILE_NAME_BASE=$(echo "hdf5-")$(echo "bin/h5vers") + fi echo "FILE_BASE=$FILE_NAME_BASE" >> $GITHUB_OUTPUT + shell: bash + + - name: Create snapshot file base name + id: create-file-base + if: ${{ inputs.use_environ == 'snapshots' && needs.check_commits.outputs.has_changes == 'true' }} + run: | + cd "$GITHUB_WORKSPACE/hdfsrc" + bin/release -d $GITHUB_WORKSPACE --branch ${{ needs.check_commits.outputs.branch_ref }} --revision gzip zip + shell: bash - - name: Run release script - id: run-release-script + - name: Create release file base name + id: create-rel-base + if: ${{ inputs.use_environ == 'release' }} run: | cd "$GITHUB_WORKSPACE/hdfsrc" - bin/bbrelease -d $GITHUB_WORKSPACE --branch ${{ needs.check_commits.outputs.branch_ref }} --revision gzip zip + bin/release -d $GITHUB_WORKSPACE gzip zip cmake-tgz cmake-zip shell: bash - name: List files in the repository From 8b8f98d6b2e83e51517abe7060b995a32d21eee5 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 27 Jun 2023 17:30:10 -0500 Subject: [PATCH 06/13] revert release to bbrelease --- .github/workflows/tarball.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tarball.yml b/.github/workflows/tarball.yml index aecb4fb138c..eb18a2870c0 100644 --- a/.github/workflows/tarball.yml +++ b/.github/workflows/tarball.yml @@ -108,7 +108,7 @@ jobs: if: ${{ inputs.use_environ == 'snapshots' && needs.check_commits.outputs.has_changes == 'true' }} run: | cd "$GITHUB_WORKSPACE/hdfsrc" - bin/release -d $GITHUB_WORKSPACE --branch ${{ needs.check_commits.outputs.branch_ref }} --revision gzip zip + bin/bbrelease -d $GITHUB_WORKSPACE --branch ${{ needs.check_commits.outputs.branch_ref }} --revision gzip zip shell: bash - name: Create release file base name From 9bf49faec91be47e2bd6f0a6eb871ab4fca12322 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 28 Jun 2023 08:16:53 -0500 Subject: [PATCH 07/13] Correct var use --- .github/workflows/tarball.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/tarball.yml b/.github/workflows/tarball.yml index eb18a2870c0..e35eacd0d10 100644 --- a/.github/workflows/tarball.yml +++ b/.github/workflows/tarball.yml @@ -77,7 +77,7 @@ jobs: name: Create a source tarball runs-on: ubuntu-latest needs: check_commits - if: ${{ (inputs.use_environ == 'snapshots' && needs.check_commits.outputs.has_changes == 'true') || inputs.use_environ == 'release' }} + if: ('${{ inputs.use_environ }}' == 'snapshots' && ${{ needs.check_commits.outputs.has_changes }} == 'true') || '${{ inputs.use_environ }}' == 'release' outputs: file_base: ${{ steps.set-file-base.outputs.FILE_BASE }} steps: @@ -95,17 +95,17 @@ jobs: - name: Set file base name id: set-file-base run: | - if [ ${{ inputs.use_environ }} == 'snapshots' && ${{ needs.check_commits.outputs.has_changes }} == 'true' ]; then + if [ '${{ inputs.use_environ }}' == 'snapshots' && ${{ needs.check_commits.outputs.has_changes }} == 'true' ]; then FILE_NAME_BASE=$(echo "hdf5-${{ needs.check_commits.outputs.branch_ref }}-${{ needs.check_commits.outputs.branch_sha }}") else - FILE_NAME_BASE=$(echo "hdf5-")$(echo "bin/h5vers") + FILE_NAME_BASE=$(echo "hdf5-")$(echo bin/h5vers) fi echo "FILE_BASE=$FILE_NAME_BASE" >> $GITHUB_OUTPUT shell: bash - name: Create snapshot file base name id: create-file-base - if: ${{ inputs.use_environ == 'snapshots' && needs.check_commits.outputs.has_changes == 'true' }} + if: '${{ inputs.use_environ }}' == 'snapshots' && ${{ needs.check_commits.outputs.has_changes }} == 'true' run: | cd "$GITHUB_WORKSPACE/hdfsrc" bin/bbrelease -d $GITHUB_WORKSPACE --branch ${{ needs.check_commits.outputs.branch_ref }} --revision gzip zip @@ -113,7 +113,7 @@ jobs: - name: Create release file base name id: create-rel-base - if: ${{ inputs.use_environ == 'release' }} + if: '${{ inputs.use_environ }}' == 'release' run: | cd "$GITHUB_WORKSPACE/hdfsrc" bin/release -d $GITHUB_WORKSPACE gzip zip cmake-tgz cmake-zip From bee8b0d739d919e3d36cc8cfa8e56c6e1dd85a76 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 28 Jun 2023 08:31:13 -0500 Subject: [PATCH 08/13] Refactor current version use --- .github/workflows/tarball.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tarball.yml b/.github/workflows/tarball.yml index e35eacd0d10..9fa9a866fcc 100644 --- a/.github/workflows/tarball.yml +++ b/.github/workflows/tarball.yml @@ -92,13 +92,18 @@ jobs: sudo apt update sudo apt install automake autoconf libtool libtool-bin gzip dos2unix + - name: Retrieve version + id: version + run: | + echo "TAG_VERSION=$(bin/h5vers)" >> $GITHUB_OUTPUT + - name: Set file base name id: set-file-base run: | if [ '${{ inputs.use_environ }}' == 'snapshots' && ${{ needs.check_commits.outputs.has_changes }} == 'true' ]; then FILE_NAME_BASE=$(echo "hdf5-${{ needs.check_commits.outputs.branch_ref }}-${{ needs.check_commits.outputs.branch_sha }}") else - FILE_NAME_BASE=$(echo "hdf5-")$(echo bin/h5vers) + FILE_NAME_BASE=$(echo "hdf5-")$(echo "${{ steps.version.outputs.TAG_VERSION }}") fi echo "FILE_BASE=$FILE_NAME_BASE" >> $GITHUB_OUTPUT shell: bash From cdfbb7cb31589431bdc392a7a20346f9b715c15d Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 28 Jun 2023 08:48:29 -0500 Subject: [PATCH 09/13] Fix echo --- .github/workflows/tarball.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tarball.yml b/.github/workflows/tarball.yml index 9fa9a866fcc..fa4235b8fd0 100644 --- a/.github/workflows/tarball.yml +++ b/.github/workflows/tarball.yml @@ -103,7 +103,7 @@ jobs: if [ '${{ inputs.use_environ }}' == 'snapshots' && ${{ needs.check_commits.outputs.has_changes }} == 'true' ]; then FILE_NAME_BASE=$(echo "hdf5-${{ needs.check_commits.outputs.branch_ref }}-${{ needs.check_commits.outputs.branch_sha }}") else - FILE_NAME_BASE=$(echo "hdf5-")$(echo "${{ steps.version.outputs.TAG_VERSION }}") + FILE_NAME_BASE=$(echo "hdf5-${{ steps.version.outputs.TAG_VERSION }}") fi echo "FILE_BASE=$FILE_NAME_BASE" >> $GITHUB_OUTPUT shell: bash From a101d2d8615a08f29ddaf1891332e7a968a2f076 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 28 Jun 2023 08:55:09 -0500 Subject: [PATCH 10/13] Test if change --- .github/workflows/tarball.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tarball.yml b/.github/workflows/tarball.yml index fa4235b8fd0..52b8cc68781 100644 --- a/.github/workflows/tarball.yml +++ b/.github/workflows/tarball.yml @@ -110,7 +110,7 @@ jobs: - name: Create snapshot file base name id: create-file-base - if: '${{ inputs.use_environ }}' == 'snapshots' && ${{ needs.check_commits.outputs.has_changes }} == 'true' + if: ${{ inputs.use_environ }} == 'snapshots' && ${{ needs.check_commits.outputs.has_changes }} == 'true' run: | cd "$GITHUB_WORKSPACE/hdfsrc" bin/bbrelease -d $GITHUB_WORKSPACE --branch ${{ needs.check_commits.outputs.branch_ref }} --revision gzip zip @@ -118,7 +118,7 @@ jobs: - name: Create release file base name id: create-rel-base - if: '${{ inputs.use_environ }}' == 'release' + if: ${{ inputs.use_environ }} == 'release' run: | cd "$GITHUB_WORKSPACE/hdfsrc" bin/release -d $GITHUB_WORKSPACE gzip zip cmake-tgz cmake-zip From 664302b085540af2d0a03e89132c709ea708bea9 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 28 Jun 2023 09:05:54 -0500 Subject: [PATCH 11/13] fix if syntax --- .github/workflows/tarball.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tarball.yml b/.github/workflows/tarball.yml index 52b8cc68781..659592fbc20 100644 --- a/.github/workflows/tarball.yml +++ b/.github/workflows/tarball.yml @@ -95,12 +95,14 @@ jobs: - name: Retrieve version id: version run: | + cd "$GITHUB_WORKSPACE/hdfsrc" echo "TAG_VERSION=$(bin/h5vers)" >> $GITHUB_OUTPUT - name: Set file base name id: set-file-base run: | - if [ '${{ inputs.use_environ }}' == 'snapshots' && ${{ needs.check_commits.outputs.has_changes }} == 'true' ]; then + if [[ '${{ inputs.use_environ }}' == 'snapshots' && ${{ needs.check_commits.outputs.has_changes }} == 'true' ]] + then FILE_NAME_BASE=$(echo "hdf5-${{ needs.check_commits.outputs.branch_ref }}-${{ needs.check_commits.outputs.branch_sha }}") else FILE_NAME_BASE=$(echo "hdf5-${{ steps.version.outputs.TAG_VERSION }}") From 4aafdabdad3a22ec1b5ac6bdee74dbbd9d9d289e Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 29 Jun 2023 08:22:56 -0500 Subject: [PATCH 12/13] Add snapshots location --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0b444cbac13..c670f65343c 100644 --- a/README.md +++ b/README.md @@ -100,7 +100,7 @@ SNAPSHOTS, PREVIOUS RELEASES AND SOURCE CODE -------------------------------------------- Periodically development code snapshots are provided at the following URL: - https://gamma.hdfgroup.org/ftp/pub/outgoing/hdf5/snapshots/ + https://github.com/HDFGroup/hdf5/releases/tag/snapshot Source packages for current and previous releases are located at: From 860814fc135288f8755f29af106b9275d07de3c6 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 29 Jun 2023 10:23:39 -0500 Subject: [PATCH 13/13] correct tmpdir statement --- bin/bbrelease | 3 --- 1 file changed, 3 deletions(-) diff --git a/bin/bbrelease b/bin/bbrelease index c59e2e5fcf4..48253e0a54b 100755 --- a/bin/bbrelease +++ b/bin/bbrelease @@ -35,9 +35,6 @@ Usage: $0 -d [-h] [--private] [--revision [--branch BRANCHNAME]] -h print the help page. --private Make a private release with today's date in version information. --revision Make a private release with the code revision number in version information. - This allows --branch to be used for the file name. - --branch BRANCHNAME This is to get the correct version of the branch name from the - repository. BRANCHNAME for v1.8 should be hdf5_1_8. This must be run at the top level of the source directory. The other command-line options are the names of the programs to use