Skip to content

Commit

Permalink
chore: pre-release cleanups (#16)
Browse files Browse the repository at this point in the history
* chore: specify cargo resolver v2

* chore: disable publishing of packages lumina doesn't use

* chore: rename tendermint and proto and add notice about fork

* chore: remove the release workflow

* chore: redirect actions to new default branch

* chore: exclude all currently unused packages

* chore: disable unrelated jobs in CI workflows

* chore: switch to regular clippy

* fix: correctly specify new proto dependency

* fix: align importing of celestia_tendermint_proto in celestia_tendermint

* fix: align importing celestia_tendermint_proto in itself

* fix: clippy issues in celestia-tendermint

* fix: correctly import celestia_tendermint in itself

* docs: fix the invalid link

* chore: update github actions

* chore: switch to dtolnays toolchain

* chore: remove build and align compile-protos

* chore: exclude unneeded tools

* chore: cleanup ci, docs on nightly

* fix: hardcode the commit when proto files were taken
  • Loading branch information
zvolin authored Jan 10, 2024
1 parent bbe7de8 commit 6d49c1a
Show file tree
Hide file tree
Showing 74 changed files with 218 additions and 436 deletions.
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

0 comments on commit 6d49c1a

Please sign in to comment.