Compare commits

...

7 Commits

Author SHA1 Message Date
Tommy Verrall fd516d4633 Merge branch 'feature/mixnode-sandbox-cycles' of https://github.com/nymtech/nym into feature/mixnode-sandbox-cycles 2023-12-20 17:04:20 +01:00
Tommy Verrall a12ade1ecf warnings on ci 2023-12-20 16:56:12 +01:00
Tommy Verrall 458a2c5e42 Update build-upload-binaries.yml
remove noise
2023-12-20 16:40:02 +01:00
Tommy Verrall ecaa970380 Update build-upload-binaries.yml
update build binary for this branch
2023-12-20 16:38:54 +01:00
Tommy Verrall 42e3064cbb Merge pull request #4266 from nymtech/mixnode-tokio-console
Add tokio-console feature
2023-12-20 15:20:56 +00:00
durch 0d5f594a69 Fix feature name 2023-12-20 16:16:45 +01:00
durch 826db30d2b Add tokio-console feature 2023-12-20 16:15:18 +01:00
3 changed files with 47 additions and 34 deletions
+36 -33
View File
@@ -1,16 +1,10 @@
name: build-upload-binaries
name: ci-build-upload-binaries
on:
workflow_dispatch:
inputs:
add_tokio_unstable:
description: 'True to add RUSTFLAGS="--cfg tokio_unstable"'
required: true
default: false
type: boolean
env:
NETWORK: mainnet
pull_request:
paths:
- 'mixnode/**'
jobs:
publish-nym:
@@ -22,40 +16,49 @@ jobs:
runs-on: ${{ matrix.platform }}
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: "--cfg tokio_unstable"
steps:
- uses: actions/checkout@v3
- name: Install Dependencies (Linux)
run: sudo apt-get update && sudo apt-get -y install libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev libudev-dev squashfs-tools
continue-on-error: true
- name: Sets env vars for tokio if set in manual dispatch inputs
- name: Prepare build output directory
shell: bash
env:
OUTPUT_DIR: ci-builds/${{ github.ref_name }}
run: |
echo 'RUSTFLAGS="--cfg tokio_unstable"' >> $GITHUB_ENV
if: github.event_name == 'workflow_dispatch' && inputs.add_tokio_unstable == true
rm -rf ci-builds || true
mkdir -p $OUTPUT_DIR
echo $OUTPUT_DIR
- name: Install Dependencies (Linux)
run: sudo apt update && sudo apt install libudev-dev
- name: Install Rust stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Build all binaries
- name: Build mixnode binary
uses: actions-rs/cargo@v1
with:
command: build
args: --workspace --release
args: --release --features cpucycles --package nym-mixnode
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: nym-binaries-artifacts
path: |
target/release/nym-client
target/release/nym-gateway
target/release/nym-mixnode
target/release/nym-socks5-client
target/release/nym-api
target/release/nym-network-requester
target/release/nym-network-statistics
target/release/nym-cli
retention-days: 30
- name: Prepare build output
shell: bash
env:
OUTPUT_DIR: ci-builds/${{ github.ref_name }}
run: |
cp target/release/nym-mixnode $OUTPUT_DIR
- name: Deploy branch to CI www
continue-on-error: true
uses: easingthemes/ssh-deploy@main
env:
SSH_PRIVATE_KEY: ${{ secrets.CI_WWW_SSH_PRIVATE_KEY }}
ARGS: "-avzr"
SOURCE: "ci-builds/"
REMOTE_HOST: ${{ secrets.CI_WWW_REMOTE_HOST }}
REMOTE_USER: ${{ secrets.CI_WWW_REMOTE_USER }}
TARGET: ${{ secrets.CI_WWW_REMOTE_TARGET }}/builds/
EXCLUDE: "/dist/, /node_modules/"
+4
View File
@@ -35,6 +35,7 @@ serde_json = { workspace = true }
sysinfo = "0.27.7"
tokio = { workspace = true, features = ["rt-multi-thread", "net", "signal"] }
tokio-util = { workspace = true, features = ["codec"] }
console-subscriber = { version = "0.2", optional = true }
toml = "0.5.8"
url = { workspace = true, features = ["serde"] }
cfg-if = "1.0.0"
@@ -83,6 +84,9 @@ cpucycles = [
"nym-bin-common/tracing",
]
# build with RUSTFLAGS="--cfg tokio_unstable"
tokio-console = ["console-subscriber", "tokio/tracing"]
[package.metadata.deb]
name = "nym-mixnode"
maintainer-scripts = "debian"
+7 -1
View File
@@ -4,7 +4,7 @@
use ::nym_config::defaults::setup_env;
use clap::{crate_name, crate_version, Parser};
use lazy_static::lazy_static;
use log::info;
use log::{error, info};
use nym_bin_common::bin_info;
#[allow(unused_imports)]
@@ -53,6 +53,12 @@ fn test_function() {
#[tokio::main]
async fn main() -> anyhow::Result<()> {
cfg_if::cfg_if! {
if #[cfg(feature = "tokio-console")] {
console_subscriber::init();
}
}
let args = Cli::parse();
setup_env(args.config_env_file.as_ref());