From 8612ed18b7d2896009f255c11eb002aa7bfa9057 Mon Sep 17 00:00:00 2001 From: Ludovic Henry Date: Thu, 16 Apr 2026 10:11:25 +0200 Subject: [PATCH] ci : Use ggml-org/ccache-action on RISC-V as well (#21632) --- .github/workflows/build-riscv.yml | 24 ++++++------------------ .github/workflows/build.yml | 25 ++++++++----------------- 2 files changed, 14 insertions(+), 35 deletions(-) diff --git a/.github/workflows/build-riscv.yml b/.github/workflows/build-riscv.yml index 9733dbaa7..b78b13140 100644 --- a/.github/workflows/build-riscv.yml +++ b/.github/workflows/build-riscv.yml @@ -47,22 +47,10 @@ jobs: steps: - name: Install dependencies run: | - sudo apt-get update - - # Install necessary packages - sudo apt-get install -y libatomic1 libtsan2 gcc-14 g++-14 cmake build-essential wget git-lfs - # Set gcc-14 and g++-14 as the default compilers sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 100 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-14 100 - if ! which rustc; then - # Install Rust stable version - sudo apt-get install -y rustup - rustup install stable - rustup default stable - fi - git lfs install - name: GCC version check @@ -74,12 +62,12 @@ jobs: id: checkout uses: actions/checkout@v6 - # FIXME: Enable when ggml-org/ccache-action works on riscv64 - # - name: ccache - # uses: ggml-org/ccache-action@v1.2.21 - # with: - # key: ubuntu-riscv64-native-sanitizer-${{ matrix.sanytizer }}-${{ matrix.build_type }} - # save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} + - name: ccache + uses: ggml-org/ccache-action@afde29e5b5422e5da23cb1f639e8baecadeadfc3 # https://github.com/ggml-org/ccache-action/pull/1 + with: + key: ubuntu-riscv64-native-sanitizer-${{ matrix.sanitizer }}-${{ matrix.build_type }} + evict-old-files: 1d + save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} - name: Build id: cmake_build diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 989ecc3cc..98e2d4911 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1001,22 +1001,14 @@ jobs: steps: - name: Install dependencies run: | - sudo apt-get update - # Install necessary packages - sudo apt-get install -y libatomic1 libtsan2 gcc-14 g++-14 cmake build-essential libssl-dev wget git-lfs + sudo apt-get update + sudo apt-get install -y libssl-dev # Set gcc-14 and g++-14 as the default compilers sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 100 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-14 100 - if ! which rustc; then - # Install Rust stable version - sudo apt-get install -y rustup - rustup install stable - rustup default stable - fi - git lfs install - name: Check environment @@ -1032,13 +1024,12 @@ jobs: id: checkout uses: actions/checkout@v6 - # FIXME: Enable when ggml-org/ccache-action works on riscv64 - # - name: ccache - # uses: ggml-org/ccache-action@v1.2.21 - # with: - # key: ubuntu-cpu-riscv64-native - # evict-old-files: 1d - # save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} + - name: ccache + uses: ggml-org/ccache-action@afde29e5b5422e5da23cb1f639e8baecadeadfc3 # https://github.com/ggml-org/ccache-action/pull/1 + with: + key: ubuntu-cpu-riscv64-native + evict-old-files: 1d + save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} - name: Build id: cmake_build