Skip to content

Commit

Permalink
Merge and update workflows from release (#280)
Browse files Browse the repository at this point in the history
  • Loading branch information
byrnHDF authored Jun 3, 2024
1 parent 9fefe43 commit e71dada
Show file tree
Hide file tree
Showing 5 changed files with 131 additions and 86 deletions.
102 changes: 65 additions & 37 deletions .github/workflows/ant-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,14 @@ on:
workflow_call:
inputs:
use_hdf:
description: "The hdf4 base name of the binaries"
description: "The hdf4 tag and base name of the binaries"
required: true
type: string
use_hdf5:
description: "The hdf5 tag name of the binaries"
required: true
type: string
name_hdf5:
description: "The hdf5 base name of the binaries"
required: true
type: string
Expand Down Expand Up @@ -56,20 +60,20 @@ jobs:
uses: ilammy/msvc-dev-cmd@v1.13.0

- name: Get hdf4 release
if: ${{ (inputs.use_environ == 'release') }}
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: 'HDFGroup/hdf4'
version: 'hdf4.3.0'
version: 'tags/${{ inputs.use_hdf }}'
file: '${{ inputs.use_hdf }}-win-vs2022_cl.zip'
if: ${{ (inputs.use_environ == 'release') }}

- name: Get hdf4 snapshot
if: ${{ (inputs.use_environ == 'snapshots') }}
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: 'HDFGroup/hdf4'
version: 'tags/snapshot'
file: '${{ inputs.use_hdf }}-win-vs2022_cl.zip'
if: ${{ (inputs.use_environ == 'snapshots') }}

- name: Uncompress gh binary (Win)
run: 7z x ${{ github.workspace }}/${{ inputs.use_hdf }}-win-vs2022_cl.zip
Expand Down Expand Up @@ -102,23 +106,23 @@ jobs:
shell: bash

- name: Get hdf5 release
if: ${{ (inputs.use_environ == 'release') }}
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: 'HDFGroup/hdf5'
version: 'hdf5-1.14.4'
file: '${{ inputs.use_hdf5 }}-win-vs2022_cl.zip'
if: ${{ (inputs.use_environ == 'release') }}
version: 'tags/${{ inputs.use_hdf5 }}'
file: '${{ inputs.name_hdf5 }}-win-vs2022_cl.zip'

- name: Get hdf5 snapshot
if: ${{ (inputs.use_environ == 'snapshots') }}
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: 'HDFGroup/hdf5'
version: 'tags/snapshot-1.14'
file: '${{ inputs.use_hdf5 }}-win-vs2022_cl.zip'
if: ${{ (inputs.use_environ == 'snapshots') }}
file: '${{ inputs.name_hdf5 }}-win-vs2022_cl.zip'

- name: Uncompress gh binary (Win)
run: 7z x ${{ github.workspace }}/${{ inputs.use_hdf5 }}-win-vs2022_cl.zip
run: 7z x ${{ github.workspace }}/${{ inputs.name_hdf5 }}-win-vs2022_cl.zip

- name: Uncompress hdf5 binary (Win)
working-directory: ${{ github.workspace }}/hdf5
Expand Down Expand Up @@ -204,6 +208,14 @@ jobs:
mv ${{ inputs.snap_name }}-win64.zip ${{ steps.set-file-base.outputs.FILE_BASE }}App-win64.zip
shell: bash

- name: Rename release binary-app base name
id: ren-release-basename
if: ${{ (inputs.use_environ == 'release') }}
run: |
cd build/dist
mv ${{ inputs.snap_name }}-win64.zip ${{ inputs.snap_name }}App-win64.zip
shell: bash

- name: List files for the space (Windows)
run: |
Get-ChildItem -Path ${{ github.workspace }}/build/dist
Expand Down Expand Up @@ -249,20 +261,20 @@ jobs:
distribution: 'temurin'

- name: Get hdf4 release
if: ${{ (inputs.use_environ == 'release') }}
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: 'HDFGroup/hdf4'
version: 'hdf4.3.0'
version: 'tags/${{ inputs.use_hdf }}'
file: '${{ inputs.use_hdf }}-ubuntu-2204_gcc.tar.gz'
if: ${{ (inputs.use_environ == 'release') }}

- name: Get hdf4 snapshot
if: ${{ (inputs.use_environ == 'snapshots') }}
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: 'HDFGroup/hdf4'
version: 'tags/snapshot'
file: '${{ inputs.use_hdf }}-ubuntu-2204_gcc.tar.gz'
if: ${{ (inputs.use_environ == 'snapshots') }}

- name: List files for the space (Linux)
run: |
Expand All @@ -285,28 +297,28 @@ jobs:
echo "HDFLIB_ENV=$HDFDIR$FILE_NAME_HDF" >> $GITHUB_OUTPUT
- name: Get hdf5 release
if: ${{ (inputs.use_environ == 'release') }}
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: 'HDFGroup/hdf5'
version: 'hdf5-1.14.4'
file: '${{ inputs.use_hdf5 }}-ubuntu-2204_gcc.tar.gz'
if: ${{ (inputs.use_environ == 'release') }}
version: 'tags/${{ inputs.use_hdf5 }}'
file: '${{ inputs.name_hdf5 }}-ubuntu-2204_gcc.tar.gz'

- name: Get hdf5 release
if: ${{ (inputs.use_environ == 'snapshots') }}
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: 'HDFGroup/hdf5'
version: 'tags/snapshot-1.14'
file: '${{ inputs.use_hdf5 }}-ubuntu-2204_gcc.tar.gz'
if: ${{ (inputs.use_environ == 'snapshots') }}
file: '${{ inputs.name_hdf5 }}-ubuntu-2204_gcc.tar.gz'

- name: List files for the space (Linux)
run: |
ls -l ${{ github.workspace }}
ls ${{ runner.workspace }}
- name: Uncompress gh binary (Linux)
run: tar -zxvf ${{ github.workspace }}/${{ inputs.use_hdf5 }}-ubuntu-2204_gcc.tar.gz
run: tar -zxvf ${{ github.workspace }}/${{ inputs.name_hdf5 }}-ubuntu-2204_gcc.tar.gz

- name: Uncompress hdf5 binary (Linux)
run: |
Expand Down Expand Up @@ -367,6 +379,14 @@ jobs:
mv ${{ inputs.snap_name }}-Linux-x86_64.tar.gz ${{ steps.set-file-base.outputs.FILE_BASE }}App-Linux-x86_64.tar.gz
shell: bash

- name: Rename release binary-app base name
id: ren-release-basename
if: ${{ (inputs.use_environ == 'release') }}
run: |
cd build/dist
mv ${{ inputs.snap_name }}-Linux-x86_64.tar.gz ${{ inputs.snap_name }}App-Linux-x86_64.tar.gz
shell: bash

- name: List files in the space (Linux)
run: |
ls ${{ github.workspace }}/build/dist
Expand Down Expand Up @@ -432,39 +452,39 @@ jobs:

- name: Get hdf4 release
continue-on-error: true
if: ${{ (inputs.use_environ == 'release') }}
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: 'HDFGroup/hdf4'
version: 'hdf4.3.0'
version: 'tags/${{ inputs.use_hdf }}'
file: '${{ inputs.use_hdf }}-osx.tar.gz'
if: ${{ (inputs.use_environ == 'release') }}

- name: Get hdf4 release osx12
continue-on-error: true
if: ${{ (inputs.use_environ == 'release') }}
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: 'HDFGroup/hdf4'
version: 'hdf4.3.0'
version: 'tags/${{ inputs.use_hdf }}'
file: '${{ inputs.use_hdf }}-osx12.tar.gz'
if: ${{ (inputs.use_environ == 'release') }}

- name: Get hdf4 snapshot
- name: Get hdf4 release
continue-on-error: true
if: ${{ (inputs.use_environ == 'snapshots') }}
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: 'HDFGroup/hdf4'
version: 'tags/snapshot'
file: '${{ inputs.use_hdf }}-osx.tar.gz'
if: ${{ (inputs.use_environ == 'snapshots') }}

- name: Get hdf4 snapshot osx12
continue-on-error: true
if: ${{ (inputs.use_environ == 'snapshots') }}
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: 'HDFGroup/hdf4'
version: 'tags/snapshot'
file: '${{ inputs.use_hdf }}-osx12.tar.gz'
if: ${{ (inputs.use_environ == 'snapshots') }}

- name: List files for the space (mac)
run: |
Expand All @@ -488,47 +508,47 @@ jobs:
- name: Get hdf5 release
continue-on-error: true
if: ${{ (inputs.use_environ == 'release') }}
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: 'HDFGroup/hdf5'
version: 'hdf5-1.14.4'
file: '${{ inputs.use_hdf5 }}-osx.tar.gz'
if: ${{ (inputs.use_environ == 'release') }}
version: 'tags/${{ inputs.use_hdf5 }}'
file: '${{ inputs.name_hdf5 }}-osx.tar.gz'

- name: Get hdf5 release osx12
continue-on-error: true
if: ${{ (inputs.use_environ == 'release') }}
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: 'HDFGroup/hdf5'
version: 'hdf5-1.14.4'
file: '${{ inputs.use_hdf5 }}-osx12.tar.gz'
if: ${{ (inputs.use_environ == 'release') }}
version: 'tags/${{ inputs.use_hdf5 }}'
file: '${{ inputs.name_hdf5 }}-osx12.tar.gz'

- name: Get hdf5 snapshot
continue-on-error: true
if: ${{ (inputs.use_environ == 'snapshots') }}
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: 'HDFGroup/hdf5'
version: 'tags/snapshot-1.14'
file: '${{ inputs.use_hdf5 }}-osx.tar.gz'
if: ${{ (inputs.use_environ == 'snapshots') }}
file: '${{ inputs.name_hdf5 }}-osx.tar.gz'

- name: Get hdf5 snapshot osx12
continue-on-error: true
if: ${{ (inputs.use_environ == 'snapshots') }}
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: 'HDFGroup/hdf5'
version: 'tags/snapshot-1.14'
file: '${{ inputs.use_hdf5 }}-osx12.tar.gz'
if: ${{ (inputs.use_environ == 'snapshots') }}
file: '${{ inputs.name_hdf5 }}-osx12.tar.gz'

- name: List files for the space (mac)
run: |
ls -l ${{ github.workspace }}
ls ${{ runner.workspace }}
- name: Uncompress gh binary (mac)
run: tar -zxvf ${{ github.workspace }}/${{ inputs.use_hdf5 }}-osx*.tar.gz
run: tar -zxvf ${{ github.workspace }}/${{ inputs.name_hdf5 }}-osx*.tar.gz

- name: Uncompress hdf5 binary (mac)
run: |
Expand Down Expand Up @@ -594,6 +614,14 @@ jobs:
mv ${{ inputs.snap_name }}-Darwin.tar.gz ${{ steps.set-file-base.outputs.FILE_BASE }}App-Darwin.tar.gz
shell: bash

- name: Rename release binary-app base name
id: ren-release-basename
if: ${{ (inputs.use_environ == 'release') }}
run: |
cd build/dist
mv ${{ inputs.snap_name }}-Darwin.tar.gz ${{ inputs.snap_name }}App-Darwin.tar.gz
shell: bash

- name: List files in the space (mac)
run: |
ls ${{ github.workspace }}/build/dist
Expand Down
Loading

0 comments on commit e71dada

Please sign in to comment.