Skip to content

Commit

Permalink
Merge pull request #2465 from iron-fish/staging
Browse files Browse the repository at this point in the history
STAGING -> MASTER
  • Loading branch information
mirayadav authored Oct 31, 2022
2 parents ec57ed3 + 9048cb2 commit 02939ae
Show file tree
Hide file tree
Showing 192 changed files with 8,246 additions and 5,615 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/build-ironfish-rust-nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
fail-fast: false
matrix:
settings:
- host: macos-latest
- host: macos-11
target: x86_64-apple-darwin
architecture: x64
build: |
Expand All @@ -39,7 +39,7 @@ jobs:
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust@sha256:749e81d2fa2fdcda2732e284069fdd8469702da007eb6088df426cdb813b3ecc
build: cd ironfish-rust-nodejs && yarn build && strip *.node

- host: macos-latest
- host: macos-11
target: aarch64-apple-darwin
build: |
cd ironfish-rust-nodejs
Expand Down Expand Up @@ -71,10 +71,10 @@ jobs:
runs-on: ${{ matrix.settings.host }}
steps:
- name: Check out Git repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Use Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v3
if: ${{ !matrix.settings.docker }}
with:
node-version: '16.13.0'
Expand Down Expand Up @@ -124,7 +124,7 @@ jobs:
fail-fast: false
matrix:
settings:
- host: macos-latest
- host: macos-11
target: x86_64-apple-darwin

- host: windows-latest
Expand All @@ -151,14 +151,14 @@ jobs:
runs-on: ${{ matrix.settings.host }}
steps:
- name: Check out Git repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set up QEMU for Docker
if: ${{ matrix.settings.docker }}
run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes

- name: Use Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: '16.13.0'

Expand Down
25 changes: 12 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:

steps:
- name: Check out Git repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Use Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: '16.13.0'
cache: 'yarn'
Expand All @@ -36,19 +36,19 @@ jobs:

steps:
- name: Check out Git repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Use Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: '16.13.0'
# Using 16.10 to fix https://github.com/facebook/jest/issues/11956
node-version: '16.10.0'
cache: 'yarn'

- name: Cache Rust
uses: Swatinem/rust-cache@v1
uses: Swatinem/rust-cache@v2
with:
sharedKey: nodejs
working-directory: ironfish-rust-nodejs
shared-key: nodejs

- name: Install packages
run: yarn --non-interactive --frozen-lockfile
Expand All @@ -66,19 +66,18 @@ jobs:

steps:
- name: Check out Git repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Use Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: '16.13.0'
cache: 'yarn'

- name: Cache Rust
uses: Swatinem/rust-cache@v1
uses: Swatinem/rust-cache@v2
with:
sharedKey: nodejs
working-directory: ironfish-rust-nodejs
shared-key: nodejs

- name: Install packages
run: yarn --non-interactive --frozen-lockfile
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/deploy-brew.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@ jobs:

steps:
- name: Check out Git repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Cache Rust
uses: Swatinem/rust-cache@v1
uses: Swatinem/rust-cache@v2
with:
sharedKey: nodejs
working-directory: ironfish-rust-nodejs
shared-key: nodejs

- name: Cache Ironfish CLI Build
id: cache-ironfish-cli-build
Expand All @@ -24,7 +23,7 @@ jobs:
key: ${{ github.sha }}

- name: Use Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: '16.13.0'
cache: 'yarn'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-node-aws.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:

steps:
- name: Check out Git repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-node-github-beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

steps:
- name: Check out Git repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Login to Github Registry
run: echo ${GITHUB_TOKEN} | docker login -u ${GITHUB_USER} --password-stdin ghcr.io
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-node-github.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

steps:
- name: Check out Git repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Login to Github Registry
run: echo ${GITHUB_TOKEN} | docker login -u ${GITHUB_USER} --password-stdin ghcr.io
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/deploy-npm-ironfish-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,9 @@ jobs:
cache: yarn

- name: Cache Rust
uses: Swatinem/rust-cache@v1
uses: Swatinem/rust-cache@v2
with:
sharedKey: nodejs
working-directory: ironfish-rust-nodejs
shared-key: nodejs

- name: Insert Git hash into ironfish-cli/package.json as gitHash
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-npm-ironfish-rust-nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:
working-directory: ./ironfish-rust-nodejs

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Setup node
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: '16.13.0'
registry-url: 'https://registry.npmjs.org'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/push-version-to-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:

steps:
- name: Check out Git repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Push version string to API
run: ./ironfish-cli/scripts/push-version.sh
Expand Down
80 changes: 59 additions & 21 deletions .github/workflows/rust_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,18 @@ on:
paths:
- "ironfish-rust/**"
- "ironfish-rust-nodejs/**"
- "ironfish-zkp/**"
- "rust-toolchain"
- ".github/workflows/rust_ci.yml"
push:
branches:
- master
paths:
- "ironfish-rust/**"
- "ironfish-rust-nodejs/**"
- "ironfish-zkp/**"
- "rust-toolchain"
- ".github/workflows/rust_ci.yml"

name: Rust CI

Expand All @@ -19,25 +23,21 @@ jobs:
name: ironfish-rust
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
components: rustfmt, clippy

- name: Cache Rust
uses: Swatinem/rust-cache@v1
uses: Swatinem/rust-cache@v2
with:
sharedKey: base
working-directory: ironfish-rust

- name: Check for license headers
run: ./ci/lintHeaders.sh ./ironfish-rust/src *.rs
shared-key: base

# Build & Run test & Collect Code coverage
- name: Run cargo-tarpaulin on ironfish-rust
uses: actions-rs/[email protected]
with:
version: "0.20.0"
version: "0.22.0"
args: --avoid-cfg-tarpaulin --manifest-path ironfish-rust/Cargo.toml --release -- --test-threads 1

# Upload code coverage to Codecov
Expand All @@ -47,6 +47,9 @@ jobs:
token: ${{secrets.CODECOV_TOKEN}}
flags: ironfish-rust

- name: Check for license headers
run: ./ci/lintHeaders.sh ./ironfish-rust/src *.rs

# fmt
- uses: actions-rs/cargo@v1
name: "`cargo fmt` check on ironfish-rust"
Expand All @@ -65,43 +68,78 @@ jobs:
name: ironfish-rust-nodejs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
components: rustfmt, clippy

- name: Cache Rust
uses: Swatinem/rust-cache@v1
uses: Swatinem/rust-cache@v2
with:
shared-key: nodejs

# Check
- name: Run cargo check on ironfish-rust-nodejs
uses: actions-rs/cargo@v1
with:
sharedKey: nodejs
working-directory: ironfish-rust-nodejs
command: "check"
args: --manifest-path ironfish-rust-nodejs/Cargo.toml

- name: Check for license headers
run: ./ci/lintHeaders.sh ./ironfish-rust-nodejs/src *.rs

# fmt
- uses: actions-rs/cargo@v1
name: "`cargo fmt` check on ironfish-rust-nodejs"
with:
command: fmt
args: --manifest-path ironfish-rust-nodejs/Cargo.toml --all -- --check

# clippy
- uses: actions-rs/cargo@v1
name: "Clippy check on ironfish-rust-nodejs"
with:
command: clippy
args: --manifest-path ironfish-rust-nodejs/Cargo.toml -- -D warnings

ironfish_zkp:
name: ironfish-zkp
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
components: rustfmt, clippy

- name: Cache Rust
uses: Swatinem/rust-cache@v2
with:
shared-key: zkp

# Build & Run test & Collect Code coverage
- name: Run cargo-tarpaulin on ironfish-rust-nodejs
- name: Run cargo-tarpaulin on ironfish-zkp
uses: actions-rs/[email protected]
with:
version: "0.20.0"
args: --avoid-cfg-tarpaulin --manifest-path ironfish-rust-nodejs/Cargo.toml --release -- --test-threads 1
version: "0.22.0"
args: --avoid-cfg-tarpaulin --manifest-path ironfish-zkp/Cargo.toml --release -- --test-threads 1

# upload code coverage to Codecov
# Upload code coverage to Codecov
- name: Upload to codecov.io
uses: codecov/[email protected]
with:
flags: ironfish-rust-nodejs
token: ${{secrets.CODECOV_TOKEN}}
flags: ironfish-zkp

# fmt
- uses: actions-rs/cargo@v1
name: "`cargo fmt` check on ironfish-rust-nodejs"
name: "`cargo fmt` check on ironfish-zkp"
with:
command: fmt
args: --manifest-path ironfish-rust-nodejs/Cargo.toml --all -- --check
args: --manifest-path ironfish-zkp/Cargo.toml --all -- --check

# clippy
- uses: actions-rs/cargo@v1
name: "Clippy check on ironfish-rust-nodejs"
name: "Clippy check on ironfish-zkp"
with:
command: clippy
args: --manifest-path ironfish-rust-nodejs/Cargo.toml -- -D warnings
args: --manifest-path ironfish-zkp/Cargo.toml -- -D warnings
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ lerna-debug.log*
.pnp.*

# rust build artifacts
**/*/target/*
**/target/*
*.node

# ironfish-cli
Expand Down
7 changes: 7 additions & 0 deletions ironfish-rust-nodejs/Cargo.lock → Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 02939ae

Please sign in to comment.