Fix ccache getting disabled (#2905)
Some checks failed
Build and Test / Check Lint (push) Has been cancelled
Build and Test / Linux (cpu, aarch64) (push) Has been cancelled
Build and Test / Linux (cpu, x86_64) (push) Has been cancelled
Build and Test / Linux (cuda-12.6, aarch64) (push) Has been cancelled
Build and Test / Linux (cuda-12.9, aarch64) (push) Has been cancelled
Build and Test / Linux (cuda-12.6, x86_64) (push) Has been cancelled
Build and Test / Linux (cuda-12.9, x86_64) (push) Has been cancelled
Build and Test / macOS (14.0) (push) Has been cancelled
Build and Test / macOS (15.0) (push) Has been cancelled
Build and Test / Build Documentation (push) Has been cancelled
Build and Test / Linux Fedora (aarch64) (push) Has been cancelled
Build and Test / Linux Fedora (x86_64) (push) Has been cancelled

This commit is contained in:
Cheng
2025-12-13 13:00:51 +09:00
committed by GitHub
parent ccaaa7d6df
commit bedefed784
2 changed files with 15 additions and 7 deletions

View File

@@ -10,23 +10,29 @@ inputs:
description: 'Version of python to set up' description: 'Version of python to set up'
required: false required: false
default: '3.10' default: '3.10'
use-ccache:
description: 'Whether to enable ccache'
required: false
default: 'true'
runs: runs:
using: "composite" using: "composite"
steps: steps:
- name: Use ccache
if: ${{ runner.arch == 'x86_64' }}
uses: hendrikmuhs/ccache-action@v1.2
with:
key: ccache-${{ runner.os }}-${{ runner.arch }}-${{ inputs.toolkit }}-py${{ inputs.python-version }}
max-size: 1GB
- name: Install common dependencies - name: Install common dependencies
shell: bash shell: bash
run: | run: |
sudo apt-get update sudo apt-get update
sudo apt-get install -y libblas-dev liblapack-dev liblapacke-dev zip sudo apt-get install -y libblas-dev liblapack-dev liblapacke-dev zip
- name: Use ccache
if: ${{ inputs.use-ccache == 'true' }}
uses: hendrikmuhs/ccache-action@v1.2
with:
key: ccache-${{ runner.os }}-${{ runner.arch }}-${{ inputs.toolkit }}
max-size: 1GB
# ccache-action bug: running "apt-get update" fails on large arm runner.
update-package-index: false
- uses: actions/setup-python@v6 - uses: actions/setup-python@v6
with: with:
python-version: ${{ inputs.python-version }} python-version: ${{ inputs.python-version }}

View File

@@ -57,6 +57,7 @@ jobs:
- uses: ./.github/actions/setup-linux - uses: ./.github/actions/setup-linux
with: with:
python-version: ${{ matrix.python_version }} python-version: ${{ matrix.python_version }}
use-ccache: false
- uses: ./.github/actions/build-linux-release - uses: ./.github/actions/build-linux-release
with: with:
build-backend: ${{ matrix.python-version == '3.10' }} build-backend: ${{ matrix.python-version == '3.10' }}
@@ -141,6 +142,7 @@ jobs:
- uses: ./.github/actions/setup-linux - uses: ./.github/actions/setup-linux
with: with:
toolkit: ${{ matrix.toolkit }} toolkit: ${{ matrix.toolkit }}
use-ccache: false
- name: Build Python package - name: Build Python package
uses: ./.github/actions/build-cuda-release uses: ./.github/actions/build-cuda-release
with: with: