github-ci: use sccache for gcc in commits workflow

Previously was only used for Rust.
pull/6444/head
Jason Ish 5 years ago
parent fa72a5add8
commit d18fc4f3f0

@ -23,7 +23,6 @@ jobs:
build-essential \ build-essential \
autoconf \ autoconf \
automake \ automake \
ccache \
curl \ curl \
git \ git \
jq \ jq \
@ -61,7 +60,6 @@ jobs:
mkdir -p "$HOME/.cargo/bin" mkdir -p "$HOME/.cargo/bin"
(cd "$HOME/.cargo/bin" && tar xvf /tmp/sccache-0.2.13-x86_64-unknown-linux-musl.tar.gz --strip-components=1 --wildcards '*/sccache') (cd "$HOME/.cargo/bin" && tar xvf /tmp/sccache-0.2.13-x86_64-unknown-linux-musl.tar.gz --strip-components=1 --wildcards '*/sccache')
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV
- run: echo "/usr/lib/ccache" >> $GITHUB_PATH
- name: Install cbindgen - name: Install cbindgen
run: | run: |
cd $HOME/.cargo/bin cd $HOME/.cargo/bin
@ -77,7 +75,7 @@ jobs:
git checkout $rev git checkout $rev
echo "Building rev ${rev}" | tee -a build_log.txt echo "Building rev ${rev}" | tee -a build_log.txt
./autogen.sh >> build_log.txt 2>&1 ./autogen.sh >> build_log.txt 2>&1
./configure --enable-unittests >> build_log.txt 2>&1 CC="sccache gcc" ./configure --enable-unittests >> build_log.txt 2>&1
if ! make -j2 >> build_log.txt 2>&1; then if ! make -j2 >> build_log.txt 2>&1; then
echo "::error ::Failed to build rev ${rev}" echo "::error ::Failed to build rev ${rev}"
tail -n 50 build_log.txt tail -n 50 build_log.txt

Loading…
Cancel
Save