-
Notifications
You must be signed in to change notification settings - Fork 528
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: Add ccache to GitHub Actions build tests (#1935)
Depending on an individual build test, adding ccache currently reduces build test time 35-60% (e.g., from 6m42s to 4m18s and from 17m to 7m). Problematic ccache entries can be removed using GitHub API. For example: gh -R squid-cache/squid cache list gh -R squid-cache/squid cache delete <cache-key|"all"> Do not add ccache to MacOS build tests because I had mixed experience with that optimization on that OS.
- Loading branch information
1 parent
884dcf4
commit 627cca6
Showing
2 changed files
with
17 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -116,8 +116,8 @@ jobs: | |
name: build-tests(${{ matrix.os }},${{ matrix.compiler.CC }},${{ matrix.layer.nick }}) | ||
|
||
env: | ||
CC: ${{ matrix.compiler.CC }} | ||
CXX: ${{ matrix.compiler.CXX }} | ||
CC: /usr/bin/ccache ${{ matrix.compiler.CC }} | ||
CXX: /usr/bin/ccache ${{ matrix.compiler.CXX }} | ||
|
||
steps: | ||
|
||
|
@@ -127,11 +127,17 @@ jobs: | |
sudo sed --in-place -E 's/# (deb-src.*updates main)/ \1/g' /etc/apt/sources.list | ||
sudo apt-get --quiet=2 update | ||
sudo apt-get --quiet=2 build-dep squid | ||
sudo apt-get --quiet=2 install linuxdoc-tools libtool-bin ${{ matrix.compiler.CC }} | ||
sudo apt-get --quiet=2 install linuxdoc-tools libtool-bin ${{ matrix.compiler.CC }} ccache | ||
- name: Checkout sources | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup ccache | ||
uses: squid-cache/[email protected] | ||
with: | ||
verbose: 2 # default 0 | ||
key: ${{ matrix.os }}-${{ matrix.compiler.CC }}-${{ matrix.layer.nick }} | ||
|
||
- name: Run build on Linux | ||
run: ./test-builds.sh ${{ matrix.layer.name }} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,13 +49,19 @@ jobs: | |
|
||
name: linux-distros(${{ matrix.os }},${{ matrix.compiler.CC }},${{ matrix.layer.nick }}) | ||
env: | ||
CC: ${{ matrix.compiler.CC }} | ||
CXX: ${{ matrix.compiler.CXX }} | ||
CC: /usr/bin/ccache ${{ matrix.compiler.CC }} | ||
CXX: /usr/bin/ccache ${{ matrix.compiler.CXX }} | ||
|
||
steps: | ||
- name: Checkout Sources | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup ccache | ||
uses: squid-cache/[email protected] | ||
with: | ||
verbose: 2 # default 0 | ||
key: ${{ matrix.os }}-${{ matrix.compiler.CC }}-${{ matrix.layer.nick }} | ||
|
||
- name: Run test-builds | ||
id: test-builds | ||
run: | | ||
|