@@ -123,9 +123,6 @@ jobs:
123123 run : cargo test
124124 if : runner.os != 'Windows' # Requires pyo3 0.29+ on Windows
125125
126- - run : cargo doc --locked
127- if : runner.os == 'Linux'
128-
129126 - name : check compilation without host_env (sandbox mode)
130127 run : |
131128 cargo check -p rustpython-vm --no-default-features --features compiler
@@ -765,3 +762,39 @@ jobs:
765762 run : wasmer run --dir "$(pwd)" target/wasm32-wasip1/release/rustpython.wasm -- "$(pwd)/extra_tests/snippets/stdlib_random.py"
766763 - name : run cpython unittest
767764 run : wasmer run --dir "$(pwd)" target/wasm32-wasip1/release/rustpython.wasm -- "$(pwd)/Lib/test/test_int.py"
765+
766+ cargo_doc :
767+ needs :
768+ - determine_changes
769+ if : |
770+ (
771+ !contains(github.event.pull_request.labels.*.name, 'skip:ci') &&
772+ needs.determine_changes.outputs.rust_code == 'true'
773+ ) || github.ref == 'refs/heads/main'
774+ env :
775+ RUST_BACKTRACE : full
776+ name : cargo doc
777+ runs-on : ubuntu-latest
778+ steps :
779+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
780+ with :
781+ persist-credentials : false
782+
783+ - uses : dtolnay/rust-toolchain@stable
784+
785+ - name : Restore cache
786+ uses : actions/cache/restore@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
787+ with :
788+ path : |
789+ ~/.cargo/bin/
790+ ~/.cargo/registry/index/
791+ ~/.cargo/registry/cache/
792+ ~/.cargo/git/db/
793+ target/
794+ key : ${{ runner.os }}-${{ hashFiles('**/Cargo.toml') }}-
795+ restore-keys : |
796+ ${{ runner.os }}-stable--${{ hashFiles('**/Cargo.toml') }}-
797+ ${{ runner.os }}-stable--
798+
799+ - name : cargo doc
800+ run : cargo doc --locked
0 commit comments