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

Update GitHub actions #1329

Merged
merged 6 commits into from
Jul 17, 2023
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
9 changes: 2 additions & 7 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,7 @@ jobs:
security_audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Cache cargo bin
uses: actions/cache@v1
with:
path: ~/.cargo/bin
key: ${{ runner.os }}-cargo-audit
- uses: actions-rs/audit-check@v1
- uses: actions/checkout@v3
- uses: rustsec/audit-check@v1.4.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
53 changes: 16 additions & 37 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,61 +21,42 @@ jobs:
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
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- run: cargo 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
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
command: build-wasm-light-client
targets: wasm32-unknown-unknown
- run: cargo build-wasm-tendermint
- run: cargo 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
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- run: cargo 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@v3
- uses: dtolnay/rust-toolchain@stable
- name: Install protoc
run: |
curl -Lo /tmp/protoc.zip https://github.com/protocolbuffers/protobuf/releases/download/v22.3/protoc-22.3-linux-x86_64.zip
curl -Lo /tmp/protoc.zip https://github.com/protocolbuffers/protobuf/releases/download/v23.4/protoc-23.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.18.0/buf-Linux-x86_64 \
curl -sSL https://github.com/bufbuild/buf/releases/download/v1.24.0/buf-Linux-x86_64 \
-o /usr/local/bin/buf
chmod +x /usr/local/bin/buf
- name: Regenerate proto definitions
Expand All @@ -84,6 +65,4 @@ jobs:
- name: Show the differences with checked-in files
run: git diff -- proto/src/prost
- name: Ensure that generated proto definitions compile
uses: actions-rs/cargo@v1
with:
command: build-all
run: cargo build-all
15 changes: 4 additions & 11 deletions .github/workflows/no-std.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,8 @@ jobs:
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
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- run: |
cd tools/no-std-check
make check-panic-conflict
Expand All @@ -24,12 +21,8 @@ jobs:
# name: Check no_std substrate support
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - uses: actions-rs/toolchain@v1
# with:
# toolchain: nightly
# target: wasm32-unknown-unknown
# override: true
# - uses: actions/checkout@v3
# - uses: dtolnay/rust-toolchain@stable
# - run: |
# cd tools/no-std-check
# make check-substrate
5 changes: 1 addition & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: dtolnay/rust-toolchain@stable
- name: Publish crates
run: ./release.sh
env:
Expand Down
54 changes: 19 additions & 35 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,58 +21,42 @@ jobs:
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
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- run: cargo fmt --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
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: clippy
override: true
- uses: actions-rs/clippy-check@v1
- uses: giraffate/clippy-action@v1
with:
name: clippy-results
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features --all-targets -- -Dwarnings -Drust-2018-idioms
reporter: 'github-pr-check'
github_token: ${{ secrets.GITHUB_TOKEN }}
clippy_flags: --all-features --all-targets -- -Dwarnings -Drust-2018-idioms

clippy-tools-output:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: clippy
override: true
- uses: actions-rs/clippy-check@v1
- uses: giraffate/clippy-action@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
reporter: 'github-pr-check'
github_token: ${{ secrets.GITHUB_TOKEN }}
clippy_flags: --manifest-path tools/kvstore-test/Cargo.toml --all-features --all-targets -- -Dwarnings -Drust-2018-idioms

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
env:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@nightly # regression prevents docs from building on stable
- env:
RUSTDOCFLAGS: "--cfg docsrs"
with:
command: doc
args: --all-features
run: cargo doc --all-features
Loading