Skip to content

Commit

Permalink
Merge branch 'rc-2024.10.3' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
jacderida committed Oct 22, 2024
2 parents 4ffd314 + e6778f9 commit 84212dc
Show file tree
Hide file tree
Showing 261 changed files with 19,848 additions and 35,603 deletions.
760 changes: 380 additions & 380 deletions .github/workflows/benchmark-prs.yml

Large diffs are not rendered by default.

11 changes: 0 additions & 11 deletions .github/workflows/build-release-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,6 @@ on:
description: Set to build a particular tag
type: string

# The key variables also need to be passed to `cross`, which runs in a container and does not
# inherit variables from the parent environment. The `cross` tool is used in the `build`
# job. If any keys are added, the `build-release-artifacts` target in the Justfile must
# also be updated.
env:
GENESIS_PK: ${{ secrets.STABLE_GENESIS_PK }}
GENESIS_SK: ${{ secrets.STABLE_GENESIS_SK }}
FOUNDATION_PK: ${{ secrets.STABLE_FOUNDATION_PK }}
NETWORK_ROYALTIES_PK: ${{ secrets.STABLE_NETWORK_ROYALTIES_PK }}
PAYMENT_FORWARD_PK: ${{ secrets.STABLE_REWARD_FORWARDING_PK }}

jobs:
build:
name: build
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/cross-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

wasm:
if: "!startsWith(github.event.head_commit.message, 'chore(release):')"
name: Wasm builds
name: wasm32-unknown-unknown builds
runs-on: ubuntu-latest

steps:
Expand All @@ -29,10 +29,9 @@ jobs:
- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh

- name: Build client for wasm
# wasm pack doesnt support workspaces
# --dev to avoid a loong optimisation step
run: cd sn_client && wasm-pack build --dev
- name: Build WASM package
# --dev to avoid optimisation
run: wasm-pack build --dev --target=web autonomi
timeout-minutes: 30

websocket:
Expand Down
35 changes: 13 additions & 22 deletions .github/workflows/generate-benchmark-charts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ permissions:
env:
CARGO_INCREMENTAL: "0"
RUST_BACKTRACE: 1
CLIENT_DATA_PATH: /home/runner/.local/share/safe/client
CLIENT_DATA_PATH: /home/runner/.local/share/safe/autonomi
NODE_DATA_PATH: /home/runner/.local/share/safe/node

jobs:
Expand Down Expand Up @@ -45,43 +45,29 @@ jobs:
shell: bash
run: wget https://sn-node.s3.eu-west-2.amazonaws.com/the-test-data.zip

- name: Build node and client
run: cargo build --release --features local-discovery --bin safenode --bin safe
timeout-minutes: 30

- name: Build faucet bin
run: cargo build --release --bin faucet --features local-discovery --features gifting
- name: Build node and cli binaries
run: cargo build --release --features local --bin safenode --bin autonomi
timeout-minutes: 30

- name: Start a local network
uses: maidsafe/sn-local-testnet-action@main
env:
SN_LOG: "all"
with:
action: start
interval: 2000
enable-evm-testnet: true
node-path: target/release/safenode
faucet-path: target/release/faucet
platform: ubuntu-latest
build: true

- name: Create and fund a wallet to pay for files storage
run: |
cargo run --bin faucet --release -- --log-output-dest=data-dir send 1000000 $(cargo run --bin safe --release -- wallet address | tail -n 1) | tail -n 1 > transfer_hex
cargo run --bin safe --release -- wallet receive --file transfer_hex
env:
SN_LOG: "all"
timeout-minutes: 10
sn-log: "all"

########################
### Benchmark ###
########################
- name: Bench `safe` cli
- name: Bench `autonomi` cli
shell: bash
# Criterion outputs the actual bench results to stderr "2>&1 tee output.txt" takes stderr,
# passes to tee which displays it in the terminal and writes to output.txt
run: |
cargo criterion --features=local-discovery --message-format=json 2>&1 -p sn_cli | tee -a output.txt
cargo criterion --features=local --message-format=json 2>&1 -p autonomi | tee -a output.txt
cat output.txt | rg benchmark-complete | jq -s 'map({
name: (.id | split("/"))[-1],
unit: "MiB/s",
Expand All @@ -107,9 +93,14 @@ jobs:
auto-push: true
max-items-in-chart: 300

# FIXME: do this in a generic way for localtestnets
- name: export default secret key
run: echo "SECRET_KEY=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" >> $GITHUB_ENV
shell: bash

- name: Start a client instance to compare memory usage
shell: bash
run: cargo run --bin safe --release -- --log-output-dest=data-dir files upload the-test-data.zip --retry-strategy quick
run: cargo run --bin autonomi --release -- --log-output-dest=data-dir file upload the-test-data.zip
env:
SN_LOG: "all"

Expand Down
Loading

0 comments on commit 84212dc

Please sign in to comment.