Skip to content

Commit

Permalink
Sync actions and build with master (#233)
Browse files Browse the repository at this point in the history
* Update to latest master changes
* Add release notes and update actions
  • Loading branch information
byrnHDF authored May 30, 2024
1 parent a9e058a commit bd82c83
Show file tree
Hide file tree
Showing 24 changed files with 1,832 additions and 551 deletions.
626 changes: 626 additions & 0 deletions .github/workflows/ant-app.yml

Large diffs are not rendered by default.

110 changes: 91 additions & 19 deletions .github/workflows/ant.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ on:
type: string
required: true
default: snapshots
secrets:
APPLE_CERTS_BASE64:
required: true
APPLE_CERTS_BASE64_PASSWD:
required: true
KEYCHAIN_PASSWD:
required: true

permissions:
contents: read
Expand All @@ -37,12 +44,12 @@ jobs:
name: "Windows MSVC CTest"
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up JDK 19
uses: actions/setup-java@v3
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '19'
java-version: '21'
distribution: 'temurin'

- name: Enable Developer Command Prompt
Expand Down Expand Up @@ -233,12 +240,12 @@ jobs:
name: "Ubuntu gcc CMake"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up JDK 19
uses: actions/setup-java@v3
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '19'
java-version: '21'
distribution: 'temurin'

- name: Get hdf4 release
Expand Down Expand Up @@ -389,21 +396,51 @@ jobs:
run: ant -noinput -buildfile build.xml junit

build_and_test_mac:
# mac (osx12) w/ clang + ant
# mac (osx) w/ clang + ant
#
name: "mac clang CMake"
runs-on: macos-13
if: false
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up JDK 19
uses: actions/setup-java@v3
- name: Install the Apple certificate and provisioning profile
shell: bash
env:
BUILD_CERTIFICATE_BASE64: ${{ secrets.APPLE_CERTS_BASE64 }}
P12_PASSWORD: ${{ secrets.APPLE_CERTS_BASE64_PASSWD }}
KEYCHAIN_PASSWD: ${{ secrets.KEYCHAIN_PASSWD }}
run: |
# create variables
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
KEYCHAIN_FILE=${{ vars.KEYCHAIN_NAME }}.keychain
# import certificate from secrets
echo $BUILD_CERTIFICATE_BASE64 | base64 --decode > $CERTIFICATE_PATH
security -v create-keychain -p $KEYCHAIN_PASSWD $KEYCHAIN_FILE
security -v list-keychain -d user -s $KEYCHAIN_FILE
security -v list-keychains
security -v set-keychain-settings -lut 21600 $KEYCHAIN_FILE
security -v unlock-keychain -p $KEYCHAIN_PASSWD $KEYCHAIN_FILE
# import certificate to keychain
security -v import $CERTIFICATE_PATH -P $P12_PASSWORD -A -t cert -f pkcs12 -k $KEYCHAIN_FILE
security -v set-key-partition-list -S apple-tool:,codesign:,apple: -k $KEYCHAIN_PASSWD $KEYCHAIN_FILE
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '19'
java-version: '21'
distribution: 'temurin'

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

- name: Get hdf4 release osx12
continue-on-error: true
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: 'HDFGroup/hdf4'
Expand All @@ -412,6 +449,16 @@ jobs:
if: ${{ (inputs.use_environ == 'release') }}

- name: Get hdf4 snapshot
continue-on-error: true
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
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: 'HDFGroup/hdf4'
Expand All @@ -425,7 +472,7 @@ jobs:
ls ${{ runner.workspace }}
- name: Uncompress gh binary (mac)
run: tar -zxvf ${{ github.workspace }}/${{ inputs.use_hdf }}-osx12.tar.gz
run: tar -zxvf ${{ github.workspace }}/${{ inputs.use_hdf }}-osx*.tar.gz

- name: Uncompress hdf4 binary (mac)
run: |
Expand All @@ -440,6 +487,16 @@ jobs:
echo "HDFLIB_ENV=$HDFDIR$FILE_NAME_HDF" >> $GITHUB_OUTPUT
- name: Get hdf5 release
continue-on-error: true
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') }}

- name: Get hdf5 release osx12
continue-on-error: true
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: 'HDFGroup/hdf5'
Expand All @@ -448,6 +505,16 @@ jobs:
if: ${{ (inputs.use_environ == 'release') }}

- name: Get hdf5 snapshot
continue-on-error: true
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') }}

- name: Get hdf5 snapshot osx12
continue-on-error: true
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: 'HDFGroup/hdf5'
Expand All @@ -461,7 +528,7 @@ jobs:
ls ${{ runner.workspace }}
- name: Uncompress gh binary (mac)
run: tar -zxvf ${{ github.workspace }}/${{ inputs.use_hdf5 }}-osx12.tar.gz
run: tar -zxvf ${{ github.workspace }}/${{ inputs.use_hdf5 }}-osx*.tar.gz

- name: Uncompress hdf5 binary (mac)
run: |
Expand Down Expand Up @@ -512,7 +579,12 @@ jobs:
env:
HDFLIBS: ${{ steps.set-hdflib-name.outputs.HDFLIB_ENV }}
HDF5LIBS: ${{ steps.set-hdf5lib-name.outputs.HDF5LIB_ENV }}
run: ant -Dsign_state=NOSIGN -noinput -buildfile build.xml binaryPackage
KEYCHAIN_PASSWD: ${{ secrets.KEYCHAIN_PASSWD }}
KEYCHAIN_NAME: ${{ vars.KEYCHAIN_NAME }}
SIGNER: ${{ vars.SIGNER }}
NOTARY_USER: ${{ vars.NOTARY_USER }}
NOTARY_KEY: ${{ vars.NOTARY_KEY }}
run: ant -noinput -buildfile build.xml binaryPackage

- name: Rename snapshot binary base name
id: ren-basename
Expand All @@ -531,7 +603,7 @@ jobs:
- name: Save published snapshot binary (mac)
uses: actions/upload-artifact@v4
with:
name: tgz-osx12-binary
name: tgz-osx-binary
path: ${{ github.workspace }}/build/dist/${{ steps.set-file-base.outputs.FILE_BASE }}-Darwin.tar.gz
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`
if: ${{ (inputs.use_environ == 'snapshots') }}
Expand All @@ -540,7 +612,7 @@ jobs:
- name: Save published release binary (mac)
uses: actions/upload-artifact@v4
with:
name: tgz-osx12-binary
name: tgz-osx-binary
path: ${{ github.workspace }}/build/dist/${{ inputs.snap_name }}-Darwin.tar.gz
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`
if: ${{ (inputs.use_environ == 'release') }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/clang-format-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'skip-ci')"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Run clang-format style check for Java code
uses: DoozyX/[email protected]
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/clang-format-fix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
permissions:
contents: write # In order to allow EndBug/add-and-commit to commit changes
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Fix Java formatting issues detected by clang-format
uses: DoozyX/[email protected]
with:
Expand Down
45 changes: 43 additions & 2 deletions .github/workflows/daily-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,24 @@ jobs:
outputs:
hdf4-name: ${{ steps.gethdf4base.outputs.HDF4_NAME_BASE }}
hdf5-name: ${{ steps.gethdf5base.outputs.HDF5_NAME_BASE }}
hdfview-name: ${{ steps.gethdfviewbase.outputs.HDFVIEW_NAME_BASE }}
run-ignore: ${{ steps.getinputs.outputs.INPUTS_IGNORE }}

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

- name: Get hdfview release base name
uses: dsaltares/fetch-gh-release-asset@master
with:
version: 'tags/HDFView-3.99.99'
file: 'last-file.txt'

- name: Read base-name file
id: gethdfviewbase
run: echo "HDFVIEW_NAME_BASE=$(cat last-file.txt)" >> $GITHUB_OUTPUT

- run: echo "hdfview base name is ${{ steps.gethdfviewbase.outputs.HDFVIEW_NAME_BASE }}."

- name: Get hdf4 release base name
uses: dsaltares/fetch-gh-release-asset@master
with:
Expand Down Expand Up @@ -79,9 +92,26 @@ jobs:
use_hdf: ${{ needs.get-base-names.outputs.hdf4-name }}
use_hdf5: ${{ needs.get-base-names.outputs.hdf5-name }}
use_environ: snapshots
secrets:
APPLE_CERTS_BASE64: ${{ secrets.APPLE_CERTS_BASE64 }}
APPLE_CERTS_BASE64_PASSWD: ${{ secrets.APPLE_CERTS_BASE64_PASSWD }}
KEYCHAIN_PASSWD: ${{ secrets.KEYCHAIN_PASSWD }}

call-workflow-ant-app:
needs: [get-base-names, call-workflow-tarball]
uses: ./.github/workflows/ant-app.yml
with:
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 }}
use_environ: snapshots
secrets:
APPLE_CERTS_BASE64: ${{ secrets.APPLE_CERTS_BASE64 }}
APPLE_CERTS_BASE64_PASSWD: ${{ secrets.APPLE_CERTS_BASE64_PASSWD }}
KEYCHAIN_PASSWD: ${{ secrets.KEYCHAIN_PASSWD }}

call-workflow-release:
needs: [get-base-names, call-workflow-tarball, call-workflow-ant]
needs: [get-base-names, call-workflow-tarball, call-workflow-ant, call-workflow-ant-app]
permissions:
contents: write # In order to allow tag creation
uses: ./.github/workflows/release-files.yml
Expand All @@ -92,3 +122,14 @@ jobs:
use_environ: snapshots
if: ${{ ((needs.call-workflow-tarball.outputs.has_changes == 'true') || (needs.get-base-names.outputs.run-ignore == 'ignore')) }}

call-workflow-remove:
needs: [get-base-names, call-workflow-tarball, call-workflow-ant, call-workflow-ant-app, call-workflow-release]
permissions:
contents: write # In order to allow file deletion
uses: ./.github/workflows/remove-files.yml
with:
file_base: ${{ needs.get-base-names.outputs.hdfview-name }}
use_tag: HDFView-3.99.99
use_environ: snapshots
if: ${{ ((needs.call-workflow-tarball.outputs.has_changes == 'true') || (needs.get-base-names.outputs.run-ignore == 'ignore')) }}

Loading

0 comments on commit bd82c83

Please sign in to comment.