-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ci] Test Build + Build Wallet During Release (#490)
* test build * lint on macos * provide correct cgo flags * move wallet build to release * nits * naming nits
- Loading branch information
1 parent
05522d1
commit 043fb03
Showing
7 changed files
with
144 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,13 +6,39 @@ set -o errexit | |
set -o nounset | ||
set -o pipefail | ||
|
||
# Remove any previous build artifacts | ||
rm -rf token-wallet.zip | ||
# Set the CGO flags to use the portable version of BLST | ||
# | ||
# We use "export" here instead of just setting a bash variable because we need | ||
# to pass this flag to all child processes spawned by the shell. | ||
export CGO_CFLAGS="-O -D__BLST_PORTABLE__" | ||
|
||
PUBLISH=${PUBLISH:-true} | ||
|
||
# Install wails | ||
go install -v github.com/wailsapp/wails/v2/cmd/[email protected] | ||
|
||
# Build file for local arch | ||
# | ||
# Don't use upx: https://github.com/upx/upx/issues/446 | ||
wails build -clean -platform darwin/universal | ||
|
||
OUTPUT=build/bin/Token\ Wallet.app | ||
if [ ! -d "$OUTPUT" ]; then | ||
exit 1 | ||
fi | ||
|
||
# Remove any previous build artifacts | ||
rm -rf token-wallet.zip | ||
|
||
# Exit early if not publishing | ||
if [ ${PUBLISH} == false ]; then | ||
echo "not publishing app" | ||
ditto -c -k --keepParent build/bin/Token\ Wallet.app token-wallet.zip | ||
exit 0 | ||
fi | ||
echo "publishing app" | ||
|
||
# Sign code | ||
codesign -s ${APP_SIGNING_KEY_ID} --deep --timestamp -o runtime -v build/bin/Token\ Wallet.app | ||
ditto -c -k --keepParent build/bin/Token\ Wallet.app token-wallet.zip | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/usr/bin/env bash | ||
# Copyright (C) 2023, Ava Labs, Inc. All rights reserved. | ||
# See the file LICENSE for licensing terms. | ||
|
||
set -o errexit | ||
set -o nounset | ||
set -o pipefail | ||
|
||
# Set the CGO flags to use the portable version of BLST | ||
# | ||
# We use "export" here instead of just setting a bash variable because we need | ||
# to pass this flag to all child processes spawned by the shell. | ||
export CGO_CFLAGS="-O -D__BLST_PORTABLE__" | ||
|
||
# Install wails | ||
go install -v github.com/wailsapp/wails/v2/cmd/[email protected] | ||
|
||
# Start development environment | ||
wails dev |