Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Upgrade to nearcore 1.37.0 #85

Merged
merged 4 commits into from
Mar 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
jobs:
create-release:
name: create-release
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
# env:
# Set to force version number, e.g., when no tag exists.
# NEAR_LAKE_VERSION: TEST-0.0.0
Expand Down
112 changes: 39 additions & 73 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,85 +1,51 @@
name: ci
name: Rust checks

on:
pull_request:
branches: [main]
push:
branches: [main]
# schedule:
# - cron: '00 01 * * *'
jobs:
test:
name: test
env:
# For some builds, we use cross to test on 32-bit and big-endian
# systems.
CARGO: cargo
# When CARGO is set to CROSS, this is set to `--target matrix.target`.
TARGET_FLAGS: ""
# When CARGO is set to CROSS, TARGET_DIR includes matrix.target.
TARGET_DIR: ./target
# For some builds, we disable ledger support
FEATURES_FLAGS:
# Emit backtraces on panics.
RUST_BACKTRACE: 1
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- build: linux-x86_64
os: ubuntu-20.04
rust: stable
target: x86_64-unknown-linux-gnu

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
profile: minimal
override: true
env:
CARGO_TERM_COLOR: always

- name: Use Cross
run: |
cargo install cross
echo "CARGO=cross" >> $GITHUB_ENV
echo "TARGET_FLAGS=--target ${{ matrix.target }}" >> $GITHUB_ENV
echo "TARGET_DIR=./target/${{ matrix.target }}" >> $GITHUB_ENV

- name: Build cross environment
shell: bash
run: |
if [ -d "./cross/${{ matrix.target }}" ]; then
docker build --tag "cross:${{ matrix.target }}" "./cross/${{ matrix.target }}"
fi
jobs:
check-format-and-lint:
name: Check & Lint
runs-on: ubuntu-22.04-8core
steps:
- uses: actions/checkout@v2

- name: Show command used for Cargo
run: |
echo "cargo command is: ${{ env.CARGO }}"
echo "target flag is: ${{ env.TARGET_FLAGS }}"
- name: Install Rust toolchain
run: |
rustup update stable
rustup default stable
rustup component add rustfmt clippy

- name: Build near-lake and all crates
run: ${{ env.CARGO }} build --verbose --all ${{ env.TARGET_FLAGS }} ${{ env.FEATURES_FLAGS }}
- name: Check code formatting
run: cargo fmt --all -- --check

- name: Run tests
run: ${{ env.CARGO }} test --verbose --all ${{ env.TARGET_FLAGS }} ${{ env.FEATURES_FLAGS }}
- name: Lint with clippy
run: cargo clippy -- -D warnings

rustfmt:
name: rustfmt
runs-on: ubuntu-20.04
cargo-check:
name: Cargo Check
runs-on: ubuntu-22.04-8core
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
profile: minimal
components: rustfmt
- name: Check formatting
run: |
cargo fmt --all -- --check
- uses: actions/checkout@v2

- name: Install Rust toolchain
run: |
rustup update stable
rustup default stable

- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Cargo Check
run: cargo check --all
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 0.1.29

* Upgrade Indexer Framework to be based on [nearcore 1.37.0](https://github.com/near/nearcore/releases/tag/1.37.0)

## 0.1.28

* Upgrade Indexer Framework to be based on [nearcore 1.36.5](https://github.com/near/nearcore/releases/tag/1.36.5)
Expand Down
Loading
Loading