Skip to content

Commit

Permalink
Merge branch 'dev' into utxo-counts
Browse files Browse the repository at this point in the history
  • Loading branch information
D-Stacks authored Sep 10, 2024
2 parents 8be0e84 + d1dc5dd commit a1f3726
Show file tree
Hide file tree
Showing 66 changed files with 856 additions and 493 deletions.
30 changes: 19 additions & 11 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -353,9 +353,8 @@ jobs:
with:
name: kaspa-wasm32-sdk-${{ env.SHORT_SHA }}.zip
path: wasm/release/kaspa-wasm32-sdk-${{ env.SHORT_SHA }}.zip

build-release:
name: Build Ubuntu Release
name: Build Linux Release
runs-on: ubuntu-latest
steps:
- name: Checkout sources
Expand All @@ -369,7 +368,7 @@ jobs:
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable

- name: Cache
- name: Cache Cargo Build Outputs
uses: actions/cache@v4
with:
path: |
Expand All @@ -379,14 +378,23 @@ jobs:
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Cache Toolchain
uses: actions/cache@v4
with:
path: |
~/x-tools
key: ${{ runner.os }}-musl-${{ hashFiles('**/musl-toolchain/preset.sh') }}
restore-keys: |
${{ runner.os }}-musl-
- name: Install zig
if: runner.os == 'Linux'
uses: goto-bus-stop/setup-zig@v2 # needed for cargo-zigbuild

- name: Build on Linux
- name: Build RK with musl toolchain
if: runner.os == 'Linux'
# We're using musl to make the binaries statically linked and portable
run: |
cargo install cargo-zigbuild
cargo --verbose zigbuild --bin kaspad --bin simpa --bin rothschild --release --target x86_64-unknown-linux-gnu.2.27 # Use an older glibc version
# Run build script for musl toolchain
source musl-toolchain/build.sh
# Build for musl
cargo --verbose build --bin kaspad --bin rothschild --bin kaspa-wallet --release --target x86_64-unknown-linux-musl
34 changes: 22 additions & 12 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable

- name: Cache
- name: Cache Cargo Build Outputs
uses: actions/cache@v3
with:
path: |
Expand All @@ -40,23 +40,33 @@ jobs:
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Install zig on linux
if: runner.os == 'Linux'
uses: goto-bus-stop/setup-zig@v2 # needed for cargo-zigbuild
- name: Cache Toolchain
uses: actions/cache@v4
with:
path: |
~/x-tools
key: ${{ runner.os }}-musl-${{ hashFiles('**/musl-toolchain/preset.sh') }}
restore-keys: |
${{ runner.os }}-musl-
- name: Build on Linux
if: runner.os == 'Linux'
# We're using musl to make the binaries statically linked and portable
run: |
cargo install cargo-zigbuild
cargo --verbose zigbuild --bin kaspad --bin simpa --bin rothschild --bin kaspa-wallet --release --target x86_64-unknown-linux-gnu.2.27 # Use an older glibc version
# Run build script for musl toolchain
source musl-toolchain/build.sh
# Go back to the workspace
cd $GITHUB_WORKSPACE
# Build for musl
cargo --verbose build --bin kaspad --bin rothschild --bin kaspa-wallet --release --target x86_64-unknown-linux-musl
mkdir bin || true
cp target/x86_64-unknown-linux-gnu/release/kaspad bin/
cp target/x86_64-unknown-linux-gnu/release/simpa bin/
cp target/x86_64-unknown-linux-gnu/release/rothschild bin/
cp target/x86_64-unknown-linux-gnu/release/kaspa-wallet bin/
archive="bin/rusty-kaspa-${{ github.event.release.tag_name }}-linux-gnu-amd64.zip"
asset_name="rusty-kaspa-${{ github.event.release.tag_name }}-linux-gnu-amd64.zip"
cp target/x86_64-unknown-linux-musl/release/kaspad bin/
cp target/x86_64-unknown-linux-musl/release/rothschild bin/
cp target/x86_64-unknown-linux-musl/release/kaspa-wallet bin/
archive="bin/rusty-kaspa-${{ github.event.release.tag_name }}-linux-musl-amd64.zip"
asset_name="rusty-kaspa-${{ github.event.release.tag_name }}-linux-musl-amd64.zip"
zip -r "${archive}" ./bin/*
echo "archive=${archive}" >> $GITHUB_ENV
echo "asset_name=${asset_name}" >> $GITHUB_ENV
Expand Down
Loading

0 comments on commit a1f3726

Please sign in to comment.