Skip to content

Actually enable the cache #20

Actually enable the cache

Actually enable the cache #20

Workflow file for this run

name: Pixi-based CI
on: [push, pull_request]
jobs:
default:
strategy:
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
env:
BUILDCACHE_MAX_CACHE_SIZE: 2000000000 # optional: Need a bigger cache?
# BUILDCACHE_LOG_FILE: ${{ matrix.label }}.buildcache.log # optional: include log output
# BUILDCACHE_DEBUG: 2 # optional: debug level, less is more
BUILDCACHE_DIRECT_MODE: true # optional: Allow direct caching
steps:
- uses: actions/checkout@v4
- uses: prefix-dev/setup-pixi@v0.5.1
with:
pixi-version: v0.17.1
cache: true
- uses: mjcarroll/buildcache-action@v2
with:
cache_key: ${{ matrix.label }}
upload_buildcache_log: 'false'
zero_buildcache_stats: 'true'
- run: pixi run sync
- name: Export compiler variables [Linux]
if: contains(matrix.os, 'ubuntu')
shell: bash -l {0}
run: |
echo "BUILDCACHE_CC=x86_64-conda-linux-gnu-gcc" >> $GITHUB_ENV
echo "BUILDCACHE_CXX=x86_64-conda-linux-gnu-g++" >> $GITHUB_ENV
- run: pixi run build --cmake-args -DCMAKE_C_COMPILER=$BUILDCACHE_CC -DCMAKE_CXX_COMPILER=$BUILDCACHE_CXX