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

Fix rusk-wallet binary building #2170

Merged
merged 4 commits into from
Aug 21, 2024
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
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
Loading