Skip to content

Commit

Permalink
ci: improvements to macos pkg (#3824)
Browse files Browse the repository at this point in the history
Copy OSX signed bins into pkg, update step labels, improve cache hits, add disk space feedback

How Has This Been Tested?
OSX pkg changes have not been tested, but all other parts have been test in the local fork.
  • Loading branch information
leet4tari authored Feb 17, 2022
1 parent 8f54705 commit 7c0a4b1
Showing 1 changed file with 36 additions and 8 deletions.
44 changes: 36 additions & 8 deletions .github/workflows/base_node_binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ env:

jobs:
builds:
name: Build and deploy tari_base_node
name: Build and upload Binaries
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -94,6 +94,7 @@ jobs:
libappindicator3-dev \
patchelf \
librsvg2-dev
- name: Install macOS dependencies
if: startsWith(runner.os,'macOS')
run: brew install cmake zip coreutils automake autoconf
Expand Down Expand Up @@ -141,6 +142,9 @@ jobs:
~/.cargo/git
target
key: ${{ runner.os }}-${{ matrix.os }}-${{ matrix.target_cpu }}-${{ matrix.features }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.os }}-${{ matrix.target_cpu }}-${{ matrix.features }}-cargo-build-target-
${{ runner.os }}-${{ matrix.os }}-${{ matrix.target_cpu }}-${{ matrix.features }}-
- name: Compile launchpad GUI
run: |
Expand All @@ -154,6 +158,12 @@ jobs:
npm install
npm run build
- name: Info - Pre-Compile Space Check for Nix
if: "!startsWith(runner.os,'Windows')"
shell: bash
run: |
df -h
- name: Build rust binaries
env:
RUSTFLAGS: "-C target_cpu=${{ matrix.target_cpu }}"
Expand All @@ -162,6 +172,12 @@ jobs:
echo "Cache Key: ${{ runner.os }}-${{ matrix.os }}-${{ matrix.target_cpu }}-${{ matrix.features }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}"
cargo build --release
- name: Info - Post-Compile Space Check for Nix
if: "!startsWith(runner.os,'Windows')"
shell: bash
run: |
df -h
- name: Copy binaries to folder for zipping
shell: bash
run: |
Expand All @@ -185,8 +201,9 @@ jobs:
cp -v "$GITHUB_WORKSPACE/target/release/tari_launchpad${TBN_EXT}" .
cp -v "$GITHUB_WORKSPACE/applications/tari_base_node/${PLATFORM_SPECIFIC_DIR}/runtime/start_tor${SHELL_EXT}" .
- name: Build the macos pkg
- name: Build the macOS pkg
if: startsWith(runner.os,'macOS')
continue-on-error: true
env:
MACOS_KEYCHAIN_PASS: ${{ secrets.MACOS_KEYCHAIN_PASS }}
MACOS_APPLICATION_ID: ${{ secrets.MACOS_APPLICATION_ID }}
Expand All @@ -206,10 +223,19 @@ jobs:
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k $MACOS_KEYCHAIN_PASS build.keychain
cd buildtools
./create_osx_install_zip.sh unused nozip
FILES=("tari_base_node" "tari_console_wallet" "tari_mining_node" "tari_merge_mining_proxy")
FILES=(
"tari_base_node"
"tari_console_wallet"
"tari_mining_node"
"tari_merge_mining_proxy"
"tari_validator_node"
"tari_collectibles"
"tari_launchpad"
)
for FILE in "${FILES[@]}"; do
codesign --force -s "Developer ID Application: $MACOS_APPLICATION_ID" "/tmp/tari_testnet/runtime/$FILE" -v
codesign --verify --deep --display --verbose=4 "/tmp/tari_testnet/runtime/$FILE"
cp -vf "/tmp/tari_testnet/runtime/$FILE" "$GITHUB_WORKSPACE${{ env.TBN_DIST }}"
done
pkgbuild --root /tmp/tari_testnet \
--identifier "com.tarilabs.pkg" \
Expand All @@ -218,23 +244,25 @@ jobs:
--scripts "/tmp/tari_testnet/scripts" \
--sign "Developer ID Installer: $MACOS_INSTALLER_ID" \
"${{ github.workspace }}${{ env.TBN_DIST }}/tari-${{ env.VERSION }}.pkg"
- name: Artifact macos pkg
- name: Artifact upload for macOS pkg
if: startsWith(runner.os,'macOS')
continue-on-error: true
uses: actions/upload-artifact@v2
with:
name: tari-${{ env.VERSION }}.pkg
path: "${{ github.workspace }}${{ env.TBN_DIST }}/tari-${{ env.VERSION }}.pkg"

# unlike inno script studio, iscc.exe doesn't run the [precompile] step generate_config.bat
- name: Build the windows installer
- name: Build the Windows installer
shell: cmd
if: startsWith(runner.os,'Windows')
run: |
cd buildtools
call generate_config.bat
"%programfiles(x86)%\Inno Setup 6\iscc.exe" "/DMyAppVersion=${{ env.VERSION }}-${{ env.VSHA_SHORT }}-release" "windows_inno_installer.iss"
- name: Upload artifact for Windows installer
- name: Artifact upload for Windows installer
uses: actions/upload-artifact@v2
if: startsWith(runner.os,'Windows')
with:
Expand All @@ -255,14 +283,14 @@ jobs:
${SHARUN} --check "${{ env.BINFILE }}.zip.sha256"
#rm -f "${BINFILE}"
- name: Artifact archive
- name: Artifact upload for Archive
uses: actions/upload-artifact@v2
with:
#name: ${{ env.TBN_FILENAME }}-${{ env.VERSION }}-${{ env.VSHA_SHORT }}-${{ matrix.os }}-${{ matrix.target_cpu }}-${{ matrix.features }}
name: tari_binary_archive-${{ matrix.os }}-${{ matrix.target_cpu }}
path: "${{ github.workspace }}${{ env.TBN_DIST }}/${{ env.BINFILE }}.zip*"

- name: Artifact miner
- name: Artifact upload for Miner
uses: actions/upload-artifact@v2
with:
name: tari_mining_node-${{ matrix.os }}-${{ matrix.target_cpu }}
Expand Down

0 comments on commit 7c0a4b1

Please sign in to comment.