Skip to content

Modernize CMake configuration with best practices from cpp-best-practices #61

Modernize CMake configuration with best practices from cpp-best-practices

Modernize CMake configuration with best practices from cpp-best-practices #61

name: Ubuntu RISC-V Vector Extension
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths-ignore:
- '**.md'
- 'docs/**'
push:
branches:
- main
paths-ignore:
- '**.md'
- 'docs/**'
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
ubuntu-build:
strategy:
fail-fast: false
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Setup ENV
run: |
sudo apt-get update -y
sudo apt-get install -y cmake curl ninja-build \
g++-riscv64-linux-gnu \
gcc-riscv64-linux-gnu \
qemu-user-static qemu-user
- name: Build
run: |
export QEMU_LD_PREFIX="/usr/riscv64-linux-gnu"
export QEMU_CPU="rv64,vlen=128"
cmake -DCMAKE_TOOLCHAIN_FILE=cmake/toolchains-dev/riscv64-rvv.cmake \
-DADA_TESTING=ON \
-DADA_USE_SIMDUTF=ON \
-DCMAKE_BUILD_TYPE=Release \
-G Ninja -B build
cmake --build build -j=4
- name: Test
run: |
export QEMU_LD_PREFIX="/usr/riscv64-linux-gnu"
export QEMU_CPU="rv64,v=on,vlen=128"
ctest --output-on-failure --test-dir build