From 0523ccdce8d0449c030672dc667317bb063a2976 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20H=C3=A4ggblad?= Date: Thu, 5 May 2022 13:58:07 +0200 Subject: [PATCH] workflow: add wallet rust ci job (#1251) * workflow: add wallet rust ci job * workflow: remove not used matrix file * workflow: add wallet rust part to nightly build * workflow: add nym-wallet to step names * workflow: tweak wallet names * workflow: run on ubuntu-latest * workflow: skip sccache * workflow: tweak name * workflow: switch back to self-hosted tag --- .github/workflows/nightly_build.yml | 27 ++++++++++++++ .github/workflows/wallet.yml | 57 +++++++++++++++++++++++++++++ 2 files changed, 84 insertions(+) create mode 100644 .github/workflows/wallet.yml diff --git a/.github/workflows/nightly_build.yml b/.github/workflows/nightly_build.yml index 73a5feca5a..6a417bf036 100644 --- a/.github/workflows/nightly_build.yml +++ b/.github/workflows/nightly_build.yml @@ -100,6 +100,33 @@ jobs: with: command: clippy args: --workspace --all-targets --features=coconut -- -D warnings + + # nym-wallet (the rust part) + - name: Build nym-wallet rust code + uses: actions-rs/cargo@v1 + with: + command: build + args: --manifest-path nym-wallet --workspace + + - name: Run nym-wallet tests + uses: actions-rs/cargo@v1 + with: + command: test + args: --manifest-path nym-wallet --workspace + + - name: Check nym-wallet formatting + uses: actions-rs/cargo@v1 + with: + command: fmt + args: --manifest-path nym-wallet --all -- --check + + - name: Run clippy for nym-wallet + uses: actions-rs/cargo@v1 + if: ${{ matrix.rust != 'nightly' }} + with: + command: clippy + args: --manifest-path nym-wallet --workspace --all-targets -- -D warnings + notification: needs: build runs-on: ubuntu-latest diff --git a/.github/workflows/wallet.yml b/.github/workflows/wallet.yml new file mode 100644 index 0000000000..2dbc56b817 --- /dev/null +++ b/.github/workflows/wallet.yml @@ -0,0 +1,57 @@ +name: Nym Wallet (rust) + +on: + push: + paths-ignore: + - 'explorer/**' + pull_request: + paths-ignore: + - 'explorer/**' + +jobs: + build: + runs-on: [ self-hosted, custom-linux-exoscale ] + 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 + + - 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-wallet/Cargo.toml --workspace + + - name: Run all tests + uses: actions-rs/cargo@v1 + with: + command: test + args: --manifest-path nym-wallet/Cargo.toml --workspace + + - name: Check formatting + uses: actions-rs/cargo@v1 + with: + command: fmt + args: --manifest-path nym-wallet/Cargo.toml --all -- --check + + - uses: actions-rs/clippy-check@v1 + name: Clippy checks + with: + token: ${{ secrets.GITHUB_TOKEN }} + args: --manifest-path nym-wallet/Cargo.toml --workspace --all-features + + - name: Run clippy + uses: actions-rs/cargo@v1 + with: + command: clippy + args: --manifest-path nym-wallet/Cargo.toml --workspace --all-features -- -D warnings