Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update build and release and full-service binary name #501

Merged
merged 4 commits into from
Oct 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 15 additions & 23 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ on:
push:
tags:
- 'v*-pre.*'
- '*-force-build*'
- '*.dev-build.*'

jobs:
macos-x64:
runs-on: [self-hosted, macOS, X64]
runs-on: [self-hosted, macOS, X64, cargo]
permissions:
contents: write
strategy:
Expand Down Expand Up @@ -53,18 +53,14 @@ jobs:

- name: Cargo Build
run: |
export PATH="/usr/local/opt/openssl@3/bin:$PATH"
export LDFLAGS="-L/usr/local/opt/openssl@3/lib"
export CPPFLAGS="-I/usr/local/opt/openssl@3/include"
export PKG_CONFIG_PATH="/usr/local/opt/openssl@3/lib/pkgconfig"
cargo build --release

- name: Copy binaries to cache folder
run: |
mkdir -pv build_artifacts/${{ matrix.network }}/bin
cp /var/tmp/*.css build_artifacts/${{ matrix.network }}
cp target/release/full-service build_artifacts/${{ matrix.network }}/bin/
cp target/release/transaction-signer build_artifacts/${{ matrix.network }}/bin/
cp target/release/mc-full-service build_artifacts/${{ matrix.network }}/bin/
cp target/release/mc-transaction-signer build_artifacts/${{ matrix.network }}/bin/
cp target/release/mc-validator-service build_artifacts/${{ matrix.network }}/bin/

- name: Create Artifact
Expand All @@ -78,13 +74,13 @@ jobs:
name: full-service_${{ runner.os }}_${{ matrix.network }}_x86
path: artifact/${{ github.sha }}-${{ runner.os }}-x86-${{ matrix.network }}.tar.gz

- name: Create Release
- name: Create Prerelease
if: startsWith(github.ref, 'refs/tags/v')
run: |
mkdir -pv release
cd release && tar -czvf ${{ github.ref_name }}-${{ runner.os }}-x86-${{ matrix.network }}.tar.gz -C ../build_artifacts/${{ matrix.network }}/ .

- name: Upload Release
- name: Upload Prerelease
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v1
with:
Expand All @@ -94,7 +90,7 @@ jobs:
release/${{ github.ref_name }}-${{ runner.os }}-x86-${{ matrix.network }}.tar.gz

macos-arm64:
runs-on: [self-hosted, macOS, ARM64]
runs-on: [self-hosted, macOS, ARM64, cargo]
permissions:
contents: write
strategy:
Expand Down Expand Up @@ -131,18 +127,14 @@ jobs:

- name: Cargo Build
run: |
export PATH="/opt/homebrew/opt/openssl@3/bin:$PATH"
export LDFLAGS="-L/opt/homebrew/opt/openssl@3/lib"
export CPPFLAGS="-I/opt/homebrew/opt/openssl@3/include"
export PKG_CONFIG_PATH="/opt/homebrew/opt/openssl@3/lib/pkgconfig"
cargo build --release

- name: Copy binaries to cache folder
run: |
mkdir -pv build_artifacts/${{ matrix.network }}/bin
cp /var/tmp/*.css build_artifacts/${{ matrix.network }}
cp target/release/full-service build_artifacts/${{ matrix.network }}/bin/
cp target/release/transaction-signer build_artifacts/${{ matrix.network }}/bin/
cp target/release/mc-full-service build_artifacts/${{ matrix.network }}/bin/
cp target/release/mc-transaction-signer build_artifacts/${{ matrix.network }}/bin/
cp target/release/mc-validator-service build_artifacts/${{ matrix.network }}/bin/

- name: Create Artifact
Expand All @@ -156,13 +148,13 @@ jobs:
name: full-service_${{ runner.os }}_${{ matrix.network }}_arm64
path: artifact/${{ github.sha }}-${{ runner.os }}-arm64-${{ matrix.network }}.tar.gz

- name: Create Release
- name: Create Prerelease
if: startsWith(github.ref, 'refs/tags/v')
run: |
mkdir -pv release
cd release && tar -czvf ${{ github.ref_name }}-${{ runner.os }}-arm64-${{ matrix.network }}.tar.gz -C ../build_artifacts/${{ matrix.network }}/ .

- name: Upload Release
- name: Upload Prerelease
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v1
with:
Expand Down Expand Up @@ -209,8 +201,8 @@ jobs:
run: |
mkdir -pv build_artifacts/${{ matrix.network }}/bin
cp /var/tmp/*.css build_artifacts/${{ matrix.network }}
cp target/release/full-service build_artifacts/${{ matrix.network }}/bin/
cp target/release/transaction-signer build_artifacts/${{ matrix.network }}/bin/
cp target/release/mc-full-service build_artifacts/${{ matrix.network }}/bin/
cp target/release/mc-transaction-signer build_artifacts/${{ matrix.network }}/bin/
cp target/release/mc-validator-service build_artifacts/${{ matrix.network }}/bin/

- name: Create Artifact
Expand All @@ -224,13 +216,13 @@ jobs:
name: full-service_${{ runner.os }}_${{ matrix.network }}
path: artifact/${{ github.sha }}-${{ runner.os }}-${{ matrix.network }}.tar.gz

- name: Create Release
- name: Create Prerelease
if: startsWith(github.ref, 'refs/tags/v')
run: |
mkdir -pv release
cd release && tar -czvf ${{ github.ref_name }}-${{ runner.os }}-${{ matrix.network }}.tar.gz -C ../build_artifacts/${{ matrix.network }}/ .

- name: Upload Release
- name: Upload Prerelease
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v1
with:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:
tags:
- 'v*'
- '!v*-pre*'
- '*-force-release*'

jobs:
release:
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ sudo xcode-select -s /Applications/<name of xcode application>.app/Contents/Deve

```sh
mkdir -p /tmp/wallet-db/
./target/release/full-service \
./target/release/mc-full-service \
--wallet-db /tmp/wallet-db/wallet.db \
--ledger-db /tmp/ledger-db/ \
--peer mc://node1.test.mobilecoin.com/ \
Expand Down Expand Up @@ -278,7 +278,7 @@ The recommended flow to get balance and submit transaction is the following:
1. *ONLINE MACHINE*: Sync ledger by running full service.

```sh
./target/release/full-service \
./target/release/mc-full-service \
--wallet-db /tmp/wallet-db/wallet.db \
--ledger-db /tmp/ledger-db/ \
--peer mc://node1.test.mobilecoin.com/ \
Expand All @@ -292,7 +292,7 @@ The recommended flow to get balance and submit transaction is the following:

```sh
cp -r /tmp/ledger-db /media/
cp ./target/release/full-service /media/
cp ./target/release/mc-full-service /media/
```

1. *OFFLINE MACHINE*: Create a ramdisk to store sensitive material.
Expand All @@ -318,13 +318,13 @@ The recommended flow to get balance and submit transaction is the following:

```sh
cp /media/ledger-db /keyfs/ledger-db
cp /media/full-service /keyfs/full-service
cp /media/mc-full-service /keyfs/mc-full-service
```

1. *OFFLINE MACHINE*: Run full service in offline mode.

```sh
./target/release/full-service \
./target/release/mc-full-service \
--wallet-db /keyfs/wallet.db \
--ledger-db /keyfs/ledger-db/ \
--offline \
Expand Down
4 changes: 2 additions & 2 deletions docs/tutorials/environment-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ description: Set up your environment to run full service on Mac or Linux.

```text
mkdir -p testnet-dbs
RUST_LOG=info,mc_connection=info,mc_ledger_sync=info ./full-service \
RUST_LOG=info,mc_connection=info,mc_ledger_sync=info ./mc-full-service \
--wallet-db ./testnet-dbs/wallet.db \
--ledger-db ./testnet-dbs/ledger-db/ \
--peer mc://node1.test.mobilecoin.com/ \
Expand All @@ -35,7 +35,7 @@ description: Set up your environment to run full service on Mac or Linux.

```text
mkdir -p mainnet-dbs
RUST_LOG=info,mc_connection=info,mc_ledger_sync=info ./full-service \
RUST_LOG=info,mc_connection=info,mc_ledger_sync=info ./mc-full-service \
--wallet-db ./mainnet-dbs/wallet.db \
--ledger-db ./mainnet-dbs/ledger-db/ \
--peer mc://node1.prod.mobilecoinww.com/ \
Expand Down
2 changes: 1 addition & 1 deletion full-service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition = "2018"
build = "build.rs"

[[bin]]
name = "full-service"
name = "mc-full-service"
path = "src/bin/main.rs"

[dependencies]
Expand Down