Skip to content

Commit

Permalink
Merge pull request #2170 from dusk-network/fix-rusk-wallet-build
Browse files Browse the repository at this point in the history
  • Loading branch information
Daksh14 authored Aug 21, 2024
2 parents fd0cb14 + 66e7ed4 commit 2753374
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/ruskwallet_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
dusk_blockchain_ref:
description: "GIT branch, ref, or SHA to checkout"
required: true
default: "main"
default: "master"

defaults:
run:
Expand All @@ -18,7 +18,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04, macos-latest, macos-11, windows-latest]
os: [ubuntu-20.04, ubuntu-22.04, macos-latest, macos-12, windows-latest]
compiler: [cargo]
include:
- os: ubuntu-20.04
Expand All @@ -33,7 +33,7 @@ jobs:
compiler: cargo
target: macos-intel

- os: macos-11
- os: macos-12
compiler: cargo
target: macos-arm64
flags: --target=aarch64-apple-darwin
Expand All @@ -54,26 +54,26 @@ jobs:

- name: Add arm target for Apple Silicon build
run: rustup target add aarch64-apple-darwin
if: ${{ matrix.os == 'macos-11' }}
if: ${{ matrix.os == 'macos-12' }}

- name: Build Wallet
shell: bash
working-directory: ./
working-directory: ./rusk-wallet
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/')
export SEMVER=$(cargo pkgid --mainfest-path ./rusk-wallet/Cargo.toml | 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}}
cp ./rusk-wallet/CHANGELOG.md rusk-wallet${{env.SEMVER}}-${{matrix.target}}
cp ./rusk-wallet/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
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/ruskwallet_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ jobs:
- 'rusk-wallet/**'
- '.github/workflows/ruskwallet_ci.yml'
fmt:
needs: changes
if: needs.changes.outputs.run-ci == 'true'
name: Rustfmt
runs-on: core
steps:
Expand All @@ -36,6 +38,8 @@ jobs:
- run: cargo fmt --all -- --check

analyze:
needs: changes
if: needs.changes.outputs.run-ci == 'true'
name: Dusk Analyzer
runs-on: core
steps:
Expand All @@ -45,6 +49,8 @@ jobs:
- run: cargo dusk-analyzer

test_nightly-linux:
needs: changes
if: needs.changes.outputs.run-ci == 'true'
name: "[Linux] Nightly tests"
runs-on: core

Expand All @@ -57,6 +63,8 @@ jobs:
working-directory: ./rusk-wallet

test_nightly-macintel:
needs: changes
if: needs.changes.outputs.run-ci == 'true'
name: "[Mac Intel] Nightly tests"
runs-on: macos-latest

Expand All @@ -71,6 +79,8 @@ jobs:
working-directory: ./rusk-wallet

test_nightly-macm1:
needs: changes
if: needs.changes.outputs.run-ci == 'true'
name: "[Mac arm64] Nightly checks"
runs-on: macos-latest

Expand All @@ -85,6 +95,8 @@ jobs:
working-directory: ./rusk-wallet

test_nightly-win:
needs: changes
if: needs.changes.outputs.run-ci == 'true'
name: "[Windows] Nightly tests"
runs-on: windows-latest

Expand Down

0 comments on commit 2753374

Please sign in to comment.