mirror of
https://github.com/terrapkg/packages.git
synced 2026-06-28 14:28:28 +00:00
ci: add sccache
This commit is contained in:
@@ -30,6 +30,10 @@ on:
|
||||
type: boolean
|
||||
default: true
|
||||
|
||||
env:
|
||||
RUSTC_WRAPPER: sccache
|
||||
SCCACHE_GHA_ENABLED: on
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
@@ -63,6 +67,17 @@ jobs:
|
||||
run: |
|
||||
dir=$(dirname ${{ matrix.pkg.pkg }})
|
||||
dnf5 builddep -y ${dir}/*.spec
|
||||
# todo: probably add sccache in the builder image
|
||||
dnf5 install -y sccache
|
||||
|
||||
- name: Configure sccache
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
core.exportVariable('ACTIONS_RESULTS_URL', process.env.ACTIONS_RESULTS_URL || '');
|
||||
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
|
||||
core.exportVariable('SCCACHE_GHA_VERSION', `${{ matrix.pkg.pkg }}-${{ matrix.version }}-${{ matrix.pkg.arch }}`);
|
||||
core.exportVariable('SCCACHE_GHA_CACHE_FROM', `${{ matrix.pkg.pkg }}-${{ matrix.version }}-${{ matrix.pkg.arch }}`);
|
||||
|
||||
- name: Build with Andaman
|
||||
run: anda build -D "vendor Terra" ${{ matrix.pkg.pkg }} -c terra-${{ matrix.version }}-${{ matrix.pkg.arch }} ${{ !matrix.pkg.labels.mock == '1' && '-rrpmbuild' || '' }}
|
||||
|
||||
Reference in New Issue
Block a user