Skip to content

Commit

Permalink
ci: use treeless clones (#971)
Browse files Browse the repository at this point in the history
## Summary
With the release of actions/checkout@v4.1.0, partial clone is now
supported.

This feature allows us to clone only the latest files but with all of
git history attached, giving us full commit tags and the lower cost of 
`--depth=1` .

At the time of writing, this dropped CI clone time from over 60s to just
3-9s.

For a primer on treeless clones, see:

https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
  • Loading branch information
alaviss authored Oct 18, 2023
1 parent c79520f commit 2cd9985
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
filter: tree:0

- name: Enable annotations
run: echo "::add-matcher::.github/nim-problem-matcher.json"
Expand Down Expand Up @@ -153,6 +154,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
filter: tree:0

- uses: ./.github/actions/download-compiler

Expand Down Expand Up @@ -201,6 +203,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
filter: tree:0

- uses: ./.github/actions/download-compiler

Expand All @@ -220,6 +223,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
filter: tree:0

- uses: ./.github/actions/download-compiler

Expand Down Expand Up @@ -332,6 +336,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
filter: tree:0

- uses: ./.github/actions/download-compiler

Expand Down Expand Up @@ -393,6 +398,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
filter: tree:0

- uses: ./.github/actions/download-compiler

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/reproducible.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
filter: tree:0

# reprotest will manipulate the time which may cause bootstrapping
# source download to fail due to SSL errors. Download this beforehand
Expand Down

0 comments on commit 2cd9985

Please sign in to comment.