Skip to content

Commit

Permalink
remove bandersnatch
Browse files Browse the repository at this point in the history
update CI to 1 file only
  • Loading branch information
b-yap committed Sep 19, 2024
1 parent c4ae28a commit d41beda
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 86 deletions.
11 changes: 8 additions & 3 deletions .github/actions/shared/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,17 @@ runs:
tool-cache: false
large-packages: false

- name: Install package
# Steps taken from https://github.com/actions/runner-images/issues/7192#issuecomment-1446766800
- name: Disable Phase Updates
shell: bash
run: |
echo 'APT::Get::Always-Include-Phased-Updates "false";' | sudo tee /etc/apt/apt.conf.d/99-phased-updates
sudo apt-get update && sudo apt-get upgrade -y
sudo apt-get install -y protobuf-compiler libprotobuf-dev
- name: Update, Upgrade, and Install Protobuf
shell: bash
run: |
sudo apt-get update && sudo apt-get upgrade -y
sudo apt-get install -y protobuf-compiler libprotobuf-dev
# Steps taken from https://github.com/actions/cache/blob/master/examples.md#rust---cargo
- name: Cache cargo registry
Expand Down
38 changes: 0 additions & 38 deletions .github/workflows/clippy-checks.yml

This file was deleted.

32 changes: 0 additions & 32 deletions .github/workflows/test-benchmark.yml

This file was deleted.

57 changes: 49 additions & 8 deletions .github/workflows/test-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ on:
push:
branches:
- main
env:
# Make sure CI fails on all warnings, including Clippy lints
RUSTFLAGS: "-Dwarnings"

jobs:
test-code:
runs-on: ubuntu-latest
env:
# Make sure CI fails on all warnings, including Clippy lints
RUSTFLAGS: "-Dwarnings"

steps:
- name: Checkout
Expand All @@ -20,12 +20,53 @@ jobs:
- name: Free up Space and Installation
uses: ./.github/actions/shared

- name: Install Protoc
uses: arduino/setup-protoc@v1
- name: Test
uses: actions-rs/cargo@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
command: test

- name: Test
test-benchmarks:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Free up Space and Installation
uses: ./.github/actions/shared

- name: Test For runtime benchmarks
uses: actions-rs/cargo@v1
with:
command: test
args: --features=runtime-benchmarks,try-runtime

clippy-checks:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Free up Space and Installation
uses: ./.github/actions/shared

- name: Clippy -- Main
uses: actions-rs/cargo@v1
with:
command: test
command: clippy
args: --all-features -- -W clippy::all -A clippy::style -A forgetting_copy_types -A forgetting_references

- name: Clippy -- All Targets (except integration)
uses: actions-rs/cargo@v1
with:
command: clippy
# We are a bit more forgiving when it comes to the code in tests and only check for correctness
args: --workspace --all-features --all-targets --exclude runtime-integration-tests -- -A clippy::all -W clippy::correctness -A forgetting_copy_types -A forgetting_references

- name: Clippy -- Integration
uses: actions-rs/cargo@v1
with:
command: clippy
# We are a bit more forgiving when it comes to the code in tests and only check for correctness
args: --package runtime-integration-tests --all-features --all-targets -- -A clippy::all -W clippy::correctness -A forgetting_copy_types -A forgetting_references

6 changes: 1 addition & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,4 @@ orml-tokens = { git = "https://github.com/open-web3-stack//open-runtime-module-l
### need this because of bifrost farming dependency in runtime
### bifrost uses :
### orml packages { version = "0.4.1-dev" }
### zenlink packages { version = "*" }

# probable patch for nightly
#[patch."https://github.com/w3f/ring-vrf"]
#bandersnatch_vrfs = { git = "https://github.com/w3f//ring-vrf", version = "0.0.4", rev = "3ddc20" }
### zenlink packages { version = "*" }

0 comments on commit d41beda

Please sign in to comment.