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: pre-release cleanups #16

Merged
merged 20 commits into from
Jan 10, 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
4 changes: 2 additions & 2 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ jobs:
security_audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Cache cargo bin
uses: actions/cache@v1
uses: actions/cache@v3
with:
path: ~/.cargo/bin
key: ${{ runner.os }}-cargo-audit
Expand Down
68 changes: 9 additions & 59 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,81 +7,31 @@ on:
paths-ignore:
- "docs/**"
branches:
- main
- 'v*.*.*'
- 'v*.*.*-celestia'
jobs:
cleanup-runs:
runs-on: ubuntu-latest
steps:
- uses: rokroskar/workflow-run-cleanup-action@master
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/main'"

tendermint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: build-all

build-light-client-wasm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
target: wasm32-unknown-unknown
- uses: actions-rs/cargo@v1
with:
command: build-wasm-tendermint
- uses: actions-rs/cargo@v1
with:
command: build-wasm-light-client

tools:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: build-tools

# As per https://github.com/informalsystems/tendermint-rs/issues/1014
generated-protos-compile:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable

- name: Install protoc
run: |
curl -Lo /tmp/protoc.zip https://github.com/protocolbuffers/protobuf/releases/download/v21.4/protoc-21.4-linux-x86_64.zip
unzip /tmp/protoc.zip -d ${HOME}/.local
echo "PROTOC=${HOME}/.local/bin/protoc" >> $GITHUB_ENV
export PATH="${PATH}:${HOME}/.local/bin"

- name: Install buf
run: |
curl -sSL https://github.com/bufbuild/buf/releases/download/v1.15.1/buf-Linux-x86_64 \
-o /usr/local/bin/buf
chmod +x /usr/local/bin/buf

- name: Regenerate proto definitions
working-directory: ./tools/proto-compiler/
run: cargo run
- name: Ensure that generated proto definitions compile
uses: actions-rs/cargo@v1
with:
command: build-all

- name: Ensure that generated proto builds
run: cargo build
37 changes: 19 additions & 18 deletions .github/workflows/no-std.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
name: no_std check
on:
pull_request: {}
push:
branches: main
# name: no_std check
# on:
# pull_request: {}
# push:
# branches:
# - 'v*.*.*-celestia'

jobs:
check-no-std-panic-conflict:
name: Check no_std panic conflict
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- run: |
cd tools/no-std-check
make check-panic-conflict
# jobs:
# check-no-std-panic-conflict:
# name: Check no_std panic conflict
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - uses: actions-rs/toolchain@v1
# with:
# toolchain: stable
# override: true
# - run: |
# cd tools/no-std-check
# make check-panic-conflict

# Disabled until sp-io removes this feature which was removed in latest nightlies:
# https://github.com/paritytech/substrate/blob/b5846ccc8480806aa6035ae4d2e89d61930f697e/primitives/io/src/lib.rs#L22
Expand Down
32 changes: 0 additions & 32 deletions .github/workflows/release.yml

This file was deleted.

71 changes: 15 additions & 56 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,72 +7,31 @@ on:
paths-ignore:
- "docs/**"
branches:
- main
- 'v*.*.*'
- 'v*.*.*-celestia'
jobs:
cleanup-runs:
runs-on: ubuntu-latest
steps:
- uses: rokroskar/workflow-run-cleanup-action@master
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/main'"

fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check

# This job creates the "clippy-results" GitHub Action that lists the clippy results in a nice format.
clippy-json-output:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: clippy
override: true
- uses: actions-rs/clippy-check@v1
with:
name: clippy-results
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features --all-targets -- -Dwarnings -Drust-2018-idioms
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Run clippy
run: cargo fmt --all -- --check

clippy-tools-output:
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: clippy
override: true
- uses: actions-rs/clippy-check@v1
with:
name: clippy-tools-results
token: ${{ secrets.GITHUB_TOKEN }}
args: --manifest-path tools/kvstore-test/Cargo.toml --all-features --all-targets -- -Dwarnings -Drust-2018-idioms
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Run clippy
run: cargo clippy --all --all-targets

docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2023-03-01 # regression prevents docs from building
override: true
- uses: actions-rs/cargo@v1
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- name: Cargo doc
run: cargo doc --all-features
env:
RUSTDOCFLAGS: "--cfg docsrs"
with:
command: doc
args: --all-features
# toolchain: nightly-2023-03-01 # regression prevents docs from building
Loading