Skip to content

Commit

Permalink
ci(fix): libwallet debugging and remove quoting for file checks (#5456)
Browse files Browse the repository at this point in the history
Description
Use bash wildcards outside of quotes and remove quotes from file checks

Motivation and Context
Fix libwallet corner case builds issue.

How Has This Been Tested?
Testing in local fork.
  • Loading branch information
leet4tari authored Jun 12, 2023
1 parent da1c686 commit a2d7746
Showing 1 changed file with 26 additions and 24 deletions.
50 changes: 26 additions & 24 deletions .github/workflows/build_libwallets_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,21 +72,22 @@ jobs:
run: |
target_temp=${{ matrix.build }}
# Strip '-linux-android'
target_platform=$(echo "${target_temp/-linux-android*/}")
target_platform=${target_temp/-linux-android*/}
echo "target_platform=${target_platform}" >> $GITHUB_ENV
echo "${target_platform}"
mkdir -p "${{ runner.temp }}/libwallet-android-${target_platform}"
cd "${{ runner.temp }}/libwallet-android-${target_platform}"
cp -v "$GITHUB_WORKSPACE/target/${{ matrix.build }}/release/libtari_wallet_ffi.a" "libtari_wallet_ffi.android_${target_platform}.a"
cp -v "$GITHUB_WORKSPACE/base_layer/wallet_ffi/wallet.h" libtari_wallet_ffi.h
if [ -f "$GITHUB_WORKSPACE/changelog-${{ env.TARI_NETWORK_CHANGELOG }}.md" ]; then
cp -v "$GITHUB_WORKSPACE/changelog-${{ env.TARI_NETWORK_CHANGELOG }}.md" .
TARI_NETWORK_CHANGELOG_FILE=libwallet-android-${target_platform}/changelog-${{ env.TARI_NETWORK_CHANGELOG }}.md
echo ${TARI_NETWORK_CHANGELOG_FILE}
cp -v "${GITHUB_WORKSPACE}/target/${{ matrix.build }}/release/libtari_wallet_ffi.a" "libtari_wallet_ffi.android_${target_platform}.a"
cp -v "${GITHUB_WORKSPACE}/base_layer/wallet_ffi/wallet.h" libtari_wallet_ffi.h
ls -alht "${GITHUB_WORKSPACE}"
if [ -f ${GITHUB_WORKSPACE}/changelog-${{ env.TARI_NETWORK_CHANGELOG }}.md ]; then
cp -v "${GITHUB_WORKSPACE}/changelog-${{ env.TARI_NETWORK_CHANGELOG }}.md" .
fi
cd ..
ls -alht "libwallet-android-${target_platform}"
# In a subfolder for releases
shasum -a 256 \
"libwallet-android-${target_platform}/libtari_wallet_ffi.android_${target_platform}.a" \
"libwallet-android-${target_platform}/libtari_wallet_ffi.h" "${TARI_NETWORK_CHANGELOG_FILE}" \
"libwallet-android-${target_platform}"/* \
> "libwallet-android-${target_platform}/libtari_wallet_ffi.android_${target_platform}.sha256"
ls -alht "${{ runner.temp }}/libwallet-android-${target_platform}"
Expand Down Expand Up @@ -150,22 +151,22 @@ jobs:
run: |
target_temp=${{ matrix.build }}
# Strip '-apple-ios'
target_platform=$(echo "${target_temp/-apple-ios/}")
target_platform=${target_temp/-apple-ios/}
echo "target_platform=${target_platform}" >> $GITHUB_ENV
echo "${target_platform}"
mkdir -p "${{ runner.temp }}/libwallet-ios-${target_platform}"
cd "${{ runner.temp }}/libwallet-ios-${target_platform}"
cp -v "$GITHUB_WORKSPACE/target/${{ matrix.build }}/release/libtari_wallet_ffi.a" "libtari_wallet_ffi.ios_${target_platform}.a"
cp -v "$GITHUB_WORKSPACE/base_layer/wallet_ffi/wallet.h" libtari_wallet_ffi.h
if [ -f "$GITHUB_WORKSPACE/changelog-${{ env.TARI_NETWORK_CHANGELOG }}.md" ]; then
cp -v "$GITHUB_WORKSPACE/changelog-${{ env.TARI_NETWORK_CHANGELOG }}.md" .
TARI_NETWORK_CHANGELOG_FILE=libwallet-ios-${target_platform}/changelog-${{ env.TARI_NETWORK_CHANGELOG }}.md
echo ${TARI_NETWORK_CHANGELOG_FILE}
cp -v "${GITHUB_WORKSPACE}/target/${{ matrix.build }}/release/libtari_wallet_ffi.a" "libtari_wallet_ffi.ios_${target_platform}.a"
cp -v "${GITHUB_WORKSPACE}/base_layer/wallet_ffi/wallet.h" libtari_wallet_ffi.h
ls -alht "${GITHUB_WORKSPACE}"
if [ -f ${GITHUB_WORKSPACE}/changelog-${{ env.TARI_NETWORK_CHANGELOG }}.md ]; then
cp -v "${GITHUB_WORKSPACE}/changelog-${{ env.TARI_NETWORK_CHANGELOG }}.md" .
fi
cd ..
ls -alht "libwallet-ios-${target_platform}"
# In a subfolder for releases
shasum -a 256 \
"libwallet-ios-${target_platform}/libtari_wallet_ffi.ios_${target_platform}.a" \
"libwallet-ios-${target_platform}/libtari_wallet_ffi.h" "${TARI_NETWORK_CHANGELOG_FILE}" \
"libwallet-ios-${target_platform}"/* \
> "libwallet-ios-${target_platform}/libtari_wallet_ffi.ios_${target_platform}.sha256"
ls -alht "${{ runner.temp }}/libwallet-ios-${target_platform}"
Expand Down Expand Up @@ -224,18 +225,17 @@ jobs:
TARI_NETWORK_CHANGELOG=${envChangelog##*/changelog-}
echo ${TARI_NETWORK_CHANGELOG}
cp -v "libwallet-ios-x86_64/changelog-${TARI_NETWORK_CHANGELOG}.md" libwallet-ios-universal/
TARI_NETWORK_CHANGELOG_FILE=libwallet-ios-universal/changelog-${TARI_NETWORK_CHANGELOG}.md
echo ${TARI_NETWORK_CHANGELOG_FILE}
else
echo "No changelog found"
fi
lipo -create \
"libwallet-ios-x86_64/libtari_wallet_ffi.ios_x86_64.a" \
"libwallet-ios-aarch64/libtari_wallet_ffi.ios_aarch64.a" \
-output "libwallet-ios-universal/libtari_wallet_ffi.ios_universal.a"
ls -alhtR "libwallet-ios-universal"
# In a subfolder for releases
shasum -a 256 \
"libwallet-ios-universal/libtari_wallet_ffi.ios_universal.a" \
"libwallet-ios-universal/libtari_wallet_ffi.h" "${TARI_NETWORK_CHANGELOG_FILE}" \
"libwallet-ios-universal"/* \
> "libwallet-ios-universal/libtari_wallet_ffi.ios_universal.sha256"
ls -alhtR
Expand Down Expand Up @@ -280,14 +280,16 @@ jobs:
-library "libwallet-ios-aarch64/libtari_wallet_ffi.ios_aarch64.a" \
-headers "libwallet-ios-aarch64/libtari_wallet_ffi.h" \
-output libwallet-ios-xcframework/libtari_wallet_ffi_ios.xcframework
ls -alhtR "libwallet-ios-xcframework"
# In a subfolder for releases
shasum -a 256 \
"libwallet-ios-xcframework/libtari_wallet_ffi_ios.xcframework/Info.plist" \
"libwallet-ios-xcframework/libtari_wallet_ffi_ios.xcframework/ios-arm64/Headers" \
"libwallet-ios-xcframework/libtari_wallet_ffi_ios.xcframework/ios-arm64/libtari_wallet_ffi.ios_aarch64.a" \
"libwallet-ios-xcframework/libtari_wallet_ffi_ios.xcframework/ios-arm64_x86_64-simulator/Headers" \
"libwallet-ios-xcframework/libtari_wallet_ffi_ios.xcframework/ios-arm64_x86_64-simulator/libtari_wallet_ffi.ios_universal-sim.a" \
"${TARI_NETWORK_CHANGELOG_FILE}" \
> "libwallet-ios-xcframework/libtari_wallet_ffi.ios_xcframework.sha256"
> "libwallet-ios-xcframework/libtari_wallet_ffi.ios_xcframework.sha256" || true
ls -alhtR
- name: Upload iOS xcframework libwallet artifacts
Expand Down

0 comments on commit a2d7746

Please sign in to comment.