Skip to content

Enable ccache in CI #1128

Enable ccache in CI

Enable ccache in CI #1128

Workflow file for this run

name: "Build"
on:
pull_request:
push:
branches:
- main
jobs:
test:
strategy:
fail-fast: false
matrix:
include:
# Ubuntu
## Lint all sources
- name: Ubuntu - lint
os: ubuntu-24.04
lint: true
## Debug + clang-tidy + coverage
- name: Ubuntu - debug, analysis, coverage
os: ubuntu-24.04
build_type: Debug
sanitize: none
coverage: on
analyze: on
## Debug + sanitization
- name: Ubuntu - address sanitizer
os: ubuntu-24.04
build_type: Debug
sanitize: address
- name: Ubuntu - undefined behavior sanitizer
os: ubuntu-24.04
build_type: Debug
sanitize: undefined
- name: Ubuntu - thread sanitizer
os: ubuntu-24.04
build_type: Debug
sanitize: thread
## Release
- name: Ubuntu - release
os: ubuntu-24.04
build_type: Release
sanitize: none
runs-on: ${{ matrix.os }}
name: ${{ matrix.name }}
env:
JANK_MATRIX_ID: ${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.sanitize }}
JANK_BUILD_TYPE: ${{ matrix.build_type }}
JANK_LINT: ${{ matrix.lint }}
JANK_COVERAGE: ${{ matrix.coverage }}
JANK_ANALYZE: ${{ matrix.analyze }}
JANK_SANITIZE: ${{ matrix.sanitize }}
ASAN_OPTIONS: detect_leaks=0
TERM: xterm
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: awalsh128/cache-apt-pkgs-action@v1.4.3
with:
packages: default-jdk software-properties-common lsb-release npm lcov leiningen ccache curl git git-lfs zip build-essential entr libssl-dev libdouble-conversion-dev pkg-config ninja-build cmake zlib1g-dev libffi-dev libzip-dev libbz2-dev doctest-dev libboost-all-dev gcc g++ libgc-dev
# Increment this when the package list changes.
version: 3
execute_install_scripts: true
- name: Cache object files
uses: actions/cache@v4
with:
path: |
${{ github.workspace }}/compiler+runtime/.ccache
${{ github.workspace }}/compiler+runtime/.ctcache
key: ${{ env.JANK_MATRIX_ID }}
- name: Build and test
run: |
curl -sL -o install-bb https://raw.githubusercontent.com/babashka/babashka/master/install
chmod +x install-bb
sudo ./install-bb
./bin/jank/check_everything.clj