Skip to content

Commit

Permalink
Merge pull request #3983 from nymtech/release/2023.2-bounty
Browse files Browse the repository at this point in the history
Release/2023.2 bounty
  • Loading branch information
tommyv1987 authored Oct 16, 2023
2 parents 2a8ccac + e381e9e commit 3f5ec9e
Show file tree
Hide file tree
Showing 148 changed files with 2,346 additions and 6,833 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build-and-upload-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ jobs:
platform: [ubuntu-20.04]

runs-on: ${{ matrix.platform }}
env:
CARGO_TERM_COLOR: always
steps:
- uses: actions/checkout@v3

Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/ci-build-ts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ name: ci-build-ts
on:
push:
paths:
- 'ts-packages/**'
- "ts-packages/**"
- "sdk/typescript/**"

jobs:
build:
runs-on: custom-runner-linux
runs-on: ubuntu-20.04-16-core
steps:
- uses: actions/checkout@v2
- name: Install rsync
Expand All @@ -20,7 +21,7 @@ jobs:
- name: Setup yarn
run: npm install -g yarn
- name: Build
run: yarn && yarn build && yarn build:ci
run: yarn && yarn build && yarn build:ci:storybook
- name: Deploy branch to CI www (storybook)
continue-on-error: true
uses: easingthemes/ssh-deploy@main
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/ci-build-upload-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ jobs:
platform: [ubuntu-20.04]

runs-on: ${{ matrix.platform }}
env:
CARGO_TERM_COLOR: always
# a push event from the origin repo, or a PR from external repo
if: ${{ github.event_name == 'push' || github.event.pull_request.head.repo.full_name != 'nymtech/nym' }}
steps:
- uses: actions/checkout@v3

Expand Down
32 changes: 22 additions & 10 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,25 @@ on:
- 'tools/nym-nr-query/**'
- 'tools/ts-rs-cli/**'
- 'Cargo.toml'
workflow_dispatch:

jobs:
build:
runs-on: [ self-hosted, custom-linux ]
# Enable sccache via environment variable
strategy:
fail-fast: false
matrix:
os: [custom-linux, custom-runner-mac-m1]
runs-on: ${{ matrix.os }}
env:
RUSTC_WRAPPER: /home/ubuntu/.cargo/bin/sccache
CARGO_TERM_COLOR: always
# Enable sccache via environment variable
# 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 libudev-dev squashfs-tools protobuf-compiler
continue-on-error: true
if: matrix.os == 'custom-linux'

- name: Check out repository code
uses: actions/checkout@v2
Expand All @@ -70,36 +78,40 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: build
args: --workspace
# Enable wireguard by default on linux only
args: --workspace --features wireguard

- name: Build all examples
if: matrix.os == 'custom-linux'
uses: actions-rs/cargo@v1
with:
command: build
args: --workspace --examples
args: --workspace --examples --features wireguard

- name: Run all tests
if: matrix.os == 'custom-linux'
uses: actions-rs/cargo@v1
with:
command: test
args: --workspace
args: --workspace --features wireguard

- name: Run expensive tests
if: github.ref == 'refs/heads/develop' || github.event.pull_request.base.ref == 'develop' || github.event.pull_request.base.ref == 'master'
if: (github.ref == 'refs/heads/develop' || github.event.pull_request.base.ref == 'develop' || github.event.pull_request.base.ref == 'master') && matrix.os == 'custom-linux'
uses: actions-rs/cargo@v1
with:
command: test
args: --workspace -- --ignored
args: --workspace --features wireguard -- --ignored

- name: Annotate with clippy checks
if: matrix.os == 'custom-linux'
uses: actions-rs/clippy-check@v1
continue-on-error: true
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --workspace
args: --workspace --features wireguard

- name: Clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --workspace --all-targets -- -D warnings
args: --workspace --all-targets --features wireguard -- -D warnings
6 changes: 1 addition & 5 deletions .github/workflows/ci-contracts-matrix-includes.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,5 @@
{
"rust":"beta",
"runOnEvent":"pull_request"
},
{
"rust":"nightly",
"runOnEvent":"pull_request"
}
]
]
6 changes: 4 additions & 2 deletions .github/workflows/ci-contracts-schema.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: ci-contracts-schema

on:
workflow_dispatch:
push:
paths:
- 'contracts/**'
Expand All @@ -14,6 +15,8 @@ jobs:
check-schema:
name: Generate and check schema
runs-on: custom-runner-linux
env:
CARGO_TERM_COLOR: always
steps:
- name: Check out repository code
uses: actions/checkout@v2
Expand All @@ -23,9 +26,8 @@ jobs:
with:
toolchain: stable


- name: Generate the schema
run: make contract-schema

- name: Check for diff
run: git diff --exit-code -- contracts/*/schema
run: git diff --exit-code -- contracts/**/schema
6 changes: 5 additions & 1 deletion .github/workflows/ci-contracts-upload-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ jobs:
platform: [ubuntu-20.04]

runs-on: ${{ matrix.platform }}
env:
CARGO_TERM_COLOR: always
# a push event from the origin repo, or a PR from external repo
if: ${{ github.event_name == 'push' || github.event.pull_request.head.repo.full_name != 'nymtech/nym' }}
steps:
- uses: actions/checkout@v3

Expand Down Expand Up @@ -49,7 +53,7 @@ jobs:
run: cargo install --version 0.112.0 wasm-opt

- name: Build release contracts
run: make contracts-wasm
run: make contracts

- name: Prepare build output
shell: bash
Expand Down
21 changes: 13 additions & 8 deletions .github/workflows/ci-contracts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- 'contracts/**'
- 'common/**'
pull_request:
paths-ignore:
paths:
- 'contracts/**'
- 'common/**'

Expand All @@ -27,41 +27,46 @@ jobs:
# since it's going to be compiled into wasm, there's absolutely
# no point in running CI on different OS-es
runs-on: ubuntu-20.04
continue-on-error: ${{ matrix.rust == 'nightly' }}
env:
CARGO_TERM_COLOR: always
needs: matrix_prep
strategy:
fail-fast: false
matrix: ${{fromJson(needs.matrix_prep.outputs.matrix)}}
steps:
- uses: actions/checkout@v2

- uses: actions-rs/toolchain@v1
- name: Setup rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
target: wasm32-unknown-unknown
override: true
components: rustfmt, clippy

- uses: actions-rs/cargo@v1
- name: Build contracts
uses: actions-rs/cargo@v1
env:
RUSTFLAGS: '-C link-arg=-s'
with:
command: build
args: --manifest-path contracts/Cargo.toml --workspace --lib --target wasm32-unknown-unknown

- uses: actions-rs/cargo@v1
- name: Run unit tests
uses: actions-rs/cargo@v1
with:
command: test
args: --lib --manifest-path contracts/Cargo.toml

- uses: actions-rs/cargo@v1
- name: Check formatting
uses: actions-rs/cargo@v1
with:
command: fmt
args: --manifest-path contracts/Cargo.toml --all -- --check

- uses: actions-rs/cargo@v1
if: ${{ matrix.rust != 'nightly' }}
- name: Run clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --lib --manifest-path contracts/Cargo.toml --workspace --all-targets -- -D warnings
6 changes: 4 additions & 2 deletions .github/workflows/ci-lint-typescript.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ on:

jobs:
build:
runs-on: custom-runner-linux
runs-on: ubuntu-20.04-16-core
steps:
- uses: actions/checkout@v2
- uses: rlespinasse/[email protected]
Expand All @@ -39,6 +39,8 @@ jobs:
toolchain: stable
- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Install wasm-opt
run: cargo install wasm-opt

- name: Set up Go
uses: actions/setup-go@v4
Expand All @@ -49,7 +51,7 @@ jobs:
run: yarn

- name: Build packages
run: yarn build:ci:sdk
run: yarn build:ci

- name: Lint
run: yarn lint
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/ci-nym-connect-desktop-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ jobs:
build:
runs-on: [self-hosted, custom-linux]
env:
RUSTC_WRAPPER: /home/ubuntu/.cargo/bin/sccache
CARGO_TERM_COLOR: always
# 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
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/ci-nym-wallet-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ jobs:
build:
runs-on: [ self-hosted, custom-linux ]
env:
RUSTC_WRAPPER: /home/ubuntu/.cargo/bin/sccache
CARGO_TERM_COLOR: always
# 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
Expand All @@ -31,7 +33,7 @@ jobs:
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.71.0
toolchain: stable
override: true
components: rustfmt, clippy

Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/ci-sdk-wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ on:
jobs:
wasm:
runs-on: [custom-runner-linux]
env:
CARGO_TERM_COLOR: always
steps:
- uses: actions/checkout@v2

Expand All @@ -35,7 +37,7 @@ jobs:
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh

- name: Install wasm-opt
run: cargo install wasm-opt
run: cargo install wasm-opt

- name: Install wasm-bindgen-cli
run: cargo install wasm-bindgen-cli
Expand Down
File renamed without changes.
Loading

0 comments on commit 3f5ec9e

Please sign in to comment.