Skip to content

Commit

Permalink
fix(ci): move rustdoc to nightly + deny warnings
Browse files Browse the repository at this point in the history
This compiles the repo on release, which will always not utilize cache
and slow down PRs unnecessarily. Also, docs are only important before
a release.

Also fixed warnings.

Note: currently nightly fails on a bug in coverage, will be fixed
separately.

TODO: add notifications on nightly failures.
  • Loading branch information
Gilad Chase committed Dec 20, 2024
1 parent 5bbb6e4 commit 9f541a2
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 11 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,6 @@ jobs:
- name: "Run clippy pull request"
if: github.event_name == 'pull_request'
run: ci/bin/python scripts/run_tests.py --command clippy --changes_only --commit_id ${{ github.event.pull_request.base.sha }}
- name: "Run cargo doc pull request"
if: github.event_name == 'pull_request'
run: ci/bin/python scripts/run_tests.py --command doc --changes_only --commit_id ${{ github.event.pull_request.base.sha }}

# Run code style on push.
- name: "Run rustfmt on push"
Expand All @@ -79,9 +76,6 @@ jobs:
- name: "Run clippy on push"
if: github.event_name == 'push'
run: ci/bin/python scripts/run_tests.py --command clippy
- name: "Run cargo doc on push"
if: github.event_name == 'push'
run: ci/bin/python scripts/run_tests.py --command doc

- name: "Run taplo"
run: scripts/taplo.sh
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/main_nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,17 @@ jobs:
fail_ci_if_error: true
version: "v0.1.15"

rustdoc:
runs-on: starkware-ubuntu-latest-large
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/bootstrap

- name: Build Documentation
run: cargo doc --all --no-deps
env:
# Note that cargo doc requires RUSTDOCFLAGS, not RUSTFLAGS.
RUSTDOCFLAGS: "-D warnings -C link-arg=-fuse-ld=lld"

4 changes: 2 additions & 2 deletions crates/blockifier/src/execution/syscalls/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -343,8 +343,8 @@ impl SyscallResponse for GetBlockHashResponse {

/// Returns the block hash of a given block_number.
/// Returns the expected block hash if the given block was created at least
/// [constants::STORED_BLOCK_HASH_BUFFER] blocks before the current block. Otherwise, returns an
/// error.
/// [crate::abi::constants::STORED_BLOCK_HASH_BUFFER] blocks before the current block. Otherwise,
/// returns an error.
pub fn get_block_hash(
request: GetBlockHashRequest,
_vm: &mut VirtualMachine,
Expand Down
2 changes: 1 addition & 1 deletion crates/starknet_api/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ impl From<cairo_lang_starknet_classes::contract_class::ContractClass> for Sierra
}
}

/// An entry point of a [ContractClass](`crate::state::ContractClass`).
/// An entry point of a [SierraContractClass](`SierraContractClass`).
#[derive(Debug, Default, Clone, Eq, PartialEq, Hash, Deserialize, Serialize, PartialOrd, Ord)]
pub struct EntryPoint {
pub function_idx: FunctionIndex,
Expand Down
4 changes: 2 additions & 2 deletions crates/starknet_sequencer_node/src/clients.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ pub struct SequencerNodeClients {
///
/// # Returns
///
/// An Option<Arc<dyn ClientTrait>> containing the available client (local_client or remote_client),
/// wrapped in Arc. If neither exists, returns None.
/// An `Option<Arc<dyn ClientTrait>>` containing the available client (local_client or
/// remote_client), wrapped in Arc. If neither exists, returns None.
///
/// # Example
///
Expand Down

0 comments on commit 9f541a2

Please sign in to comment.