Skip to content

Commit

Permalink
ci: add tor script to binaries bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
stringhandler committed Jan 10, 2022
1 parent bc9ede1 commit b05467f
Show file tree
Hide file tree
Showing 20 changed files with 34 additions and 59 deletions.
49 changes: 12 additions & 37 deletions .github/workflows/base_node_binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ on:

env:
TBN_FILENAME: "tari_base_node"
# PROTOC: protoc

jobs:
builds:
Expand Down Expand Up @@ -95,7 +94,6 @@ jobs:
libappindicator3-dev \
patchelf \
librsvg2-dev
# sudo apt-get -y upgrade
- name: Install macOS dependencies
if: startsWith(runner.os,'macOS')
run: brew install cmake zip coreutils
Expand All @@ -112,13 +110,13 @@ jobs:
echo "SHARUN=shasum --algorithm 256" >> $GITHUB_ENV
echo "CC=gcc" >> $GITHUB_ENV
echo "TBN_EXT=" >> $GITHUB_ENV
echo "S3DESTDIR=linux" >> $GITHUB_ENV
echo "PLATFORM_SPECIFIC_DIR=linux" >> $GITHUB_ENV
echo "TBN_DIST=/dist" >> $GITHUB_ENV
- name: Set environment variables - macOS
if: startsWith(runner.os,'macOS')
run: |
echo "S3DESTDIR=osx" >> $GITHUB_ENV
echo "PLATFORM_SPECIFIC_DIR=osx" >> $GITHUB_ENV
- name: Set environment variables - Windows
if: startsWith(runner.os,'Windows')
Expand All @@ -127,13 +125,13 @@ jobs:
echo "SHARUN=pwsh C:\ProgramData\chocolatey\lib\psutils\tools\psutils-master\shasum.ps1 --algorithm 256" >> $GITHUB_ENV
echo "TBN_EXT=.exe" >> $GITHUB_ENV
echo "TBN_DIST=\dist" >> $GITHUB_ENV
echo "S3DESTDIR=windows" >> $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
echo "LIBCLANG_PATH=C:\Program Files\LLVM\bin" >> $GITHUB_ENV
echo "C:\Strawberry\perl\bin" >> $GITHUB_PATH
- name: Caching
- name: Cache cargo files and outputs
uses: actions/cache@v2
with:
path: |
Expand All @@ -142,50 +140,27 @@ jobs:
target
key: ${{ runner.os }}-${{ matrix.os }}-${{ matrix.target_cpu }}-${{ matrix.features }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}

- name: Compile NPM
- name: Compile launchpad GUI
run: |
cd applications/launchpad/gui-vue
npm install
npm run build
- name: Compile react (collectibles)
- name: Compile collectibles GUI
run: |
cd applications/tari_collectibles/web-app
npm install
npm run build
- name: Build binaries
- name: Build rust binaries
env:
RUSTFLAGS: "-C target_cpu=${{ matrix.target_cpu }}"
ROARING_ARCH: "${{ matrix.target_cpu }}"
run: |
echo "Cache Key: ${{ runner.os }}-${{ matrix.os }}-${{ matrix.target_cpu }}-${{ matrix.features }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}"
#cd applications/tari_base_node
#cargo build --release --bin tari_base_node --features ${{ matrix.features}}
cargo build --release
# - name: Build tauri apps
# env:
# RUSTFLAGS: "-C target_cpu=${{ matrix.target_cpu }}"
# run: |
# echo "Cache Key: ${{ runner.os }}-${{ matrix.os }}-${{ matrix.target_cpu }}-${{ matrix.features }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}"
# cd applications/tari_collectibles
# npm install
# cd web-app
# npm install
# cd ..
# npm run tauri build

# - name: Prepare Archives
# - name: Prepare Archives
# shell: bash
# run: |
# ls -la "$GITHUB_WORKSPACE"
# mkdir -p "$GITHUB_WORKSPACE${TBN_DIST}/archives"
# export distDir="$GITHUB_WORKSPACE${TBN_DIST}/archives"
# "$GITHUB_WORKSPACE/scripts/build_dists_tarball.sh" noBuild

- name: Prepare binaries
- name: Copy binaries to folder for zipping
shell: bash
run: |
mkdir -p "$GITHUB_WORKSPACE${TBN_DIST}"
Expand All @@ -195,18 +170,18 @@ jobs:
echo "Sha: ${VSHA_SHORT}"
echo "VERSION=${VERSION}" >> $GITHUB_ENV
echo "VSHA_SHORT=${VSHA_SHORT}" >> $GITHUB_ENV
#BINFILE="${TBN_FILENAME}-${VERSION}-${VSHA_SHORT}-${{ matrix.os }}-${{ matrix.target_cpu }}-${{ matrix.features }}${TBN_EXT}"
BINFILE="${TBN_FILENAME}-${VERSION}-${VSHA_SHORT}-${{ matrix.os }}-${{ matrix.target_cpu }}${TBN_EXT}"
echo "BINFILE=${BINFILE}" >> $GITHUB_ENV
echo "Copying files for ${BINFILE} to $(pwd)"
#cp -v "$GITHUB_WORKSPACE/target/release/${TBN_FILENAME}${TBN_EXT}" "./${BINFILE}"
ls -la "$GITHUB_WORKSPACE/target/release/"
cp -v "$GITHUB_WORKSPACE/target/release/tari_base_node${TBN_EXT}" .
cp -v "$GITHUB_WORKSPACE/target/release/tari_console_wallet${TBN_EXT}" .
cp -v "$GITHUB_WORKSPACE/target/release/tari_merge_mining_proxy${TBN_EXT}" .
cp -v "$GITHUB_WORKSPACE/target/release/tari_mining_node${TBN_EXT}" .
cp -v "$GITHUB_WORKSPACE/target/release/tari_validator_node${TBN_EXT}" .
cp -v "$GITHUB_WORKSPACE/target/release/tari_collectibles${TBN_EXT}" .
cp -v "$GITHUB_WORKSPACE/target/release/launchpad${TBN_EXT}" .
cp -v "$GITHUB_WORKSPACE/applications/tari_base_node/${PLATFORM_SPECIFIC_DIR}/runtime/start_tor.*" .
- name: Build the macos pkg
if: startsWith(runner.os,'macOS')
Expand Down Expand Up @@ -310,7 +285,7 @@ jobs:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
SOURCE: "${{ github.workspace }}${{ env.TBN_DIST }}"
DEST_DIR: "${{ env.S3DESTOVERRIDE }}${{ env.S3DESTDIR }}/"
DEST_DIR: "${{ env.S3DESTOVERRIDE }}${{ env.PLATFORM_SPECIFIC_DIR }}/"
S3CMD: "cp"
S3OPTIONS: '--recursive --exclude "*" --include "*.zip*"'
# S3OPTIONS: '--recursive --exclude "*" --include "*.zip*"'
Expand Down Expand Up @@ -346,7 +321,7 @@ jobs:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
SOURCE: "${{ github.workspace }}${{ env.TBN_DIST }}"
DEST_DIR: "${{ env.S3DESTOVERRIDE }}${{ env.S3DESTDIR }}/"
DEST_DIR: "${{ env.S3DESTOVERRIDE }}${{ env.PLATFORM_SPECIFIC_DIR }}/"
S3CMD: "cp"
S3OPTIONS: '--recursive --exclude "*" --include "*.zip*"'
# S3OPTIONS: '--recursive --exclude "*" --include "*.zip*"'
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ The executables will either be inside your `~/tari/target/release` (on Linux) or
directory, depending on the build choice above, and must be run from the command line. If the former build method was
used, you can run it from that directory, or you more likely want to copy it somewhere more convenient. Make sure to
start Tor service `~/tari/applications/tari_base_node/osx/start_tor` (on Mac),
`~/tari/applications/tari_base_node/ubuntu/start_tor` (on Linux) or
`~/tari/applications/tari_base_node/linux/start_tor` (on Linux) or
`%USERPROFILE%\Code\tari\applications\tari_base_node\windows\start_tor.lnk` (on Windows).
To run from any directory of your choice, where the executable is visible in the path (first time use):
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions applications/tari_base_node/linux/setup_tor_service
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
./runtime/setup_tor_service.sh
1 change: 1 addition & 0 deletions applications/tari_base_node/linux/start_all
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
./runtime/start_all.sh
1 change: 1 addition & 0 deletions applications/tari_base_node/linux/start_tari_base_node
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
./runtime/start_tari_base_node.sh
1 change: 1 addition & 0 deletions applications/tari_base_node/linux/start_tor
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
./runtime/start_tor.sh
1 change: 0 additions & 1 deletion applications/tari_base_node/ubuntu/setup_tor_service

This file was deleted.

1 change: 0 additions & 1 deletion applications/tari_base_node/ubuntu/start_all

This file was deleted.

1 change: 0 additions & 1 deletion applications/tari_base_node/ubuntu/start_tari_base_node

This file was deleted.

1 change: 0 additions & 1 deletion applications/tari_base_node/ubuntu/start_tor

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
./runtime/start_tari_console_wallet.sh

This file was deleted.

32 changes: 16 additions & 16 deletions buildtools/create_ubuntu_install_zip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,33 +42,33 @@ else
fi

# One click miner
cp -f -P "${app_dir}/tari_base_node/ubuntu/start_all" "${tarball_folder}/start_all"
cp -f "${app_dir}/tari_base_node/ubuntu/runtime/start_all.sh" "${tarball_folder}/runtime/start_all.sh"
cp -f -P "${app_dir}/tari_base_node/linux/start_all" "${tarball_folder}/start_all"
cp -f "${app_dir}/tari_base_node/linux/runtime/start_all.sh" "${tarball_folder}/runtime/start_all.sh"

# Base Node
cp -f -P "${app_dir}/tari_base_node/ubuntu/setup_tor_service" "${tarball_folder}/setup_tor_service"
cp -f -P "${app_dir}/tari_base_node/ubuntu/start_tari_base_node" "${tarball_folder}/start_tari_base_node"
cp -f -P "${app_dir}/tari_base_node/ubuntu/start_tor" "${tarball_folder}/start_tor"
cp -f "${app_dir}/tari_base_node/ubuntu/runtime/setup_tor_service.sh" "${tarball_folder}/runtime/setup_tor_service.sh"
cp -f "${app_dir}/tari_base_node/ubuntu/runtime/start_tari_base_node.sh" "${tarball_folder}/runtime/start_tari_base_node.sh"
cp -f "${app_dir}/tari_base_node/ubuntu/runtime/start_tor.sh" "${tarball_folder}/runtime/start_tor.sh"
cp -f -P "${app_dir}/tari_base_node/linux/setup_tor_service" "${tarball_folder}/setup_tor_service"
cp -f -P "${app_dir}/tari_base_node/linux/start_tari_base_node" "${tarball_folder}/start_tari_base_node"
cp -f -P "${app_dir}/tari_base_node/linux/start_tor" "${tarball_folder}/start_tor"
cp -f "${app_dir}/tari_base_node/linux/runtime/setup_tor_service.sh" "${tarball_folder}/runtime/setup_tor_service.sh"
cp -f "${app_dir}/tari_base_node/linux/runtime/start_tari_base_node.sh" "${tarball_folder}/runtime/start_tari_base_node.sh"
cp -f "${app_dir}/tari_base_node/linux/runtime/start_tor.sh" "${tarball_folder}/runtime/start_tor.sh"
cp -f "${project_dir}/target/release/tari_base_node" "${tarball_folder}/runtime/tari_base_node"

# Console Wallet
cp -f -P "${app_dir}/tari_console_wallet/ubuntu/start_tari_console_wallet" "${tarball_folder}/start_tari_console_wallet"
cp -f "${app_dir}/tari_console_wallet/ubuntu/runtime/start_tari_console_wallet.sh" "${tarball_folder}/runtime/start_tari_console_wallet.sh"
cp -f -P "${app_dir}/tari_console_wallet/linux/start_tari_console_wallet" "${tarball_folder}/start_tari_console_wallet"
cp -f "${app_dir}/tari_console_wallet/linux/runtime/start_tari_console_wallet.sh" "${tarball_folder}/runtime/start_tari_console_wallet.sh"
cp -f "${project_dir}/target/release/tari_console_wallet" "${tarball_folder}/runtime/tari_console_wallet"

# Mining Node
cp -f -P "${app_dir}/tari_mining_node/ubuntu/start_tari_mining_node" "${tarball_folder}/start_tari_mining_node"
cp -f "${app_dir}/tari_mining_node/ubuntu/runtime/start_tari_mining_nodet.sh" "${tarball_folder}/runtime/start_tari_mining_node.sh"
cp -f -P "${app_dir}/tari_mining_node/linux/start_tari_mining_node" "${tarball_folder}/start_tari_mining_node"
cp -f "${app_dir}/tari_mining_node/linux/runtime/start_tari_mining_nodet.sh" "${tarball_folder}/runtime/start_tari_mining_node.sh"
cp -f "${project_dir}/target/release/tari_mining_node" "${tarball_folder}/runtime/tari_mining_node"

# Merge Mining Proxy
cp -f -P "${app_dir}/tari_merge_mining_proxy/ubuntu/start_tari_merge_mining_proxy" "${tarball_folder}/start_tari_merge_mining_proxy"
cp -f -P "${app_dir}/tari_merge_mining_proxy/ubuntu/start_xmrig" "${tarball_folder}/start_xmrig"
cp -f "${app_dir}/tari_merge_mining_proxy/ubuntu/runtime/start_tari_merge_mining_proxy.sh" "${tarball_folder}/runtime/start_tari_merge_mining_proxy.sh"
cp -f "${app_dir}/tari_merge_mining_proxy/ubuntu/runtime/start_xmrig.sh" "${tarball_folder}/runtime/start_xmrig.sh"
cp -f -P "${app_dir}/tari_merge_mining_proxy/linux/start_tari_merge_mining_proxy" "${tarball_folder}/start_tari_merge_mining_proxy"
cp -f -P "${app_dir}/tari_merge_mining_proxy/linux/start_xmrig" "${tarball_folder}/start_xmrig"
cp -f "${app_dir}/tari_merge_mining_proxy/linux/runtime/start_tari_merge_mining_proxy.sh" "${tarball_folder}/runtime/start_tari_merge_mining_proxy.sh"
cp -f "${app_dir}/tari_merge_mining_proxy/linux/runtime/start_xmrig.sh" "${tarball_folder}/runtime/start_xmrig.sh"
cp -f "${project_dir}/target/release/tari_merge_mining_proxy" "${tarball_folder}/runtime/tari_merge_mining_proxy"

# 3rd party install
Expand Down

0 comments on commit b05467f

Please sign in to comment.