Skip to content

Commit

Permalink
Merge pull request #5627 from iron-fish/staging
Browse files Browse the repository at this point in the history
Staging -> Master
  • Loading branch information
danield9tqh authored Nov 7, 2024
2 parents 75d2c9c + 0f68050 commit 6693fe5
Show file tree
Hide file tree
Showing 144 changed files with 4,641 additions and 4,602 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-regenerate-fixtures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ jobs:
status: ${{ job.status }}
notify_when: 'failure'
env:
SLACK_WEBHOOK_URL: ${{ secrets.GITHUB_ACTIONS_SLACK_WEBHOOK }}
SLACK_WEBHOOK_URL: ${{ secrets.GH_ACTIONS_SLACK_WEBHOOK }}
33 changes: 29 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,22 @@ jobs:
- name: Lint
run: yarn lint

- name: Build Rust bindings
run: yarn build

- name: Check for Rust binding changes
run: |
if [[ $(git status | grep index.) ]]; then
echo "Rust bindings have outstanding updates, please run 'yarn build' and check them in."
exit 1
fi
test:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
shard: [1/3, 2/3, 3/3]

steps:
- name: Check out Git repository
Expand All @@ -63,7 +76,7 @@ jobs:
run: yarn --non-interactive --frozen-lockfile

- name: Run tests
run: yarn test:coverage --maxWorkers=2 --workerIdleMemoryLimit=2000MB
run: yarn test:coverage --maxWorkers=2 --workerIdleMemoryLimit=2000MB --shard=${{ matrix.shard }}

- name: Check for missing fixtures
run: |
Expand All @@ -74,11 +87,19 @@ jobs:
- name: Upload coverage
if: github.repository == 'iron-fish/ironfish'
run: CODECOV_TOKEN=${{ secrets.CODECOV_TOKEN }} ROOT_PATH=$GITHUB_WORKSPACE/ yarn coverage:upload
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
flags: ironfish


testslow:
name: Slow Tests
runs-on: ubuntu-latest
strategy:
matrix:
shard: [1/2, 2/2]

steps:
- name: Check out Git repository
Expand All @@ -100,7 +121,7 @@ jobs:
run: yarn --non-interactive --frozen-lockfile

- name: Run slow tests & coverage
run: yarn test:slow:coverage --maxWorkers=2 --workerIdleMemoryLimit=2000MB
run: yarn test:slow:coverage --maxWorkers=2 --workerIdleMemoryLimit=2000MB --shard=${{ matrix.shard }}

- name: Check for missing fixtures
run: |
Expand All @@ -111,4 +132,8 @@ jobs:
- name: Upload coverage
if: github.repository == 'iron-fish/ironfish'
run: CODECOV_TOKEN=${{ secrets.CODECOV_TOKEN }} ROOT_PATH=$GITHUB_WORKSPACE/ yarn coverage:upload
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
flags: ironfish
9 changes: 0 additions & 9 deletions .github/workflows/deploy-brew.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,6 @@ jobs:
- name: Build Ironfish CLI
run: ./ironfish-cli/scripts/build.sh

- name: Deploy Ironfish CLI Brew
run: ./ironfish-cli/scripts/deploy-brew.sh
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
BREW_GITHUB_USERNAME: ${{ secrets.BREW_GITHUB_USERNAME }}
BREW_GITHUB_TOKEN: ${{ secrets.BREW_GITHUB_TOKEN }}

- name: Deploy Ironfish CLI Brew to R2
run: ./ironfish-cli/scripts/deploy-brew.sh
env:
Expand All @@ -46,4 +38,3 @@ jobs:
BREW_GITHUB_USERNAME: ${{ secrets.BREW_GITHUB_USERNAME }}
BREW_GITHUB_TOKEN: ${{ secrets.BREW_GITHUB_TOKEN }}
AWS_DEFAULT_REGION: auto
UPLOAD_TO_R2: true
7 changes: 7 additions & 0 deletions .github/workflows/deploy-npm-ironfish-rust-nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ jobs:
run: ls -R .
shell: bash

- name: Verify artifacts exist
run: |
if [ -z "$(ls -A './artifacts')" ]; then
echo "artifacts folder was empty. ironfish-rust-nodejs artifacts were not uploaded correctly."
exit 1
fi
- name: Move and publish artifacts
run: yarn artifacts

Expand Down
1 change: 0 additions & 1 deletion .github/workflows/perf_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'yarn'

- name: Install packages
run: yarn --non-interactive --frozen-lockfile
Expand Down
127 changes: 106 additions & 21 deletions .github/workflows/rust_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,6 @@ jobs:
save-if: false
shared-key: base

- name: Install Cargo tools
run: |
rustup component add rustfmt clippy
- name: Check that cargo lockfile is up to date
run: |
cargo check --locked --all-targets
# Note: ironfish-zkp is does not need this due to different licensing
- name: Check for license headers for ironfish-rust
run: ./ci/lintHeaders.sh ./ironfish-rust/src *.rs
Expand All @@ -62,7 +54,27 @@ jobs:
- name: "Clippy check on ironfish-rust"
run: |
cargo clippy --all-targets -- -D warnings
cargo clippy --all-targets --all-features -- -D warnings
cargo_check:
name: Check Rust
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Cache Rust
uses: Swatinem/rust-cache@v2
with:
save-if: false
shared-key: base

- name: Install cargo-all-features
run: |
cargo install --locked cargo-all-features
- name: Check that cargo lockfile is up to date
run: |
cargo check-all-features --locked --all-targets
cargo_vet:
name: Vet Dependencies
Expand All @@ -87,51 +99,124 @@ jobs:
ironfish_rust:
name: Test ironfish-rust
runs-on: ubuntu-latest
strategy:
matrix:
shard: [1/2, 2/2]

steps:
- uses: actions/checkout@v4

- name: install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov

- name: Install nextest
uses: taiki-e/install-action@nextest

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

# Run tests to collect code coverage
- name: Run cargo-tarpaulin on ironfish-rust
- name: Run tests
run: |
wget -O tarpaulin.tar.gz https://github.com/xd009642/tarpaulin/releases/download/0.22.0/cargo-tarpaulin-0.22.0-travis.tar.gz
tar -xzf tarpaulin.tar.gz
mv cargo-tarpaulin ~/.cargo/bin/
cargo tarpaulin -p ironfish --release --out Xml --avoid-cfg-tarpaulin --skip-clean --timeout 300 -- --test-threads 1
cargo llvm-cov nextest \
--no-clean \
--codecov \
--output-path codecov.json \
--package ironfish \
--release \
--partition count:${{ matrix.shard }}
# Upload code coverage to Codecov
- name: Upload to codecov.io
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
token: ${{secrets.CODECOV_TOKEN}}
flags: ironfish-rust

ironfish_rust_no_default_features:
name: Test ironfish-rust (no default features)
runs-on: ubuntu-latest
strategy:
matrix:
shard: [1/2, 2/2]

steps:
- uses: actions/checkout@v4

- name: Install nextest
uses: taiki-e/install-action@nextest

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

- name: Run tests
run: |
cargo nextest run \
--package ironfish \
--release \
--no-default-features \
--partition count:${{ matrix.shard }}
ironfish_rust_all_features:
name: Test ironfish-rust (all features)
runs-on: ubuntu-latest
strategy:
matrix:
shard: [1/2, 2/2]

steps:
- uses: actions/checkout@v4

- name: Install nextest
uses: taiki-e/install-action@nextest

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

- name: Run tests (all features)
run: |
cargo nextest run \
--package ironfish \
--release \
--all-features \
--partition count:${{ matrix.shard }}
ironfish_zkp:
name: Test ironfish-zkp
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov

- name: Install nextest
uses: taiki-e/install-action@nextest

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

# Run tests to collect code coverage
- name: Run cargo-tarpaulin on ironfish-zkp
- name: Run tests
run: |
wget -O tarpaulin.tar.gz https://github.com/xd009642/tarpaulin/releases/download/0.22.0/cargo-tarpaulin-0.22.0-travis.tar.gz
tar -xzf tarpaulin.tar.gz
mv cargo-tarpaulin ~/.cargo/bin/
cargo tarpaulin -p ironfish_zkp --release --out Xml --avoid-cfg-tarpaulin --skip-clean --timeout 300 -- --test-threads 1
cargo llvm-cov nextest \
--no-clean \
--codecov \
--output-path codecov.json \
--package ironfish_zkp \
--release
# Upload code coverage to Codecov
- name: Upload to codecov.io
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
token: ${{secrets.CODECOV_TOKEN}}
flags: ironfish-zkp
Loading

0 comments on commit 6693fe5

Please sign in to comment.