From 287c45d6b5857273d0d6cd79d241c87e8c3cb8d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20H=C3=A4ggblad?= Date: Thu, 16 Jun 2022 16:45:33 +0200 Subject: [PATCH] ci: add nym-connect rust to build (#1378) * ci: add nym-connect rust to build * rustfmt * connect: add gitkeep in dist dir * wallet: dont trigger connect on pull_request * github: libayatana-indicator3-dev * github: libayatana-appindicator3-dev --- .github/workflows/connect.yml | 56 +++++++++++++++++++++++++ nym-connect/dist/.gitkeep | 0 nym-connect/src-tauri/src/config/mod.rs | 4 +- 3 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/connect.yml create mode 100644 nym-connect/dist/.gitkeep diff --git a/.github/workflows/connect.yml b/.github/workflows/connect.yml new file mode 100644 index 0000000000..292fee7482 --- /dev/null +++ b/.github/workflows/connect.yml @@ -0,0 +1,56 @@ +name: Nym Connect (rust) + +on: + push: + paths-ignore: + - 'explorer/**' + +jobs: + build: + runs-on: [ self-hosted, custom-linux ] + env: + RUSTC_WRAPPER: /home/ubuntu/.cargo/bin/sccache + steps: + - 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 squashfs-tools libayatana-appindicator3-dev + + - name: Check out repository code + uses: actions/checkout@v2 + + - name: Install rust toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + components: rustfmt, clippy + + - name: Build all binaries + uses: actions-rs/cargo@v1 + with: + command: build + args: --manifest-path nym-connect/Cargo.toml --workspace + + - name: Run all tests + uses: actions-rs/cargo@v1 + with: + command: test + args: --manifest-path nym-connect/Cargo.toml --workspace + + - name: Check formatting + uses: actions-rs/cargo@v1 + with: + command: fmt + args: --manifest-path nym-connect/Cargo.toml --all -- --check + + - uses: actions-rs/clippy-check@v1 + name: Clippy checks + with: + token: ${{ secrets.GITHUB_TOKEN }} + args: --manifest-path nym-connect/Cargo.toml --workspace --all-features + + - name: Run clippy + uses: actions-rs/cargo@v1 + with: + command: clippy + args: --manifest-path nym-connect/Cargo.toml --workspace --all-features -- -D warnings diff --git a/nym-connect/dist/.gitkeep b/nym-connect/dist/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/nym-connect/src-tauri/src/config/mod.rs b/nym-connect/src-tauri/src/config/mod.rs index e807bc9515..b2dfb2840f 100644 --- a/nym-connect/src-tauri/src/config/mod.rs +++ b/nym-connect/src-tauri/src/config/mod.rs @@ -56,7 +56,9 @@ pub async fn init_socks5(provider_address: &str, chosen_gateway_id: Option<&str> .await; info!("Setting gateway endpoint"); - config.get_base_mut().with_gateway_endpoint(gateway_details.into()); + config + .get_base_mut() + .with_gateway_endpoint(gateway_details.into()); info!("Insert gateway shared key"); key_manager.insert_gateway_shared_key(shared_keys);