ci : use default RISE RISC-V Runners (#21263)

This commit is contained in:
Ludovic Henry 2026-04-05 20:29:48 +02:00 committed by GitHub
parent 5d3a4a7da5
commit 761797ffdf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 32 additions and 53 deletions

View File

@ -35,7 +35,7 @@ env:
jobs: jobs:
ubuntu-riscv64-native-sanitizer: ubuntu-riscv64-native-sanitizer:
runs-on: RISCV64 runs-on: ubuntu-24.04-riscv
continue-on-error: true continue-on-error: true
@ -50,17 +50,18 @@ jobs:
sudo apt-get update sudo apt-get update
# Install necessary packages # Install necessary packages
sudo apt-get install -y libatomic1 libtsan2 gcc-14 g++-14 rustup cmake build-essential wget ccache git-lfs 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 # 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/gcc gcc /usr/bin/gcc-14 100
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-14 100 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-14 100
sudo ln -sf /usr/bin/gcc-14 /usr/bin/gcc
sudo ln -sf /usr/bin/g++-14 /usr/bin/g++
# Install Rust stable version if ! which rustc; then
rustup install stable # Install Rust stable version
rustup default stable sudo apt-get install -y rustup
rustup install stable
rustup default stable
fi
git lfs install git lfs install
@ -73,23 +74,12 @@ jobs:
id: checkout id: checkout
uses: actions/checkout@v6 uses: actions/checkout@v6
- name: Setup ccache # FIXME: Enable when ggml-org/ccache-action works on riscv64
run: | # - name: ccache
# Unique cache directory per matrix combination # uses: ggml-org/ccache-action@v1.2.21
export CCACHE_DIR="$HOME/.ccache/sanitizer-${{ matrix.sanitizer }}-${{ matrix.build_type }}" # with:
mkdir -p "$CCACHE_DIR" # key: ubuntu-riscv64-native-sanitizer-${{ matrix.sanytizer }}-${{ matrix.build_type }}
# save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
# Configure ccache
ccache --set-config=max_size=5G
ccache --set-config=compression=true
ccache --set-config=compression_level=6
ccache --set-config=cache_dir="$CCACHE_DIR"
ccache --set-config=sloppiness=file_macro,time_macros,include_file_mtime,include_file_ctime
ccache --set-config=hash_dir=false
# Export for subsequent steps
echo "CCACHE_DIR=$CCACHE_DIR" >> $GITHUB_ENV
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
- name: Build - name: Build
id: cmake_build id: cmake_build

View File

@ -996,7 +996,7 @@ jobs:
cmake --build build -j ${env:NUMBER_OF_PROCESSORS} cmake --build build -j ${env:NUMBER_OF_PROCESSORS}
ubuntu-cpu-riscv64-native: ubuntu-cpu-riscv64-native:
runs-on: RISCV64 runs-on: ubuntu-24.04-riscv
steps: steps:
- name: Install dependencies - name: Install dependencies
@ -1004,24 +1004,21 @@ jobs:
sudo apt-get update sudo apt-get update
# Install necessary packages # Install necessary packages
sudo apt-get install -y libatomic1 libtsan2 gcc-14 g++-14 rustup cmake build-essential libssl-dev wget ccache git-lfs sudo apt-get install -y libatomic1 libtsan2 gcc-14 g++-14 cmake build-essential libssl-dev wget git-lfs
# Set gcc-14 and g++-14 as the default compilers # 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/gcc gcc /usr/bin/gcc-14 100
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-14 100 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-14 100
sudo ln -sf /usr/bin/gcc-14 /usr/bin/gcc
sudo ln -sf /usr/bin/g++-14 /usr/bin/g++
# Install Rust stable version if ! which rustc; then
rustup install stable # Install Rust stable version
rustup default stable sudo apt-get install -y rustup
rustup install stable
rustup default stable
fi
git lfs install git lfs install
- name: Clone
id: checkout
uses: actions/checkout@v6
- name: Check environment - name: Check environment
run: | run: |
uname -a uname -a
@ -1031,25 +1028,17 @@ jobs:
cmake --version cmake --version
rustc --version rustc --version
- name: Setup ccache - name: Clone
run: | id: checkout
# Set unique cache directory for this job uses: actions/checkout@v6
export CCACHE_DIR="$HOME/.ccache/cpu-cmake-rv64-native"
mkdir -p "$CCACHE_DIR"
# Configure ccache for optimal performance # FIXME: Enable when ggml-org/ccache-action works on riscv64
ccache --set-config=max_size=5G # - name: ccache
ccache --set-config=compression=true # uses: ggml-org/ccache-action@v1.2.21
ccache --set-config=compression_level=6 # with:
ccache --set-config=cache_dir="$CCACHE_DIR" # key: ubuntu-cpu-riscv64-native
# evict-old-files: 1d
# Enable more aggressive caching # save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
ccache --set-config=sloppiness=file_macro,time_macros,include_file_mtime,include_file_ctime
ccache --set-config=hash_dir=false
# Export for subsequent steps
echo "CCACHE_DIR=$CCACHE_DIR" >> $GITHUB_ENV
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
- name: Build - name: Build
id: cmake_build id: cmake_build