Skip to content

Commit

Permalink
Correct signing names and variables (#4713)
Browse files Browse the repository at this point in the history
  • Loading branch information
byrnHDF authored Aug 14, 2024
1 parent 70c6a7a commit 819e00d
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 28 deletions.
55 changes: 28 additions & 27 deletions .github/workflows/cmake-ctest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,32 @@ permissions:
contents: read

jobs:
check-secret:
name: Check Secrets exists
runs-on: ubuntu-latest
outputs:
sign-state: ${{ steps.set-signing-state.outputs.BINSIGN }}
steps:
- name: Identify Signing Status
id: set-signing-state
env:
signing_secret: ${{ secrets.AZURE_ENDPOINT }}
run: |
if [[ '${{ env.signing_secret }}' == '' ]]
then
SIGN_VAL=$(echo "false")
else
SIGN_VAL=$(echo "true")
fi
echo "BINSIGN=$SIGN_VAL" >> $GITHUB_OUTPUT
shell: bash

build_and_test_win:
# Windows w/ MSVC + CMake
#
name: "Windows MSVC CTest"
runs-on: windows-latest
needs: [check-secret]
steps:
- name: Install Dependencies (Windows)
run: choco install ninja
Expand All @@ -57,18 +78,6 @@ jobs:
- name: Enable Developer Command Prompt
uses: ilammy/[email protected]

- name: Check Secrets exists
id: set-signing-state
run: |
if [ '${{ secrets.AZURE_ENDPOINT }}' != '' ];
then
SIGN_VAL=$(echo "true");
else
SIGN_VAL=$(echo "false");
fi
echo "BINSIGN=$SIGN_VAL" >> $GITHUB_OUTPUT
shell: bash

- name: Set file base name (Windows)
id: set-file-base
run: |
Expand Down Expand Up @@ -125,7 +134,7 @@ jobs:
file-digest: SHA256
timestamp-rfc3161: http://timestamp.acs.microsoft.com
timestamp-digest: SHA256
if: ${{ steps.set-signing-state.BINSIGN == 'true' }}
if: ${{ needs.check-secret.outputs.sign-state == 'true' }}

- name: Publish binary (Windows)
id: publish-ctest-binary
Expand Down Expand Up @@ -179,6 +188,7 @@ jobs:
#
name: "Ubuntu gcc CMake"
runs-on: ubuntu-latest
needs: [check-secret]
steps:
- name: Install CMake Dependencies (Linux)
run: |
Expand Down Expand Up @@ -303,6 +313,7 @@ jobs:
#
name: "MacOS Clang CMake"
runs-on: macos-latest
needs: [check-secret]
steps:
- name: Install Dependencies (MacOS_latest)
run: brew install ninja
Expand Down Expand Up @@ -485,22 +496,11 @@ jobs:
#
name: "Windows Intel CTest"
runs-on: windows-latest
needs: [check-secret]
steps:
- name: Install Dependencies (Windows_intel)
run: choco install ninja

- name: Check Secrets exists
id: set-signing-state
run: |
if [ '${{ secrets.AZURE_ENDPOINT }}' != '' ];
then
SIGN_VAL=$(echo "true");
else
SIGN_VAL=$(echo "false");
fi
echo "BINSIGN=$SIGN_VAL" >> $GITHUB_OUTPUT
shell: bash

- name: add oneAPI to env
uses: fortran-lang/setup-fortran@v1
id: setup-fortran
Expand Down Expand Up @@ -563,12 +563,12 @@ jobs:
endpoint: ${{ secrets.AZURE_ENDPOINT }}
trusted-signing-account-name: ${{ secrets.AZURE_CODE_SIGNING_NAME }}
certificate-profile-name: ${{ secrets.AZURE_CERT_PROFILE_NAME }}
files-folder: ${{ runner.workspace }}/hdf5/build/${{ inputs.preset_name }}-MSVC
files-folder: ${{ runner.workspace }}/hdf5/build/${{ inputs.preset_name }}-Intel
files-folder-filter: msi
file-digest: SHA256
timestamp-rfc3161: http://timestamp.acs.microsoft.com
timestamp-digest: SHA256
if: ${{ steps.set-signing-state.BINSIGN == 'true' }}
if: ${{ needs.check-secret.outputs.sign-state == 'true' }}

- name: Publish binary (Windows_intel)
id: publish-ctest-binary
Expand Down Expand Up @@ -622,6 +622,7 @@ jobs:
#
name: "Ubuntu Intel CMake"
runs-on: ubuntu-latest
needs: [check-secret]
steps:
- name: Install CMake Dependencies (Linux_intel)
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/daily-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,5 @@ jobs:
file_base: ${{ needs.get-old-names.outputs.hdf5-name }}
use_tag: snapshot
use_environ: snapshots
if: ${{ needs.call-workflow-tarball.outputs.has_changes == 'true' }}
if: ${{ (needs.call-workflow-tarball.outputs.has_changes == 'true') && (needs.get-old-names.outputs.hdf5-name != needs.call-workflow-tarball.outputs.file_base) }}

0 comments on commit 819e00d

Please sign in to comment.