-
Notifications
You must be signed in to change notification settings - Fork 952
build: always cache LLVM source/build even if the tests fail to avoid extra rebuilds #3453
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
98f9e3b
40cfb86
9591144
e1b00c5
b0776b4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,12 @@ jobs: | |
build-windows: | ||
runs-on: windows-2022 | ||
steps: | ||
- name: Configure pagefile | ||
uses: al-cheb/[email protected] | ||
with: | ||
minimum-size: 8GB | ||
maximum-size: 24GB | ||
disk-root: "C:" | ||
- uses: brechtm/setup-scoop@v2 | ||
with: | ||
scoop_update: 'false' | ||
|
@@ -31,11 +37,11 @@ jobs: | |
with: | ||
go-version: '1.20' | ||
cache: true | ||
- name: Cache LLVM source | ||
uses: actions/cache@v3 | ||
- name: Restore cached LLVM source | ||
uses: actions/cache/restore@v3 | ||
id: cache-llvm-source | ||
with: | ||
key: llvm-source-15-windows-v2 | ||
key: llvm-source-15-windows-v4 | ||
path: | | ||
llvm-project/clang/lib/Headers | ||
llvm-project/clang/include | ||
|
@@ -45,11 +51,22 @@ jobs: | |
- name: Download LLVM source | ||
if: steps.cache-llvm-source.outputs.cache-hit != 'true' | ||
run: make llvm-source | ||
- name: Cache LLVM build | ||
uses: actions/cache@v3 | ||
- name: Save cached LLVM source | ||
uses: actions/cache/save@v3 | ||
if: steps.cache-llvm-source.outputs.cache-hit != 'true' | ||
with: | ||
key: ${{ steps.cache-llvm-source.outputs.cache-primary-key }} | ||
path: | | ||
llvm-project/clang/lib/Headers | ||
llvm-project/clang/include | ||
llvm-project/compiler-rt | ||
llvm-project/lld/include | ||
llvm-project/llvm/include | ||
- name: Restore cached LLVM build | ||
uses: actions/cache/restore@v3 | ||
id: cache-llvm-build | ||
with: | ||
key: llvm-build-15-windows-v3 | ||
key: llvm-build-15-windows-v5 | ||
path: llvm-build | ||
- name: Build LLVM | ||
if: steps.cache-llvm-build.outputs.cache-hit != 'true' | ||
|
@@ -62,6 +79,12 @@ jobs: | |
make llvm-build CCACHE=OFF | ||
# Remove unnecessary object files (to reduce cache size). | ||
find llvm-build -name CMakeFiles -prune -exec rm -r '{}' \; | ||
- name: Save cached LLVM build | ||
uses: actions/cache/save@v3 | ||
if: steps.cache-llvm-build.outputs.cache-hit != 'true' | ||
with: | ||
key: ${{ steps.cache-llvm-build.outputs.cache-primary-key }} | ||
path: llvm-build | ||
- name: Cache wasi-libc sysroot | ||
uses: actions/cache@v3 | ||
id: cache-wasi-libc | ||
|
@@ -100,6 +123,12 @@ jobs: | |
runs-on: windows-2022 | ||
needs: build-windows | ||
steps: | ||
- name: Configure pagefile | ||
uses: al-cheb/[email protected] | ||
with: | ||
minimum-size: 8GB | ||
maximum-size: 24GB | ||
disk-root: "C:" | ||
Comment on lines
+126
to
+131
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Was the page file too small? Or why did you add this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The idea is to give more virtual memory via pagefile to the Windows build instances, since they have unused space on C: drive. See https://github.com/easimon/maximize-build-space#how-it-works for the inspiration. Did it actually help? I cannot say really. |
||
- uses: brechtm/setup-scoop@v2 | ||
with: | ||
scoop_update: 'false' | ||
|
@@ -131,6 +160,12 @@ jobs: | |
runs-on: windows-2022 | ||
needs: build-windows | ||
steps: | ||
- name: Configure pagefile | ||
uses: al-cheb/[email protected] | ||
with: | ||
minimum-size: 8GB | ||
maximum-size: 24GB | ||
disk-root: "C:" | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Install Go | ||
|
@@ -154,6 +189,12 @@ jobs: | |
runs-on: windows-2022 | ||
needs: build-windows | ||
steps: | ||
- name: Configure pagefile | ||
uses: al-cheb/[email protected] | ||
with: | ||
minimum-size: 8GB | ||
maximum-size: 24GB | ||
disk-root: "C:" | ||
- uses: brechtm/setup-scoop@v2 | ||
with: | ||
scoop_update: 'false' | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you add this step?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of the LLVM source is cached and also all of the LLVM builds are cached for each of the build platforms which need it.