Compare commits

...

8 Commits

Author SHA1 Message Date
Tommy Verrall 3a80b9bf59 update branch for latest changes 2023-04-25 12:53:45 +02:00
durch 237597da90 Remove dependency 2023-04-12 14:33:01 +02:00
durch 8000100735 Log to $HOME/.nym/logs 2023-04-12 13:53:43 +02:00
durch 68b8993e84 Merge branch 'feature/cpu-mixnode-build' of https://github.com/nymtech/nym into feature/cpu-mixnode-build 2023-04-12 09:21:58 +02:00
durch 3a897ed08e Log if measurement is ON or OFF 2023-04-12 09:21:51 +02:00
Tommy Verrall 18a24fc10d update cpu-cycles 2023-04-12 09:20:30 +02:00
Tommy Verrall dfcf812243 change the binary build 2023-04-12 09:19:11 +02:00
Tommy Verrall bdc91bb324 build only the mixnode binary with cpu-cycles 2023-04-06 10:08:38 +02:00
4 changed files with 9 additions and 51 deletions
@@ -4,34 +4,11 @@ on:
workflow_dispatch: workflow_dispatch:
push: push:
paths: paths:
- 'clients/**'
- 'common/**'
- 'contracts/**'
- 'explorer-api/**'
- 'gateway/**'
- 'integrations/**'
- 'mixnode/**' - 'mixnode/**'
- 'sdk/rust/nym-sdk/**'
- 'service-providers/**'
- 'nym-api/**'
- 'nym-outfox/**'
- 'tools/nym-cli/**'
- 'tools/ts-rs-cli/**'
pull_request: pull_request:
paths: paths:
- 'clients/**'
- 'common/**'
- 'contracts/**'
- 'explorer-api/**'
- 'gateway/**'
- 'integrations/**'
- 'mixnode/**' - 'mixnode/**'
- 'sdk/rust/nym-sdk/**'
- 'service-providers/**'
- 'nym-api/**'
- 'nym-outfox/**'
- 'tools/nym-cli/**'
- 'tools/ts-rs-cli/**'
env: env:
NETWORK: mainnet NETWORK: mainnet
@@ -65,11 +42,11 @@ jobs:
with: with:
toolchain: stable toolchain: stable
- name: Build all binaries - name: Build all mixnode binary
uses: actions-rs/cargo@v1 uses: actions-rs/cargo@v1
with: with:
command: build command: build
args: --workspace --release --all args: --manifest-path mixnode/Cargo.toml --release --features cpucycles
- name: Install Rust stable - name: Install Rust stable
uses: actions-rs/toolchain@v1 uses: actions-rs/toolchain@v1
@@ -79,34 +56,12 @@ jobs:
override: true override: true
components: rustfmt, clippy components: rustfmt, clippy
- name: Install wasm-opt
run: cargo install --version 0.112.0 wasm-opt
- name: Build release contracts
run: make wasm
- name: Prepare build output - name: Prepare build output
shell: bash shell: bash
env: env:
OUTPUT_DIR: ci-builds/${{ github.ref_name }} OUTPUT_DIR: ci-builds/${{ github.ref_name }}
run: | run: |
cp target/release/nym-client $OUTPUT_DIR
cp target/release/nym-gateway $OUTPUT_DIR
cp target/release/nym-mixnode $OUTPUT_DIR cp target/release/nym-mixnode $OUTPUT_DIR
cp target/release/nym-socks5-client $OUTPUT_DIR
cp target/release/nym-api $OUTPUT_DIR
cp target/release/nym-network-requester $OUTPUT_DIR
cp target/release/nym-network-statistics $OUTPUT_DIR
cp target/release/nym-cli $OUTPUT_DIR
cp target/release/nym-credential-client $OUTPUT_DIR
cp target/release/explorer-api $OUTPUT_DIR
cp contracts/target/wasm32-unknown-unknown/release/mixnet_contract.wasm $OUTPUT_DIR
cp contracts/target/wasm32-unknown-unknown/release/vesting_contract.wasm $OUTPUT_DIR
cp contracts/target/wasm32-unknown-unknown/release/nym_coconut_bandwidth.wasm $OUTPUT_DIR
cp contracts/target/wasm32-unknown-unknown/release/nym_coconut_dkg.wasm $OUTPUT_DIR
cp contracts/target/wasm32-unknown-unknown/release/cw3_flex_multisig.wasm $OUTPUT_DIR
cp contracts/target/wasm32-unknown-unknown/release/cw4_group.wasm $OUTPUT_DIR
- name: Deploy branch to CI www - name: Deploy branch to CI www
continue-on-error: true continue-on-error: true
Generated
-1
View File
@@ -3626,7 +3626,6 @@ dependencies = [
"cfg-if", "cfg-if",
"clap 4.1.11", "clap 4.1.11",
"colored", "colored",
"cpu-cycles",
"cupid", "cupid",
"dirs", "dirs",
"futures", "futures",
-1
View File
@@ -57,7 +57,6 @@ nym-types = { path = "../common/types" }
nym-topology = { path = "../common/topology" } nym-topology = { path = "../common/topology" }
nym-validator-client = { path = "../common/client-libs/validator-client" } nym-validator-client = { path = "../common/client-libs/validator-client" }
nym-bin-common = { path = "../common/bin-common", features = ["output_format"] } nym-bin-common = { path = "../common/bin-common", features = ["output_format"] }
cpu-cycles = { path = "../cpu-cycles", optional = true }
[dev-dependencies] [dev-dependencies]
tokio = { version = "1.21.2", features = [ tokio = { version = "1.21.2", features = [
+6 -1
View File
@@ -51,9 +51,14 @@ fn test_function() {
async fn main() { async fn main() {
cfg_if::cfg_if! { cfg_if::cfg_if! {
if #[cfg(feature = "cpucycles")] { if #[cfg(feature = "cpucycles")] {
setup_tracing!("/tmp/tracing.log"); let home_dir = dirs::home_dir().expect("Could not get $HOME");
let logs_dir = home_dir.join(".nym").join("logs");
let logs_dir_str = logs_dir.to_str().expect("Could not construct logs path");
setup_tracing!(logs_dir_str);
info!("CPU cycles measurement is ON")
} else { } else {
setup_logging(); setup_logging();
info!("CPU cycles measurement is OFF")
} }
} }