From 8991dc29419a63f204273311b1d8f3ce91ceb1e4 Mon Sep 17 00:00:00 2001 From: "C.Lee Taylor" <47312074+leet4tari@users.noreply.github.com> Date: Tue, 7 May 2024 13:42:36 +0200 Subject: [PATCH] ci(fix): cosmetic - update binaries build workflow to be more, tbn to ts (#6324) Description cosmetic changes - update binaries build workflow to be more generic - tbn to ts Motivation and Context Easier to port to other tari-project repos How Has This Been Tested? Builds in local repo What process can a PR reviewer use to test or verify this change? --- Breaking Changes --- - [x] None - [ ] Requires data directory on base node to be deleted - [ ] Requires hard fork - [ ] Other - Please specify --- ...node_binaries.json => build_binaries.json} | 0 ...e_node_binaries.yml => build_binaries.yml} | 179 +++++++++--------- 2 files changed, 90 insertions(+), 89 deletions(-) rename .github/workflows/{base_node_binaries.json => build_binaries.json} (100%) rename .github/workflows/{base_node_binaries.yml => build_binaries.yml} (78%) diff --git a/.github/workflows/base_node_binaries.json b/.github/workflows/build_binaries.json similarity index 100% rename from .github/workflows/base_node_binaries.json rename to .github/workflows/build_binaries.json diff --git a/.github/workflows/base_node_binaries.yml b/.github/workflows/build_binaries.yml similarity index 78% rename from .github/workflows/base_node_binaries.yml rename to .github/workflows/build_binaries.yml index ec154ba5a5..f982c8ed6e 100644 --- a/.github/workflows/base_node_binaries.yml +++ b/.github/workflows/build_binaries.yml @@ -4,10 +4,10 @@ name: Build Matrix of Binaries 'on': push: tags: - - 'v[0-9]+.[0-9]+.[0-9]*' + - "v[0-9]+.[0-9]+.[0-9]*" branches: - - 'build-all-*' - - 'build-bins-*' + - "build-all-*" + - "build-bins-*" schedule: - cron: "05 00 * * *" workflow_dispatch: @@ -18,16 +18,16 @@ name: Build Matrix of Binaries default: "development-tag" env: - TBN_FILENAME: "tari_suite" - TBN_BUNDLE_ID_BASE: "com.tarilabs" - TBN_SIG_FN: "sha256-unsigned.txt" + TS_FILENAME: "tari_suite" + TS_BUNDLE_ID_BASE: "com.tarilabs" + TS_SIG_FN: "sha256-unsigned.txt" ## Must be a JSon string - TBN_FILES: '["minotari_node","minotari_console_wallet","minotari_miner","minotari_merge_mining_proxy"]' - TBN_FEATURES: "default, safe" - TBN_LIBRARIES: "minotari_mining_helper_ffi" + TS_FILES: '["minotari_node","minotari_console_wallet","minotari_miner","minotari_merge_mining_proxy"]' + TS_FEATURES: "default, safe" + TS_LIBRARIES: "minotari_mining_helper_ffi" TARI_NETWORK_DIR: testnet toolchain: nightly-2024-02-04 - matrix-json-file: ".github/workflows/base_node_binaries.json" + matrix-json-file: ".github/workflows/build_binaries.json" CARGO_HTTP_MULTIPLEXING: false CARGO_UNSTABLE_SPARSE_REGISTRY: true CARGO: cargo @@ -56,7 +56,7 @@ jobs: run: | # # build all targets images - # matrix=$( jq -s -c .[] .github/workflows/base_node_binaries.json ) + # matrix=$( jq -s -c .[] .github/workflows/build_binaries.json ) # # build only single target image # matrix_selection=$( jq -c '.[] | select( ."name" == "windows-x64" )' ${{ env.matrix-json-file }} ) @@ -98,6 +98,7 @@ jobs: strategy: fail-fast: false matrix: ${{ fromJson(needs.matrix-prep.outputs.matrix) }} + runs-on: ${{ matrix.builds.runs-on }} steps: @@ -136,13 +137,13 @@ jobs: echo "TARI_VERSION=${TARI_VERSION}" >> $GITHUB_ENV echo "TARI_VERSION=${TARI_VERSION}" >> $GITHUB_OUTPUT if [[ "${{ matrix.builds.features }}" == "" ]]; then - echo "BUILD_FEATURES=${{ env.TBN_FEATURES }}" >> $GITHUB_ENV + echo "BUILD_FEATURES=${{ env.TS_FEATURES }}" >> $GITHUB_ENV else echo "BUILD_FEATURES=${{ matrix.builds.features }}" >> $GITHUB_ENV fi TARGET_BINS="" if [[ "${{ matrix.builds.target_bins }}" == "" ]]; then - ARRAY_BINS=( $(echo ${TBN_FILES} | jq --raw-output '.[]' | awk '{ print $1 }') ) + ARRAY_BINS=( $(echo ${TS_FILES} | jq --raw-output '.[]' | awk '{ print $1 }') ) else ARRAY_BINS=( $(echo "${{ matrix.builds.target_bins }}" | tr ', ' '\n') ) fi @@ -153,7 +154,7 @@ jobs: echo "TARGET_BINS=${TARGET_BINS}" >> $GITHUB_ENV TARGET_LIBS="" if [[ "${{ matrix.builds.target_libs }}" == "" ]]; then - ARRAY_LIBS=( $(echo ${TBN_LIBRARIES} | tr ', ' '\n') ) + ARRAY_LIBS=( $(echo ${TS_LIBRARIES} | tr ', ' '\n') ) else ARRAY_LIBS=( $(echo "${{ matrix.builds.target_libs }}" | tr ', ' '\n') ) fi @@ -199,7 +200,7 @@ jobs: - name: Install macOS dependencies if: startsWith(runner.os,'macOS') run: | - brew install openssl cmake coreutils automake autoconf protobuf + brew install openssl cmake zip coreutils automake autoconf protobuf rustup target add ${{ matrix.builds.target }} - name: Install Windows dependencies @@ -221,10 +222,10 @@ jobs: run: | echo "SHARUN=shasum --algorithm 256" >> $GITHUB_ENV echo "CC=gcc" >> $GITHUB_ENV - echo "TBN_EXT=" >> $GITHUB_ENV + echo "TS_EXT=" >> $GITHUB_ENV echo "SHELL_EXT=.sh" >> $GITHUB_ENV echo "PLATFORM_SPECIFIC_DIR=linux" >> $GITHUB_ENV - echo "TBN_DIST=/dist" >> $GITHUB_ENV + echo "TS_DIST=/dist" >> $GITHUB_ENV - name: Set environment variables - macOS if: startsWith(runner.os,'macOS') @@ -258,10 +259,10 @@ jobs: curl -v -o "$GITHUB_WORKSPACE\psutils\getopt.ps1" "https://raw.githubusercontent.com/lukesampson/psutils/master/getopt.ps1" curl -v -o "$GITHUB_WORKSPACE\psutils\shasum.ps1" "https://raw.githubusercontent.com/lukesampson/psutils/master/shasum.ps1" echo "SHARUN=pwsh $GITHUB_WORKSPACE\psutils\shasum.ps1 --algorithm 256" >> $GITHUB_ENV - echo "TBN_EXT=.exe" >> $GITHUB_ENV + echo "TS_EXT=.exe" >> $GITHUB_ENV echo "LIB_EXT=.dll" >> $GITHUB_ENV echo "SHELL_EXT=.bat" >> $GITHUB_ENV - echo "TBN_DIST=\dist" >> $GITHUB_ENV + echo "TS_DIST=\dist" >> $GITHUB_ENV echo "PLATFORM_SPECIFIC_DIR=windows" >> $GITHUB_ENV echo "SQLITE3_LIB_DIR=C:\vcpkg\installed\x64-windows\lib" >> $GITHUB_ENV echo "OPENSSL_DIR=C:\Program Files\OpenSSL-Win64" >> $GITHUB_ENV @@ -318,27 +319,27 @@ jobs: shell: bash run: | # set -xo pipefail - mkdir -p "$GITHUB_WORKSPACE${TBN_DIST}" - cd "$GITHUB_WORKSPACE${TBN_DIST}" - BINFILE="${TBN_FILENAME}-${TARI_VERSION}-${VSHA_SHORT}-${{ matrix.builds.name }}${TBN_EXT}" + mkdir -p "$GITHUB_WORKSPACE${TS_DIST}" + cd "$GITHUB_WORKSPACE${TS_DIST}" + BINFILE="${TS_FILENAME}-${TARI_VERSION}-${VSHA_SHORT}-${{ matrix.builds.name }}${TS_EXT}" echo "BINFILE=${BINFILE}" >> $GITHUB_ENV echo "Copying files for ${BINFILE} to $(pwd)" echo "MTS_SOURCE=$(pwd)" >> $GITHUB_ENV ls -alht "$GITHUB_WORKSPACE/target/${{ matrix.builds.target }}/release/" - ARRAY_FILES=( $(echo ${TBN_FILES} | jq --raw-output '.[]' | awk '{ print $1 }') ) + ARRAY_FILES=( $(echo ${TS_FILES} | jq --raw-output '.[]' | awk '{ print $1 }') ) for FILE in "${ARRAY_FILES[@]}"; do - echo "checking for file - ${FILE}${TBN_EXT}" - if [ -f "${GITHUB_WORKSPACE}/target/${{ matrix.builds.target }}/release/${FILE}${TBN_EXT}" ]; then - cp -vf "${GITHUB_WORKSPACE}/target/${{ matrix.builds.target }}/release/${FILE}${TBN_EXT}" . + echo "checking for file - ${FILE}${TS_EXT}" + if [ -f "${GITHUB_WORKSPACE}/target/${{ matrix.builds.target }}/release/${FILE}${TS_EXT}" ]; then + cp -vf "${GITHUB_WORKSPACE}/target/${{ matrix.builds.target }}/release/${FILE}${TS_EXT}" . fi done if [[ "${{ matrix.builds.target_libs }}" == "" ]]; then - ARRAY_LIBS=( $(echo ${TBN_LIBRARIES} | tr ', ' '\n') ) + ARRAY_LIBS=( $(echo ${TS_LIBRARIES} | tr ', ' '\n') ) else ARRAY_LIBS=( $(echo "${{ matrix.builds.target_libs }}" | tr ', ' '\n') ) fi for FILE in "${ARRAY_LIBS[@]}"; do - echo "checking for file - ${FILE}${TBN_EXT}" + echo "checking for file - ${FILE}${TS_EXT}" # Check on Nix for libs if [ -f "${GITHUB_WORKSPACE}/target/${{ matrix.builds.target }}/release/lib${FILE}${LIB_EXT}" ]; then cp -vf "${GITHUB_WORKSPACE}/target/${{ matrix.builds.target }}/release/lib${FILE}${LIB_EXT}" . @@ -362,8 +363,8 @@ jobs: --features "${{ env.BUILD_FEATURES }}, metrics" \ --bin minotari_node \ ${{ matrix.builds.flags }} --locked - cp -vf "$GITHUB_WORKSPACE/target/${{ matrix.builds.target }}/release/minotari_node${TBN_EXT}" \ - "${{ env.MTS_SOURCE }}/minotari_node-metrics${TBN_EXT}" + cp -vf "$GITHUB_WORKSPACE/target/${{ matrix.builds.target }}/release/minotari_node${TS_EXT}" \ + "${{ env.MTS_SOURCE }}/minotari_node-metrics${TS_EXT}" - name: Build targeted miners # if: ${{ ( startsWith(github.ref, 'refs/tags/v') ) && ( matrix.builds.miner_cpu_targets != '' ) }} @@ -390,7 +391,7 @@ jobs: continue-on-error: true uses: actions/upload-artifact@v4 with: - name: ${{ env.TBN_FILENAME }}_unsigned-archive-${{ matrix.builds.name }} + name: ${{ env.TS_FILENAME }}_unsigned-archive-${{ matrix.builds.name }} path: "${{ env.MTS_SOURCE }}/*" - name: Build the macOS pkg @@ -426,7 +427,7 @@ jobs: export tarball_parent="${{ runner.temp }}/osxpkg" export tarball_source="${{ env.TARI_NETWORK_DIR }}" ./create_osx_install_zip.sh unused nozip - ARRAY_FILES=( $(echo ${TBN_FILES} | jq --raw-output '.[]' | awk '{ print $1 }') ) + ARRAY_FILES=( $(echo ${TS_FILES} | jq --raw-output '.[]' | awk '{ print $1 }') ) find "${GITHUB_WORKSPACE}/${target_release}" \ -name "randomx-*" -type f -perm -+x \ -exec cp -vf {} "${{ runner.temp }}/osxpkg/${{ env.TARI_NETWORK_DIR }}/runtime/" \; @@ -439,7 +440,7 @@ jobs: ARRAY_FILES+=(${FILES_DIAG_UTILS[@]}) for FILE in "${ARRAY_FILES[@]}"; do codesign --options runtime --force --verify --verbose --timestamp ${OSX_CODESIGN_EXTRAS} \ - --prefix "${{ env.TBN_BUNDLE_ID_BASE }}.${{ env.TBN_FILENAME }}." \ + --prefix "${{ env.TS_BUNDLE_ID_BASE }}.${{ env.TS_FILENAME }}." \ --sign "Developer ID Application: $MACOS_APPLICATION_ID" \ "${{ runner.temp }}/osxpkg/${{ env.TARI_NETWORK_DIR }}/runtime/$FILE" codesign --verify --deep --display --verbose=4 \ @@ -447,23 +448,23 @@ jobs: cp -vf "${{ runner.temp }}/osxpkg/${{ env.TARI_NETWORK_DIR }}/runtime/$FILE" \ "${{ env.MTS_SOURCE }}" done - distDirPKG=$(mktemp -d -t ${{ env.TBN_FILENAME }}) + distDirPKG=$(mktemp -d -t ${{ env.TS_FILENAME }}) echo "${distDirPKG}" echo "distDirPKG=${distDirPKG}" >> $GITHUB_ENV - TBN_Temp=${{ env.TBN_FILENAME }} - TBN_BUNDLE_ID_VALID_NAME=$(echo "${TBN_Temp//_/-}") + TS_Temp=${{ env.TS_FILENAME }} + TS_BUNDLE_ID_VALID_NAME=$(echo "${TS_Temp//_/-}") # Strip apple-darwin - TBN_ARCH=$(echo "${${{ matrix.builds.target }}//-apple-darwin/}") + TS_ARCH=$(echo "${${{ matrix.builds.target }}//-apple-darwin/}") pkgbuild --root "${{ runner.temp }}/osxpkg/${{ env.TARI_NETWORK_DIR }}" \ - --identifier "${{ env.TBN_BUNDLE_ID_BASE }}.pkg.${TBN_BUNDLE_ID_VALID_NAME}" \ + --identifier "${{ env.TS_BUNDLE_ID_BASE }}.pkg.${TS_BUNDLE_ID_VALID_NAME}" \ --version "${TARI_VERSION}" \ --install-location "/tmp/tari" \ --scripts "${{ runner.temp }}/osxpkg/${{ env.TARI_NETWORK_DIR }}/scripts" \ --sign "Developer ID Installer: ${MACOS_INSTALLER_ID}" \ - "${distDirPKG}/${{ env.TBN_FILENAME }}-${{ matrix.builds.name }}-${{ env.TARI_VERSION }}.pkg" + "${distDirPKG}/${{ env.TS_FILENAME }}-${{ matrix.builds.name }}-${{ env.TARI_VERSION }}.pkg" echo -e "Submitting to Apple...\n\n" xcrun notarytool submit \ - "${distDirPKG}/${{ env.TBN_FILENAME }}-${{ matrix.builds.name }}-${{ env.TARI_VERSION }}.pkg" \ + "${distDirPKG}/${{ env.TS_FILENAME }}-${{ matrix.builds.name }}-${{ env.TARI_VERSION }}.pkg" \ --apple-id "${MACOS_NOTARIZE_USERNAME}" \ --password ${MACOS_NOTARIZE_PASSWORD} \ --team-id ${MACOS_ASC_PROVIDER} \ @@ -472,50 +473,50 @@ jobs: requestUUID=$(tail -n5 notarisation.result | grep "id:" | cut -d" " -f 4) requestSTATUS=$(tail -n5 notarisation.result | grep "\ \ status:" | cut -d" " -f 4) if [[ ${requestUUID} == "" ]] || [[ ${requestSTATUS} != "Accepted" ]]; then - echo "## status: ${requestSTATUS} - could not notarize - ${requestUUID} - ${{ env.TBN_FILENAME }}-${{ matrix.builds.name }}-${{ env.TARI_VERSION }}.pkg" + echo "## status: ${requestSTATUS} - could not notarize - ${requestUUID} - ${{ env.TS_FILENAME }}-${{ matrix.builds.name }}-${{ env.TARI_VERSION }}.pkg" exit 1 else echo "Notarization RequestUUID: ${requestUUID}" echo -e "\nStapling package...\ - ${{ env.TBN_FILENAME }}-${{ matrix.builds.name }}-${{ env.TARI_VERSION }}.pkg\n" + ${{ env.TS_FILENAME }}-${{ matrix.builds.name }}-${{ env.TARI_VERSION }}.pkg\n" xcrun stapler staple -v \ - "${distDirPKG}/${{ env.TBN_FILENAME }}-${{ matrix.builds.name }}-${{ env.TARI_VERSION }}.pkg" + "${distDirPKG}/${{ env.TS_FILENAME }}-${{ matrix.builds.name }}-${{ env.TARI_VERSION }}.pkg" fi cd ${distDirPKG} echo "Compute pkg shasum" - ${SHARUN} "${{ env.TBN_FILENAME }}-${{ matrix.builds.name }}-${{ env.TARI_VERSION }}.pkg" \ - >> "${{ env.TBN_FILENAME }}-${{ matrix.builds.name }}-${{ env.TARI_VERSION }}.pkg.sha256" - cat "${{ env.TBN_FILENAME }}-${{ matrix.builds.name }}-${{ env.TARI_VERSION }}.pkg.sha256" + ${SHARUN} "${{ env.TS_FILENAME }}-${{ matrix.builds.name }}-${{ env.TARI_VERSION }}.pkg" \ + >> "${{ env.TS_FILENAME }}-${{ matrix.builds.name }}-${{ env.TARI_VERSION }}.pkg.sha256" + cat "${{ env.TS_FILENAME }}-${{ matrix.builds.name }}-${{ env.TARI_VERSION }}.pkg.sha256" echo "Checksum verification for pkg is " - ${SHARUN} --check "${{ env.TBN_FILENAME }}-${{ matrix.builds.name }}-${{ env.TARI_VERSION }}.pkg.sha256" + ${SHARUN} --check "${{ env.TS_FILENAME }}-${{ matrix.builds.name }}-${{ env.TARI_VERSION }}.pkg.sha256" - name: Artifact upload for macOS pkg if: startsWith(runner.os,'macOS') continue-on-error: true uses: actions/upload-artifact@v4 with: - name: ${{ env.TBN_FILENAME }}-${{ matrix.builds.name }}-${{ env.TARI_VERSION }}.pkg - path: "${{ env.distDirPKG }}/${{ env.TBN_FILENAME }}-${{ matrix.builds.name }}-${{ env.TARI_VERSION }}*.pkg*" + name: ${{ env.TS_FILENAME }}-${{ matrix.builds.name }}-${{ env.TARI_VERSION }}.pkg + path: "${{ env.distDirPKG }}/${{ env.TS_FILENAME }}-${{ matrix.builds.name }}-${{ env.TARI_VERSION }}*.pkg*" - name: Build the Windows installer - shell: cmd if: startsWith(runner.os,'Windows') + shell: cmd run: | cd buildtools - "%programfiles(x86)%\Inno Setup 6\iscc.exe" "/DMyAppVersion=${{ env.TARI_VERSION }}-${{ env.VSHA_SHORT }}-${{ matrix.builds.name }}-installer" "/DMinotariSuite=${{ env.TBN_FILENAME }}" "/DTariSuitePath=${{ github.workspace }}${{ env.TBN_DIST }}" "windows_inno_installer.iss" + "%programfiles(x86)%\Inno Setup 6\iscc.exe" "/DMyAppVersion=${{ env.TARI_VERSION }}-${{ env.VSHA_SHORT }}-${{ matrix.builds.name }}-installer" "/DMinotariSuite=${{ env.TS_FILENAME }}" "/DTariSuitePath=${{ github.workspace }}${{ env.TS_DIST }}" "windows_inno_installer.iss" cd Output echo "Compute archive shasum" - ${{ env.SHARUN }} "${{ env.TBN_FILENAME }}-${{ env.TARI_VERSION }}-${{ env.VSHA_SHORT }}-${{ matrix.builds.name }}-installer.exe" >> "${{ env.TBN_FILENAME }}-${{ env.TARI_VERSION }}-${{ env.VSHA_SHORT }}-${{ matrix.builds.name }}-installer.exe.sha256" + ${{ env.SHARUN }} "${{ env.TS_FILENAME }}-${{ env.TARI_VERSION }}-${{ env.VSHA_SHORT }}-${{ matrix.builds.name }}-installer.exe" >> "${{ env.TS_FILENAME }}-${{ env.TARI_VERSION }}-${{ env.VSHA_SHORT }}-${{ matrix.builds.name }}-installer.exe.sha256" echo "Show the shasum" - cat "${{ env.TBN_FILENAME }}-${{ env.TARI_VERSION }}-${{ env.VSHA_SHORT }}-${{ matrix.builds.name }}-installer.exe.sha256" + cat "${{ env.TS_FILENAME }}-${{ env.TARI_VERSION }}-${{ env.VSHA_SHORT }}-${{ matrix.builds.name }}-installer.exe.sha256" echo "Checksum verification archive is " - ${{ env.SHARUN }} --check "${{ env.TBN_FILENAME }}-${{ env.TARI_VERSION }}-${{ env.VSHA_SHORT }}-${{ matrix.builds.name }}-installer.exe.sha256" + ${{ env.SHARUN }} --check "${{ env.TS_FILENAME }}-${{ env.TARI_VERSION }}-${{ env.VSHA_SHORT }}-${{ matrix.builds.name }}-installer.exe.sha256" - name: Artifact upload for Windows installer - uses: actions/upload-artifact@v4 if: startsWith(runner.os,'Windows') + uses: actions/upload-artifact@v4 with: - name: "${{ env.TBN_FILENAME }}_windows_installer" + name: "${{ env.TS_FILENAME }}_windows_installer" path: "${{ github.workspace }}/buildtools/Output/*" - name: Archive and Checksum Binaries @@ -540,8 +541,8 @@ jobs: - name: Artifact upload for Archive uses: actions/upload-artifact@v4 with: - name: ${{ env.TBN_FILENAME }}_archive-${{ matrix.builds.name }} - path: "${{ github.workspace }}${{ env.TBN_DIST }}/${{ env.BINFILE }}.zip*" + name: ${{ env.TS_FILENAME }}_archive-${{ matrix.builds.name }} + path: "${{ github.workspace }}${{ env.TS_DIST }}/${{ env.BINFILE }}.zip*" - name: Prep diag-utils archive for upload continue-on-error: true @@ -551,27 +552,27 @@ jobs: cd "${{ env.MTS_SOURCE }}-diag-utils" # Find RandomX built tools for testing find "$GITHUB_WORKSPACE/target/${{ matrix.builds.target }}/release/" \ - -name "randomx-*${{ env.TBN_EXT}}" -type f -perm -+x -exec cp -vf {} . \; + -name "randomx-*${{ env.TS_EXT}}" -type f -perm -+x -exec cp -vf {} . \; echo "Compute diag utils shasum" ${SHARUN} * \ - >> "${{ env.TBN_FILENAME }}_archive-diag-utils-${{ matrix.builds.name }}.sha256" - cat "${{ env.TBN_FILENAME }}_archive-diag-utils-${{ matrix.builds.name }}.sha256" + >> "${{ env.TS_FILENAME }}_archive-diag-utils-${{ matrix.builds.name }}.sha256" + cat "${{ env.TS_FILENAME }}_archive-diag-utils-${{ matrix.builds.name }}.sha256" echo "Checksum verification for diag utils is " - ${SHARUN} --check "${{ env.TBN_FILENAME }}_archive-diag-utils-${{ matrix.builds.name }}.sha256" - 7z a "${{ env.TBN_FILENAME }}_archive-diag-utils-${{ matrix.builds.name }}.zip" * + ${SHARUN} --check "${{ env.TS_FILENAME }}_archive-diag-utils-${{ matrix.builds.name }}.sha256" + 7z a "${{ env.TS_FILENAME }}_archive-diag-utils-${{ matrix.builds.name }}.zip" * echo "Compute diag utils archive shasum" - ${SHARUN} "${{ env.TBN_FILENAME }}_archive-diag-utils-${{ matrix.builds.name }}.zip" \ - >> "${{ env.TBN_FILENAME }}_archive-diag-utils-${{ matrix.builds.name }}.zip.sha256" - cat "${{ env.TBN_FILENAME }}_archive-diag-utils-${{ matrix.builds.name }}.zip.sha256" + ${SHARUN} "${{ env.TS_FILENAME }}_archive-diag-utils-${{ matrix.builds.name }}.zip" \ + >> "${{ env.TS_FILENAME }}_archive-diag-utils-${{ matrix.builds.name }}.zip.sha256" + cat "${{ env.TS_FILENAME }}_archive-diag-utils-${{ matrix.builds.name }}.zip.sha256" echo "Checksum verification for diag utils archive is " - ${SHARUN} --check "${{ env.TBN_FILENAME }}_archive-diag-utils-${{ matrix.builds.name }}.zip.sha256" + ${SHARUN} --check "${{ env.TS_FILENAME }}_archive-diag-utils-${{ matrix.builds.name }}.zip.sha256" - name: Artifact upload for diag-utils continue-on-error: true uses: actions/upload-artifact@v4 with: - name: ${{ env.TBN_FILENAME }}_archive-diag-utils-${{ matrix.builds.name }} - path: "${{ github.workspace }}${{ env.TBN_DIST }}-diag-utils/*.zip*" + name: ${{ env.TS_FILENAME }}_archive-diag-utils-${{ matrix.builds.name }} + path: "${{ github.workspace }}${{ env.TS_DIST }}-diag-utils/*.zip*" create-release: if: ${{ startsWith(github.ref, 'refs/tags/v') }} @@ -590,32 +591,32 @@ jobs: - name: Download binaries uses: actions/download-artifact@v4 with: - path: ${{ env.TBN_FILENAME }} - pattern: "${{ env.TBN_FILENAME }}*" + path: ${{ env.TS_FILENAME }} + pattern: "${{ env.TS_FILENAME }}*" merge-multiple: true - name: Verify checksums and Prep Uploads shell: bash - working-directory: ${{ env.TBN_FILENAME }} + working-directory: ${{ env.TS_FILENAME }} run: | # set -xo pipefail sudo apt-get update sudo apt-get --no-install-recommends --assume-yes install dos2unix ls -alhtR - if [ -f "${{ env.TBN_FILENAME }}-${{ env.TARI_VERSION }}.${{ env.TBN_SIG_FN }}" ] ; then - rm -fv "${{ env.TBN_FILENAME }}-${{ env.TARI_VERSION }}.${{ env.TBN_SIG_FN }}" + if [ -f "${{ env.TS_FILENAME }}-${{ env.TARI_VERSION }}.${{ env.TS_SIG_FN }}" ] ; then + rm -fv "${{ env.TS_FILENAME }}-${{ env.TARI_VERSION }}.${{ env.TS_SIG_FN }}" fi # Merge all sha256 files into one - find . -name "*.sha256" -type f -print | xargs cat >> "${{ env.TBN_FILENAME }}-${{ env.TARI_VERSION }}.${{ env.TBN_SIG_FN }}" - dos2unix --quiet "${{ env.TBN_FILENAME }}-${{ env.TARI_VERSION }}.${{ env.TBN_SIG_FN }}" - cat "${{ env.TBN_FILENAME }}-${{ env.TARI_VERSION }}.${{ env.TBN_SIG_FN }}" - sha256sum --ignore-missing --check "${{ env.TBN_FILENAME }}-${{ env.TARI_VERSION }}.${{ env.TBN_SIG_FN }}" + find . -name "*.sha256" -type f -print | xargs cat >> "${{ env.TS_FILENAME }}-${{ env.TARI_VERSION }}.${{ env.TS_SIG_FN }}" + dos2unix --quiet "${{ env.TS_FILENAME }}-${{ env.TARI_VERSION }}.${{ env.TS_SIG_FN }}" + cat "${{ env.TS_FILENAME }}-${{ env.TARI_VERSION }}.${{ env.TS_SIG_FN }}" + sha256sum --ignore-missing --check "${{ env.TS_FILENAME }}-${{ env.TARI_VERSION }}.${{ env.TS_SIG_FN }}" ls -alhtR - name: Create release uses: ncipollo/release-action@v1 with: - artifacts: "${{ env.TBN_FILENAME }}*/**/*" + artifacts: "${{ env.TS_FILENAME }}*/**/*" token: ${{ secrets.GITHUB_TOKEN }} prerelease: true draft: true @@ -632,28 +633,28 @@ jobs: S3CMD: "cp" S3OPTIONS: '--recursive --exclude "*" --include "*.sha256*" --include "*.zip*" --include "*.pkg*" --include "*installer.exe*"' shell: bash - working-directory: ${{ env.TBN_FILENAME }} + working-directory: ${{ env.TS_FILENAME }} run: | echo "Upload processing ..." ls -alhtR echo "Clean up" # Bash check if file with wildcards, does not work as expected - # if [ -f ${{ env.TBN_FILENAME }}*diag-utils* ] ; then - if ls ${{ env.TBN_FILENAME }}*diag-utils* > /dev/null 2>&1 ; then - rm -fv ${{ env.TBN_FILENAME }}*diag-utils* + # if [ -f ${{ env.TS_FILENAME }}*diag-utils* ] ; then + if ls ${{ env.TS_FILENAME }}*diag-utils* > /dev/null 2>&1 ; then + rm -fv ${{ env.TS_FILENAME }}*diag-utils* fi echo "Folder setup" - if ls ${{ env.TBN_FILENAME }}*linux* > /dev/null 2>&1 ; then + if ls ${{ env.TS_FILENAME }}*linux* > /dev/null 2>&1 ; then mkdir -p "linux/${{ env.TARI_NETWORK_DIR }}/" - mv -v ${{ env.TBN_FILENAME }}*linux* "linux/${{ env.TARI_NETWORK_DIR }}/" + mv -v ${{ env.TS_FILENAME }}*linux* "linux/${{ env.TARI_NETWORK_DIR }}/" fi - if ls ${{ env.TBN_FILENAME }}*macos* > /dev/null 2>&1 ; then + if ls ${{ env.TS_FILENAME }}*macos* > /dev/null 2>&1 ; then mkdir -p "osx/${{ env.TARI_NETWORK_DIR }}/" - mv -v ${{ env.TBN_FILENAME }}*macos* "osx/${{ env.TARI_NETWORK_DIR }}/" + mv -v ${{ env.TS_FILENAME }}*macos* "osx/${{ env.TARI_NETWORK_DIR }}/" fi - if ls ${{ env.TBN_FILENAME }}*windows* > /dev/null 2>&1 ; then + if ls ${{ env.TS_FILENAME }}*windows* > /dev/null 2>&1 ; then mkdir -p "windows/${{ env.TARI_NETWORK_DIR }}/" - mv -v ${{ env.TBN_FILENAME }}*windows* "windows/${{ env.TARI_NETWORK_DIR }}/" + mv -v ${{ env.TS_FILENAME }}*windows* "windows/${{ env.TARI_NETWORK_DIR }}/" fi ls -alhtR aws --version