Skip to content

Commit

Permalink
ci(fix): windows installer and prep for s3 upload (#5919)
Browse files Browse the repository at this point in the history
Description
GitHub Action workflow improvements for Windows installer. Add checksum
for exe file and include in the s3 upload for tari website.

Motivation and Context
Improve the single-click Windows installer by adding checksum and using
the same Tari Suite file name and include for s3 upload.

How Has This Been Tested?
Builds and lists correctly in local fork.

What process can a PR reviewer use to test or verify this change?
Check that the windows installer is copied into upload folder

<!-- Checklist -->
<!-- 1. Is the title of your PR in the form that would make nice release
notes? The title, excluding the conventional commit
tag, will be included exactly as is in the CHANGELOG, so please think
about it carefully. -->


Breaking Changes
---

- [x] None
- [ ] Requires data directory on base node to be deleted
- [ ] Requires hard fork
- [ ] Other - Please specify

<!-- Does this include a breaking change? If so, include this line as a
footer -->
<!-- BREAKING CHANGE: Description what the user should do, e.g. delete a
database, resync the chain -->
  • Loading branch information
leet4tari authored Nov 7, 2023
1 parent 04e0246 commit dea065d
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
26 changes: 24 additions & 2 deletions .github/workflows/base_node_binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@ jobs:
echo "PLATFORM_SPECIFIC_DIR=osx" >> $GITHUB_ENV
echo "LIB_EXT=.dylib" >> $GITHUB_ENV
- name: Set environment variables - Ubuntu
if: startsWith(runner.os,'Linux')
run: |
Expand Down Expand Up @@ -352,7 +351,14 @@ jobs:
run: |
cd buildtools
call generate_config.bat
"%programfiles(x86)%\Inno Setup 6\iscc.exe" "/DMyAppVersion=${{ env.VERSION }}-${{ env.VSHA_SHORT }}-release" "/DTariSuitePath=${{ github.workspace }}${{ env.TBN_DIST }}" "windows_inno_installer.iss"
"%programfiles(x86)%\Inno Setup 6\iscc.exe" "/DMyAppVersion=${{ env.VERSION }}-${{ env.VSHA_SHORT }}-${{ matrix.builds.name }}-installer" "/DTariSuitePath=${{ github.workspace }}${{ env.TBN_DIST }}" "windows_inno_installer.iss"
cd Output
echo "Compute archive shasum"
${{ env.SHARUN }} "tari_suite-${{ env.VERSION }}-${{ env.VSHA_SHORT }}-${{ matrix.builds.name }}-installer.exe" >> "tari_suite-${{ env.VERSION }}-${{ env.VSHA_SHORT }}-${{ matrix.builds.name }}-installer.exe.sha256"
echo "Show the shasum"
cat "tari_suite-${{ env.VERSION }}-${{ env.VSHA_SHORT }}-${{ matrix.builds.name }}-installer.exe.sha256"
echo "Checkum verification archive is "
${{ env.SHARUN }} --check "tari_suite-${{ env.VERSION }}-${{ env.VSHA_SHORT }}-${{ matrix.builds.name }}-installer.exe.sha256"
- name: Artifact upload for Windows installer
uses: actions/upload-artifact@v3
Expand All @@ -369,12 +375,14 @@ jobs:
cd "$GITHUB_WORKSPACE${{ env.TBN_DIST }}"
echo "Compute files shasum"
${SHARUN} * >> "${{ env.BINFILE }}.sha256"
echo "Show the shasum"
cat "${{ env.BINFILE }}.sha256"
echo "Checksum verification for files is "
${SHARUN} --check "${{ env.BINFILE }}.sha256"
7z a "${{ env.BINFILE }}.zip" *
echo "Compute archive shasum"
${SHARUN} "${{ env.BINFILE }}.zip" >> "${{ env.BINFILE }}.zip.sha256"
echo "Show the shasum"
cat "${{ env.BINFILE }}.zip.sha256"
echo "Checkum verification archive is "
${SHARUN} --check "${{ env.BINFILE }}.zip.sha256"
Expand All @@ -394,6 +402,7 @@ jobs:
echo "Compute miner shasum"
${SHARUN} "minotari_miner-${{ matrix.builds.name }}${{ env.TBN_EXT}}" \
>> "minotari_miner-${{ matrix.builds.name }}${{ env.TBN_EXT}}.sha256"
echo "Show the shasum"
cat "minotari_miner-${{ matrix.builds.name }}${{ env.TBN_EXT}}.sha256"
echo "Checksum verification for miner is "
${SHARUN} --check "minotari_miner-${{ matrix.builds.name }}${{ env.TBN_EXT}}.sha256"
Expand Down Expand Up @@ -439,6 +448,18 @@ jobs:
shell: bash
run: |
rm -vRf "${{ github.workspace }}${{ env.TBN_DIST }}/diag-utils/"
- name: Artifact Windows Installer for S3
continue-on-error: true
shell: bash
run: |
if [ -d "${{ github.workspace }}/buildtools/Output/" ]; then
echo "Coping Windows installer ..."
cp -v "${{ github.workspace }}/buildtools/Output/"* \
"${{ github.workspace }}${{ env.TBN_DIST }}"
else
echo "No buildtools/Output."
fi
- name: Sync dist to S3 - Bash
continue-on-error: true # Don't break if s3 upload fails
Expand All @@ -451,6 +472,7 @@ jobs:
else
ls -al ${{ env.SOURCE }}
fi
aws s3 ${{ env.S3CMD }} --region ${{ secrets.AWS_REGION }} \
"${{ env.SOURCE }}" \
s3://${{ secrets.AWS_S3_BUCKET }}/${{ env.DEST_DIR }} \
Expand Down
2 changes: 1 addition & 1 deletion buildtools/windows_inno_installer.iss
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ DefaultDirName={userdocs}\..\.tari-testnet
DefaultGroupName={#MyOrgName} - Testnet
AllowNoIcons=yes
LicenseFile=..\LICENSE
OutputBaseFilename=minotari_suite-Windows-{#MyAppVersion}
OutputBaseFilename=tari_suite-{#MyAppVersion}
SetupIconFile=.\tari_logo_black.ico
Compression=lzma
SolidCompression=yes
Expand Down

0 comments on commit dea065d

Please sign in to comment.