Skip to content

Commit 8d82201

Browse files
authored
ci: remove caching steps (#203)
* ci: remove caching steps Pubgrub is so fast to compile that caching in CI isn't required, so i removed it. Closes #201. The timing below are from my machine, but even if CI is an order of magnitude slower i don't think we should cache: ``` $ hyperfine --prepare "cargo clean" "cargo publish --dry-run" "cargo +nightly doc --no-deps" Benchmark 1: cargo publish --dry-run Time (mean ± σ): 1.661 s ± 0.272 s [User: 2.240 s, System: 0.324 s] Range (min … max): 1.467 s … 2.207 s 10 runs Benchmark 2: cargo +nightly doc --no-deps Time (mean ± σ): 1.230 s ± 0.020 s [User: 2.013 s, System: 0.312 s] Range (min … max): 1.202 s … 1.263 s 10 runs ``` * ci: Add `workflow_dispatch` for testing
1 parent 0e4493c commit 8d82201

File tree

2 files changed

+4
-25
lines changed

2 files changed

+4
-25
lines changed

.github/workflows/cargo_publish_dry_run.yml

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ name: Check crate publishing works
44
on:
55
pull_request:
66
branches: [ release ]
7+
workflow_dispatch:
78

89
env:
910
CARGO_TERM_COLOR: always
@@ -15,26 +16,12 @@ jobs:
1516
steps:
1617
- uses: actions/checkout@v4
1718
- name: Install stable Rust
18-
uses: actions-rs/toolchain@v1
19-
with:
20-
toolchain: stable
21-
profile: minimal
19+
uses: dtolnay/rust-toolchain
2220

2321
- name: Get Cargo version
2422
id: cargo_version
2523
run: echo "::set-output name=version::$(cargo -V | tr -d ' ')"
2624
shell: bash
2725

28-
- name: Download cache
29-
uses: actions/cache@v4
30-
with:
31-
path: |
32-
~/.cargo/registry/index/
33-
~/.cargo/registry/cache/
34-
~/.cargo/git/db/
35-
target/
36-
key: ${{ runner.os }}-${{ steps.cargo_version.outputs.version }}-${{ hashFiles('Cargo.toml') }}
37-
restore-keys: ${{ runner.os }}-${{ steps.cargo_version.outputs.version }}
38-
3926
- name: Run `cargo publish --dry-run`
4027
run: cargo publish --dry-run

.github/workflows/deploy_documentation.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ name: Deploy documentation
44
on:
55
push:
66
branches: [ dev ]
7+
workflow_dispatch:
78

89
env:
910
CARGO_TERM_COLOR: always
@@ -19,20 +20,11 @@ jobs:
1920
toolchain: nightly
2021
profile: minimal
2122

22-
- name: Download cache
23-
uses: actions/cache@v4
24-
with:
25-
path: |
26-
~/.cargo/registry/index/
27-
~/.cargo/registry/cache/
28-
~/.cargo/git/db/
29-
target/
30-
key: documentation
31-
3223
- name: Build documentation
3324
run: cargo +nightly doc --no-deps
3425

3526
- name: Deploy documentation
27+
if: ${{ github.event_name == 'branches' }}
3628
uses: peaceiris/actions-gh-pages@v3
3729
with:
3830
github_token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)