Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit afbcf9e
Author: starkbamse <139136798+starkbamse@users.noreply.github.com>
Date:   Fri Sep 6 05:40:53 2024 +0200

    Change directory back to repo root & Fix Rust v1.81 lints (kaspanet#545)

    * Change directory back to repodir

    Change directory back to repodir after building toolchain

    * Clippy

    * Update crypto/txscript/src/caches.rs

    Co-authored-by: Maxim <59533214+biryukovmaxim@users.noreply.github.com>

    * Update crypto/txscript/src/caches.rs

    * rename `is_none_or` -> `is_none_or_ex` to avoid conflict with future std

    * remove `use std::mem::size_of` wherever possible (added to std prelude recently)

    ---------

    Co-authored-by: Maxim <59533214+biryukovmaxim@users.noreply.github.com>
    Co-authored-by: Michael Sutton <msutton@cs.huji.ac.il>

commit 06a874f
Author: starkbamse <139136798+starkbamse@users.noreply.github.com>
Date:   Thu Sep 5 18:51:04 2024 +0200

    Deprecate zigbuild and glibc in favor of static musl binaries for Linux builds. (kaspanet#541)

    * CTNG Config file, Musl build instructions

    - Crosstools-ng configuration file for quick reproducable builds on musl.
    - Instructions for how to build RK on musl.

    * Test

    * Update ci.yaml

    * Test crosstools install

    * Cache ct-ng build

    * Update ci.yaml

    * Update ci.yaml

    * Update ci.yaml

    * Update ci.yaml

    * Update ci.yaml

    * Update ci.yaml

    * Update ci.yaml

    * Update ci.yaml

    * Update ci.yaml

    * Update ci.yaml

    * Update ci.yaml

    * Update ci.yaml

    * Fix error in command

    * Update ci.yaml

    * Update ci.yaml

    * Update ci.yaml

    * Update ci.yaml

    * Update ci.yaml

    * Update ci.yaml

    * Update ci.yaml

    * Update ci.yaml

    * Update ci.yaml

    * Update ci.yaml

    * Comments, naming

    * Update ci.yaml

    * Update ci.yaml

    * Update ci.yaml

    * Merge new musl build with old CI, Release builds

    - Merges the old CI script with the new musl build.
    - Update deploy.yaml to use updated musl toolchain to build musl target for linux.

    * Move to workspace

    * Delete musl-build.md

    * Lock to ctng version 1.26

    * Checkout fix

    * Revert master change

    * Indentation

    * Revert "Indentation"

    This reverts commit 6a7e6c0.

    * Revert "Revert master change"

    This reverts commit 1a047e4.

    * Update ci.yaml

    * Force mimalloc

    * Compress into script

    * Fix typo

    * Update build.sh

    * Replace bloaded config file

    * Update build.sh

    * Update build.sh

    * Source script

    * Revert vendor

    * Update defconfig

    * Update defconfig

    * Update defconfig

    * Update build.sh

    * Update build.sh

    * Update build.sh

    * Update build.sh

    * Update defconfig

    * Delete defconfig

    * Create defconfig

    * Update build.sh

    * Deprecate config, use default preset

    * Update build.sh

    * Add preset hash logic in script

    * Move preset hash update

    Move preset hash update after openssl build

    * Use openssl crate

    * Update exports, cache config

    * Remove spaces in export command

    * Update names

    Should not trigger cache

    * Move source preset

    * CD before preset

    * Add comment

    Adds comment and should invalidate cache.

commit b04092e
Author: aspect <anton.yemelyanov@gmail.com>
Date:   Thu Sep 5 18:00:24 2024 +0300

    add proxy limit field to sysinfo (kaspanet#544)

commit f866dfa
Author: Michael Sutton <msutton@cs.huji.ac.il>
Date:   Thu Sep 5 14:04:16 2024 +0300

    Various miscellaneous changes towards 0.15.1 RC2 (kaspanet#543)

    * infrequent logs should be debug

    * cleanup some todos

    * when a network starts, genesis has a body, so there's no need for a special exception

    * remove unneeded method and add an error just in case it is added in the future

    * count and log chain disqualified blocks

    * count and log mempool evictions

    * bump version to 0.14.5
  • Loading branch information
michaelsutton committed Sep 6, 2024
1 parent fd9e93d commit 81fe3d1
Show file tree
Hide file tree
Showing 50 changed files with 426 additions and 242 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 81fe3d1

Please sign in to comment.