4 branches-ignore: [master]
13 # Check Code style quickly by running `rustfmt` over all code
15 runs-on: ubuntu-latest
17 - uses: actions/checkout@v3
18 - run: rustup update stable && rustup default stable
19 - run: rustup component add rustfmt
20 - run: cargo fmt --all --check
22 for manifest in `find crates benches/benchsuite benches/capture -name Cargo.toml`
24 echo check fmt for $manifest
25 cargo fmt --all --manifest-path $manifest --check
29 runs-on: ${{ matrix.os }}
31 CARGO_PROFILE_DEV_DEBUG: 1
32 CARGO_PROFILE_TEST_DEBUG: 1
39 other: i686-unknown-linux-gnu
42 other: i686-unknown-linux-gnu
45 other: i686-unknown-linux-gnu
48 other: x86_64-apple-ios
51 other: i686-pc-windows-msvc
54 other: i686-pc-windows-gnu
56 - uses: actions/checkout@v3
57 - name: Dump Environment
58 run: ci/dump-environment.sh
59 - name: Update Rustup (temporary workaround)
60 run: rustup self update
62 if: startsWith(matrix.os, 'windows')
63 - run: rustup update --no-self-update ${{ matrix.rust }} && rustup default ${{ matrix.rust }}
64 - run: rustup target add ${{ matrix.other }}
65 - run: rustup component add rustc-dev llvm-tools-preview rust-docs
66 if: startsWith(matrix.rust, 'nightly')
67 - run: sudo apt update -y && sudo apt install gcc-multilib libsecret-1-0 libsecret-1-dev -y
68 if: matrix.os == 'ubuntu-latest'
69 - run: rustup component add rustfmt || echo "rustfmt not available"
71 # Deny warnings on CI to avoid warnings getting into the codebase.
72 - run: cargo test --features 'deny-warnings'
73 - name: Check operability of rustc invocation with argfile
75 __CARGO_TEST_FORCE_ARGFILE: 1
77 # This only tests `cargo fix` because fix-proxy-mode is one of the most
78 # complicated subprocess management in Cargo.
79 cargo test --test testsuite --features 'deny-warnings' -- fix::
80 - run: cargo test --features 'deny-warnings' --manifest-path crates/cargo-test-support/Cargo.toml
82 CARGO_TARGET_DIR: target
83 - run: cargo test -p cargo-platform
84 - run: cargo test -p cargo-util
85 - run: cargo test --manifest-path crates/mdman/Cargo.toml
86 - run: cargo build --manifest-path crates/credential/cargo-credential-1password/Cargo.toml
87 - run: cargo build --manifest-path crates/credential/cargo-credential-gnome-secret/Cargo.toml
88 if: matrix.os == 'ubuntu-latest'
89 - run: cargo build --manifest-path crates/credential/cargo-credential-macos-keychain/Cargo.toml
90 if: matrix.os == 'macos-latest'
91 - run: cargo build --manifest-path crates/credential/cargo-credential-wincred/Cargo.toml
92 if: matrix.os == 'windows-latest'
93 - name: Check benchmarks
95 # Share the target dir to try to cache a few build-time deps.
96 CARGO_TARGET_DIR: target
98 # This only tests one benchmark since it can take over 10 minutes to
99 # download all workspaces.
100 cargo test --manifest-path benches/benchsuite/Cargo.toml --all-targets -- cargo
101 cargo check --manifest-path benches/capture/Cargo.toml
102 # The testsuite generates a huge amount of data, and fetch-smoke-test was
103 # running out of disk space.
104 - name: Clear test output
109 - name: Fetch smoke test
110 run: ci/fetch-smoke-test.sh
113 runs-on: ubuntu-latest
115 - uses: actions/checkout@v3
116 - run: rustup update stable && rustup default stable
117 - run: cargo test --manifest-path crates/resolver-tests/Cargo.toml
120 runs-on: ubuntu-latest
122 - uses: actions/checkout@v3
123 - run: rustup update nightly && rustup default nightly
124 - run: rustup component add rust-src
126 - run: cargo test --test build-std
128 CARGO_RUN_BUILD_STD_TESTS: 1
130 runs-on: ubuntu-latest
132 - uses: actions/checkout@v3
133 - run: rustup update nightly && rustup default nightly
134 - run: rustup update stable
135 - run: rustup component add rust-docs
136 - run: ci/validate-man.sh
137 # This requires rustfmt, use stable.
138 - run: cd src/doc/semver-check && cargo +stable run
141 curl -Lf https://github.com/rust-lang/mdBook/releases/download/v0.4.5/mdbook-v0.4.5-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook
142 echo `pwd`/mdbook >> $GITHUB_PATH
143 - run: cargo doc --no-deps
144 - run: cd src/doc && mdbook build --dest-dir ../../target/doc
147 curl -sSLo linkcheck.sh \
148 https://raw.githubusercontent.com/rust-lang/rust/master/src/tools/linkchecker/linkcheck.sh
149 sh linkcheck.sh --all cargo
152 name: bors build finished
153 needs: [docs, rustfmt, test, resolver, build_std]
154 runs-on: ubuntu-latest
155 if: "success() && github.event_name == 'push' && github.ref == 'refs/heads/auto-cargo'"
159 name: bors build finished
160 needs: [docs, rustfmt, test, resolver, build_std]
161 runs-on: ubuntu-latest
162 if: "!success() && github.event_name == 'push' && github.ref == 'refs/heads/auto-cargo'"