Skip to content

Commit

Permalink
Merge changes from master (#173)
Browse files Browse the repository at this point in the history
* Merge changes from master
* Use last release for version 3.99
  • Loading branch information
byrnHDF authored Apr 5, 2024
1 parent 407135b commit a9e058a
Show file tree
Hide file tree
Showing 44 changed files with 1,701 additions and 517 deletions.
312 changes: 292 additions & 20 deletions .github/workflows/ant.yml

Large diffs are not rendered by default.

25 changes: 6 additions & 19 deletions .github/workflows/daily-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,6 @@ on:
type: string
required: false
default: check
use_environ:
description: 'Environment to locate files'
type: string
required: true
default: snapshots
# push:
# branches: [ "master" ]
pull_request:
branches: [ "master" ]

Expand All @@ -30,17 +23,11 @@ jobs:
hdf4-name: ${{ steps.gethdf4base.outputs.HDF4_NAME_BASE }}
hdf5-name: ${{ steps.gethdf5base.outputs.HDF5_NAME_BASE }}
run-ignore: ${{ steps.getinputs.outputs.INPUTS_IGNORE }}
run-environ: ${{ steps.getinputs.outputs.INPUTS_ENVIRON }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4.1.1

- name: Get hdf4 release base name
# uses: robinraju/[email protected]
# with:
# repository: "HDFGroup/hdf4"
# tag: "snapshot"
# fileName: "last-file.txt"
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: 'HDFGroup/hdf4'
Expand Down Expand Up @@ -81,7 +68,8 @@ jobs:
uses: ./.github/workflows/tarball.yml
with:
use_ignore: ${{ needs.get-base-names.outputs.run-ignore }}
use_environ: ${{ needs.get-base-names.outputs.run-environ }}
use_tag: snapshot
use_environ: snapshots

call-workflow-ant:
needs: [get-base-names, call-workflow-tarball]
Expand All @@ -90,7 +78,7 @@ jobs:
file_base: ${{ needs.call-workflow-tarball.outputs.file_base }}
use_hdf: ${{ needs.get-base-names.outputs.hdf4-name }}
use_hdf5: ${{ needs.get-base-names.outputs.hdf5-name }}
if: ${{ ((needs.get-base-names.outputs.run-environ == 'snapshots') && ((needs.call-workflow-tarball.outputs.has_changes == 'true') || (needs.get-base-names.outputs.run-ignore == 'ignore'))) }}
use_environ: snapshots

call-workflow-release:
needs: [get-base-names, call-workflow-tarball, call-workflow-ant]
Expand All @@ -101,7 +89,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: snapshot-3
use_environ: ${{ needs.get-base-names.outputs.run-environ }}
if: ${{ ((needs.get-base-names.outputs.run-environ == 'snapshots') && ((needs.call-workflow-tarball.outputs.has_changes == 'true') || (needs.get-base-names.outputs.run-ignore == 'ignore'))) }}
use_environ: snapshots
if: ${{ ((needs.call-workflow-tarball.outputs.has_changes == 'true') || (needs.get-base-names.outputs.run-ignore == 'ignore')) }}

58 changes: 41 additions & 17 deletions .github/workflows/release-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ on:
inputs:
use_tag:
description: 'Release version tag'
required: false
type: string
default: snapshot
required: false
default: HDFView-3.3.99
use_environ:
description: 'Environment to locate files'
required: true
type: string
required: true
default: snapshots
file_base:
description: "The common base name of the source tarballs"
required: true
Expand All @@ -39,14 +40,16 @@ jobs:
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Get Sources
uses: actions/checkout@v3
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0

- run: |
- name: Get Commit
if: ${{ (inputs.use_environ == 'snapshots') }}
run: |
git checkout ${{ inputs.file_sha }}
- uses: rickstaa/action-create-tag@v1
- uses: rickstaa/action-create-tag@a1c7777fcb2fee4f19b0f283ba888afa11678b72 # v1.7.2
id: "tag_create"
with:
commit_sha: ${{ inputs.file_sha }}
Expand Down Expand Up @@ -74,20 +77,20 @@ jobs:
# Get files created by tarball script
- name: Get tgz-tarball (Linux)
uses: actions/download-artifact@v3
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
with:
name: tgz-tarball
path: ${{ github.workspace }}

- name: Get zip-tarball (Windows)
uses: actions/download-artifact@v3
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
with:
name: zip-tarball
path: ${{ github.workspace }}

# Get files created by cmake-ctest script
- name: Get published binary (Windows)
uses: actions/download-artifact@v3
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
with:
name: zip-win-vs2022-binary
path: ${{ github.workspace }}
Expand All @@ -99,43 +102,64 @@ jobs:
# path: ${{ github.workspace }}

- name: Get published binary (Linux)
uses: actions/download-artifact@v3
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
with:
name: tgz-ubuntu-2204-binary
path: ${{ github.workspace }}

- name: List files for the space
run: |
ls -l ${{ github.workspace }}
ls ${{ runner.workspace }}/hdfview
- name: Create sha256 sums for files
run: |
sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}.tar.gz > sha256sums.txt
sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}.zip >> sha256sums.txt
sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}-Linux-x86_64.tar.gz >> sha256sums.txt
sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}-win64.zip >> sha256sums.txt
- name: Store snapshot name
run: |
echo "${{ steps.get-file-base.outputs.FILE_BASE }}" > ./last-file.txt
# - name: Get NEWSLETTER
# uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1
# with:
# name: NEWSLETTER
# path: ${{ github.workspace }}
#
# - name: Create description file
# run: |
# cat ${{ github.workspace }}/NEWSLETTER.txt > description.txt

- name: PreRelease tag
id: create_prerelease
if: ${{ (inputs.use_environ == 'snapshots') }}
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v1
with:
tag_name: "${{ inputs.use_tag }}"
prerelease: true
files: |
last-file.txt
${{ steps.get-file-base.outputs.FILE_BASE }}.tar.gz
${{ steps.get-file-base.outputs.FILE_BASE }}.zip
${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204.tar.gz
${{ steps.get-file-base.outputs.FILE_BASE }}-win_vs2022.zip
${{ steps.get-file-base.outputs.FILE_BASE }}-Linux-x86_64.tar.gz
${{ steps.get-file-base.outputs.FILE_BASE }}-win64.zip
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@v1
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v1
with:
tag_name: "${{ inputs.use_tag }}"
prerelease: false
#body_path: ${{ github.workspace }}-CHANGELOG.txt
files: |
${{ steps.get-file-base.outputs.FILE_BASE }}.tar.gz
${{ steps.get-file-base.outputs.FILE_BASE }}.zip
${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204.tar.gz
${{ steps.get-file-base.outputs.FILE_BASE }}-win_vs2022.zip
${{ steps.get-file-base.outputs.FILE_BASE }}-Linux-x86_64.tar.gz
${{ steps.get-file-base.outputs.FILE_BASE }}-win64.zip
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`
- name: List files for the space (Linux)
Expand Down
61 changes: 13 additions & 48 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:
description: 'HDF5 Release version tag'
type: string
required: false
default: snapshot
default: snapshot-1.14

permissions:
contents: read
Expand All @@ -43,67 +43,32 @@ jobs:
echo "RELEASE4_TAG=$TAG4" >> $GITHUB_OUTPUT
echo "RELEASE5_TAG=$TAG5" >> $GITHUB_OUTPUT
create-files-ant:
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@v3
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@v3
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@v3
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`
uses: ./.github/workflows/tarball.yml
with:
use_tag: ${{ needs.log-the-inputs.outputs.rel_tag }}
use_environ: release

call-workflow-ant:
needs: [log-the-inputs, create-files-ant]
needs: [log-the-inputs, call-workflow-tarball]
uses: ./.github/workflows/ant.yml
with:
use_hdf: ${{ needs.log-the-inputs.outputs.rel4_tag }}
use_hdf5: ${{ needs.log-the-inputs.outputs.rel5_tag }}
file_base: ${{ needs.create-files-ant.outputs.file_base }}
snap_name: hdfview-${{ needs.call-workflow-tarball.outputs.source_base }}
use_environ: release

call-workflow-release:
needs: [log-the-inputs, create-files-ant, call-workflow-ant]
needs: [log-the-inputs, call-workflow-tarball, call-workflow-ant]
permissions:
contents: write # In order to allow tag creation
uses: ./.github/workflows/release-files.yml
with:
file_base: ${{ needs.create-files-ant.outputs.file_base }}
file_branch: ${{ needs.log-the-inputs.outputs.rel_tag }}
file_sha: ${{ needs.log-the-inputs.outputs.rel_tag }}
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: ${{ needs.log-the-inputs.outputs.rel_tag }}
use_environ: release

Loading

0 comments on commit a9e058a

Please sign in to comment.