Skip to content

Commit

Permalink
Lint has been silently timing out
Browse files Browse the repository at this point in the history
  • Loading branch information
ndr-ds committed Nov 2, 2024
1 parent 22415cf commit 3e17207
Showing 1 changed file with 192 additions and 22 deletions.
214 changes: 192 additions & 22 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,9 @@ jobs:
cd linera-views
WASM_BINDGEN_TEST_TIMEOUT=300 wasm-pack test --chrome --headless -- --features web-default
lint:
unexpected-chain-load-operations:
runs-on: ubuntu-latest
timeout-minutes: 35
continue-on-error: true
timeout-minutes: 2

steps:
- uses: actions/checkout@v3
Expand All @@ -176,6 +175,19 @@ jobs:
- name: Check for unexpected chain load operations
run: |
./scripts/check_chain_loads.sh
check-copyright-headers:
runs-on: ubuntu-latest
timeout-minutes: 2

steps:
- uses: actions/checkout@v3
- name: Clear up some space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Build check_copyright_header script
run: |
cd ./scripts/check_copyright_header
Expand All @@ -184,39 +196,96 @@ jobs:
run: >
find linera-* examples -name '*.rs' -a -not -wholename '*/target/*' -print0
| xargs -0 scripts/target/release/check_copyright_header
cargo-machete:
runs-on: ubuntu-latest
timeout-minutes: 2

steps:
- uses: actions/checkout@v3
- name: Clear up some space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Put lint toolchain file in place
run: |
ln -sf toolchains/nightly/rust-toolchain.toml
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Install cargo-machete
run: |
cargo install cargo-machete --locked
- name: Install cargo-all-features
- name: Check for unused dependencies
run: |
cargo install --git https://github.com/ma2bd/cargo-all-features --branch workspace_metadata --locked
- name: Install cargo-rdme
cargo machete
cargo-fmt:
runs-on: ubuntu-latest
timeout-minutes: 2

steps:
- uses: actions/checkout@v3
- name: Clear up some space
run: |
cargo install cargo-rdme --locked
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install cargo-sort
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Put lint toolchain file in place
run: |
RUSTFLAGS='' cargo install cargo-sort --git https://github.com/Twey/cargo-sort/ --tag linera
ln -sf toolchains/nightly/rust-toolchain.toml
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Check formatting
run: |
cargo fmt -- --check
cargo-sort:
runs-on: ubuntu-latest
timeout-minutes: 2

steps:
- uses: actions/checkout@v3
- name: Clear up some space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Put lint toolchain file in place
run: |
ln -sf toolchains/nightly/rust-toolchain.toml
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Install cargo-sort
run: |
RUSTFLAGS='' cargo install cargo-sort --git https://github.com/Twey/cargo-sort/ --tag linera
- name: Check if Cargo.toml files are sorted
run: |
cargo sort --check --workspace --grouped
- name: Check if example Cargo.toml files are sorted
run: |
cd examples
cargo sort --check --workspace --grouped
- name: Check for unused dependencies
check-for-outdated-readme:
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- uses: actions/checkout@v3
- name: Clear up some space
run: |
cargo machete
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Put lint toolchain file in place
run: |
ln -sf toolchains/nightly/rust-toolchain.toml
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Install cargo-rdme
run: |
cargo install cargo-rdme --locked
- name: Check for outdated README.md
run: |
(set -e; for I in linera-*; do if [ -d "$I" ]; then echo $I; cargo rdme --check --no-fail-on-warnings -w $I; fi; done)
Expand All @@ -227,12 +296,54 @@ jobs:
cargo rdme --check --no-fail-on-warnings -w "${dir_name}"
fi
done)
wasm-application-lints:
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- uses: actions/checkout@v3
- name: Clear up some space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Put lint toolchain file in place
run: |
ln -sf toolchains/nightly/rust-toolchain.toml
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Run Wasm application lints
run: |
cd examples
cargo fmt -- --check
cargo clippy --all-targets --all-features --target wasm32-unknown-unknown --locked
cargo clippy --all-targets --all-features --target x86_64-unknown-linux-gnu --locked
clippy:
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- uses: actions/checkout@v3
- name: Clear up some space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Put lint toolchain file in place
run: |
ln -sf toolchains/nightly/rust-toolchain.toml
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Run clippy
run: |
cargo clippy --locked --all-targets --all-features
Expand All @@ -242,17 +353,76 @@ jobs:
-p linera-client \
-p linera-rpc \
-p linera-views
cargo-doc:
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- uses: actions/checkout@v3
- name: Clear up some space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Put lint toolchain file in place
run: |
ln -sf toolchains/nightly/rust-toolchain.toml
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Run cargo doc
run: |
cargo doc --locked --all-features
- name: Run cargo check-all-features
run: |
cargo check-all-features
cargo check-all-features --all-targets
- name: Restore `rust-toolchain.toml` file
if: '!cancelled()'
check-linera-service-graphql-schema:
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- uses: actions/checkout@v3
- name: Clear up some space
run: |
ln -sf toolchains/stable/rust-toolchain.toml
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Check linera-service GraphQL schema
run: |
diff <(cargo run --locked --bin linera-schema-export) linera-service-graphql-client/gql/service_schema.graphql
check-all-features:
runs-on: ubuntu-latest-16-cores
timeout-minutes: 40

steps:
- uses: actions/checkout@v3
- name: Clear up some space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Put lint toolchain file in place
run: |
ln -sf toolchains/nightly/rust-toolchain.toml
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Install cargo-all-features
run: |
cargo install --git https://github.com/ma2bd/cargo-all-features --branch workspace_metadata --locked
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Run cargo check-all-features
run: |
cargo check-all-features
cargo check-all-features --all-targets

0 comments on commit 3e17207

Please sign in to comment.