-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2144 from dusk-network/move-wallet-cli-to-rusk
Move rusk-wallet to rusk monorepo
- Loading branch information
Showing
38 changed files
with
6,746 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
name: Compile CLI wallet binaries | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
dusk_blockchain_ref: | ||
description: "GIT branch, ref, or SHA to checkout" | ||
required: true | ||
default: "main" | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
build_and_publish: | ||
name: Build rusk-wallet binaries for ${{ matrix.os }} with ${{ matrix.compiler }}. | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-20.04, ubuntu-22.04, macos-latest, macos-11, windows-latest] | ||
compiler: [cargo] | ||
include: | ||
- os: ubuntu-20.04 | ||
compiler: cargo | ||
target: linux-x64 | ||
|
||
- os: ubuntu-22.04 | ||
compiler: cargo | ||
target: linux-x64-libssl3 | ||
|
||
- os: macos-latest | ||
compiler: cargo | ||
target: macos-intel | ||
|
||
- os: macos-11 | ||
compiler: cargo | ||
target: macos-arm64 | ||
flags: --target=aarch64-apple-darwin | ||
platform: aarch64-apple-darwin | ||
|
||
- os: windows-latest | ||
compiler: cargo | ||
target: windows-x64 | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.inputs.dusk_blockchain_ref }} | ||
|
||
- name: Install dependencies | ||
uses: dsherret/rust-toolchain-file@v1 | ||
|
||
- name: Add arm target for Apple Silicon build | ||
run: rustup target add aarch64-apple-darwin | ||
if: ${{ matrix.os == 'macos-11' }} | ||
|
||
- name: Build Wallet | ||
shell: bash | ||
working-directory: ./ | ||
run: ${{matrix.compiler}} b --release --verbose ${{matrix.flags}} | ||
|
||
- name: Get semver from wallet binary | ||
run: | | ||
ls -la target/release | ||
export SEMVER=$(cargo pkgid | perl -lpe 's/.*\@(.*)/$1/') | ||
echo "SEMVER=$SEMVER" >> $GITHUB_ENV | ||
- name: "Pack binaries" | ||
run: | | ||
mkdir rusk-wallet${{env.SEMVER}}-${{matrix.target}} | ||
echo "Fetching changelog and readme files..." | ||
mv target/${{matrix.platform}}/release/rusk-wallet rusk-wallet${{env.SEMVER}}-${{matrix.target}} | ||
cp CHANGELOG.md rusk-wallet${{env.SEMVER}}-${{matrix.target}} | ||
cp README.md rusk-wallet${{env.SEMVER}}-${{matrix.target}} | ||
tar -czvf ruskwallet${{env.SEMVER}}-${{matrix.target}}.tar.gz rusk-wallet${{env.SEMVER}}-${{matrix.target}} | ||
ls -la *.gz | ||
- name: "Upload Wallet Artifacts" | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: wallet-binaries-${{env.SEMVER}} | ||
path: | | ||
./*.gz | ||
retention-days: 5 |
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,96 @@ | ||
name: rusk-wallet CI | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
- reopened | ||
- ready_for_review | ||
|
||
jobs: | ||
# JOB to run change detection | ||
changes: | ||
runs-on: ubuntu-latest | ||
# Required permissions | ||
permissions: | ||
pull-requests: read | ||
# Set job outputs to values from filter step | ||
outputs: | ||
run-ci: ${{ steps.filter.outputs.run-ci }} | ||
steps: | ||
# For pull requests it's not necessary to checkout the code | ||
- uses: dorny/paths-filter@v3 | ||
id: filter | ||
with: | ||
filters: | | ||
run-ci: | ||
- 'rusk-wallet/**' | ||
- '.github/workflows/ruskwallet_ci.yml' | ||
fmt: | ||
name: Rustfmt | ||
runs-on: core | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dsherret/rust-toolchain-file@v1 | ||
- run: cargo fmt --all -- --check | ||
|
||
analyze: | ||
name: Dusk Analyzer | ||
runs-on: core | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dsherret/rust-toolchain-file@v1 | ||
- run: cargo install --git https://github.com/dusk-network/cargo-dusk-analyzer | ||
- run: cargo dusk-analyzer | ||
|
||
test_nightly-linux: | ||
name: "[Linux] Nightly tests" | ||
runs-on: core | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dsherret/rust-toolchain-file@v1 | ||
- run: cargo test --release | ||
working-directory: ./rusk-wallet | ||
- run: cargo clippy --all-features --release -- -D warnings | ||
working-directory: ./rusk-wallet | ||
|
||
test_nightly-macintel: | ||
name: "[Mac Intel] Nightly tests" | ||
runs-on: macos-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dsherret/rust-toolchain-file@v1 | ||
|
||
- name: Add arm target for Apple Silicon build | ||
run: rustup target add aarch64-apple-darwin | ||
|
||
- run: cargo test --release | ||
working-directory: ./rusk-wallet | ||
|
||
test_nightly-macm1: | ||
name: "[Mac arm64] Nightly checks" | ||
runs-on: macos-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dsherret/rust-toolchain-file@v1 | ||
|
||
- name: Add arm target for Apple Silicon build | ||
run: rustup target add aarch64-apple-darwin | ||
|
||
- run: cargo check --target=aarch64-apple-darwin --release | ||
working-directory: ./rusk-wallet | ||
|
||
test_nightly-win: | ||
name: "[Windows] Nightly tests" | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dsherret/rust-toolchain-file@v1 | ||
|
||
- run: cargo test --release | ||
working-directory: ./rusk-wallet |
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
Oops, something went wrong.