use larger runner for fuzzer binary builder #75
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
on: | |
pull_request: | |
merge_group: | |
jobs: | |
backward_compat: | |
name: "Backward Compatibility" | |
runs-on: ubuntu-22.04-16core | |
defaults: | |
run: | |
working-directory: ./pytest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11 | |
cache: pip | |
- uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 | |
with: | |
prefix-key: "0" # change this to invalidate CI cache | |
save-if: "false" # use the cache from nextest, but don’t double-save | |
# TODO: the python script should use the quick-release cargo profile, but currently does not | |
- run: pip3 install --user -r requirements.txt | |
- run: python3 tests/sanity/backward_compatible.py | |
cargo_nextest: | |
name: "Cargo Nextest (${{matrix.name}})" | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- name: Linux | |
os: ubuntu-22.04-16core | |
flags: "" | |
- name: Linux Nightly | |
os: ubuntu-22.04-16core | |
flags: "--features nightly,test_features" | |
- name: MacOS | |
os: macos-latest-xlarge | |
# FIXME: some of these tests don't work very well on MacOS at the moment. Should fix | |
# them at earliest convenience :) | |
flags: "--exclude integration-tests --exclude node-runtime --exclude runtime-params-estimator --exclude near-network --exclude estimator-warehouse" | |
timeout-minutes: 90 | |
steps: | |
# Some of the tests allocate really sparse maps, so heuristic-based overcommit limits are not | |
# appropriate here. | |
# FIXME(#9634): remove this once the issue is resolved. | |
- run: sudo sysctl vm.overcommit_memory=1 || true | |
- uses: actions/checkout@v4 | |
- uses: baptiste0928/cargo-install@21a18ba3bf4a184d1804e8b759930d3471b1c941 | |
with: | |
crate: cargo-nextest | |
- uses: baptiste0928/cargo-install@21a18ba3bf4a184d1804e8b759930d3471b1c941 | |
with: | |
crate: cargo-deny | |
- uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 | |
with: | |
prefix-key: "0" # change this to invalidate CI cache | |
- run: cargo nextest run --locked --workspace -p '*' --cargo-profile quick-release --profile ci ${{ matrix.flags }} | |
env: | |
RUST_BACKTRACE: short | |
db_migration: | |
name: "Database Migration" | |
runs-on: ubuntu-22.04-16core | |
defaults: | |
run: | |
working-directory: ./pytest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11 | |
cache: pip | |
- uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 | |
with: | |
prefix-key: "0" # change this to invalidate CI cache | |
save-if: "false" # use the cache from nextest, but don’t double-save | |
- run: pip3 install --user -r requirements.txt | |
- run: python3 tests/sanity/db_migration.py | |
protobuf_backward_compat: | |
name: "Protobuf Backward Compatibility" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: bufbuild/buf-setup-action@1158f4fa81bc02e1ff62abcca6d516c9e24c77da | |
- uses: bufbuild/buf-breaking-action@a074e988ee34efcd4927079e79c611f428354c01 | |
with: | |
against: "https://github.com/near/nearcore.git#ref=${{ github.event.pull_request.base.sha || github.event.merge_group.base_sha }}" | |
sanity_checks: | |
name: "Sanity Checks" | |
runs-on: ubuntu-22.04-16core | |
strategy: | |
fail-fast: false | |
timeout-minutes: 90 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11 | |
cache: pip | |
- uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 | |
with: | |
prefix-key: "0" # change this to invalidate CI cache | |
save-if: "false" # use the cache from nextest, but don’t double-save | |
- run: cargo build -p neard --bin neard --features nightly | |
- name: run spin_up_cluster.py | |
# Note: We're not running spin_up_cluster.py for non-nightly | |
# because spinning up non-nightly clusters is already covered | |
# by other steps in the CI, e.g. upgradable. | |
run: | | |
cd pytest | |
python3 -m pip install --progress-bar off --user -r requirements.txt | |
python3 tests/sanity/spin_up_cluster.py | |
- run: cargo build --profile quick-release -p neard --bin neard | |
- run: python3 scripts/state/update_res.py check | |
- run: python3 scripts/check_nightly.py | |
- run: python3 scripts/check_pytests.py | |
- run: python3 scripts/fix_nightly_feature_flags.py | |
# TODO: this should probably be a separate job | |
- run: ./scripts/formatting --check | |
# TODO: this should probably be a separate job | |
- name: check rpc_errors_schema.json | |
# TODO: the command ran and suggested are different. why? unify. | |
run: | | |
rm -f target/rpc_errors_schema.json | |
cargo check -p near-jsonrpc --features dump_errors_schema | |
if ! git --no-pager diff --no-index chain/jsonrpc/res/rpc_errors_schema.json target/rpc_errors_schema.json; then | |
set +x | |
echo 'The RPC errors schema reflects outdated typing structure; please run' | |
echo ' ./chain/jsonrpc/build_errors_schema.sh' | |
exit 1 | |
fi >&2 | |
upgradability: | |
name: "Upgradability" | |
runs-on: ubuntu-22.04-16core | |
defaults: | |
run: | |
working-directory: ./pytest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11 | |
cache: pip | |
- uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 | |
with: | |
prefix-key: "0" # change this to invalidate CI cache | |
save-if: "false" # use the cache from nextest, but don’t double-save | |
- run: pip3 install --user -r requirements.txt | |
- run: python3 tests/sanity/upgradable.py |