File tree Expand file tree Collapse file tree 1 file changed +29
-2
lines changed
Expand file tree Collapse file tree 1 file changed +29
-2
lines changed Original file line number Diff line number Diff line change @@ -2,19 +2,46 @@ name: Build
22
33on : [push, pull_request]
44
5+ # Cancel in-progress runs for the same branch/PR to avoid wasting resources.
6+ concurrency :
7+ group : ${{ github.workflow }}-${{ github.ref }}
8+ cancel-in-progress : true
9+
510jobs :
611 build :
712 name : build (ubuntu-latest)
813 runs-on : ubuntu-latest
914 permissions :
1015 contents : read
16+ env :
17+ CCACHE_DIR : ${{ github.workspace }}/.ccache
1118 steps :
1219 - uses : actions/checkout@v4
20+
1321 - name : Install dependencies
1422 run : |
1523 sudo apt-get -q update
1624 sudo apt-get -q -y install \
17- make gcc libssl-dev libcurl4-openssl-dev libexpat-dev \
25+ make gcc ccache libssl-dev libcurl4-openssl-dev libexpat-dev \
1826 zlib1g-dev gettext libpcre2-dev
27+
28+ - name : Restore build cache
29+ uses : actions/cache@v4
30+ with :
31+ path : ${{ env.CCACHE_DIR }}
32+ key : ccache-build-${{ github.ref_name }}-${{ github.run_id }}
33+ restore-keys : |
34+ ccache-build-${{ github.ref_name }}-
35+ ccache-build-
36+
1937 - name : Build
20- run : make
38+ run : |
39+ export PATH="/usr/lib/ccache:$PATH"
40+ ccache --zero-stats
41+ make
42+ ccache --show-stats
43+
44+ - name : Smoke test
45+ run : |
46+ ./git --version
47+ ./git init --bare /tmp/smoke-test-repo
You can’t perform that action at this time.
0 commit comments