Refactor Risc-V cpu features #3836
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Arm-SVE cross-compilation build | |
| on: [push, pull_request] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.job }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| name: 'Arm SVE${{ matrix.vector_bits }}' | |
| strategy: | |
| matrix: | |
| vector_bits: | |
| - 128 | |
| - 256 | |
| - 512 | |
| steps: | |
| - name: Setup compiler | |
| run: | | |
| sudo apt-get update || exit 1 | |
| sudo apt-get --no-install-suggests --no-install-recommends install g++-10-aarch64-linux-gnu || exit 1 | |
| sudo update-alternatives --install /usr/bin/aarch64-linux-gnu-gcc aarch64-linux-gnu-gcc /usr/bin/aarch64-linux-gnu-gcc-10 20 | |
| sudo update-alternatives --install /usr/bin/aarch64-linux-gnu-g++ aarch64-linux-gnu-g++ /usr/bin/aarch64-linux-gnu-g++-10 20 | |
| - name: Setup QEMU | |
| run: | | |
| sudo apt-get --no-install-suggests --no-install-recommends install qemu-user | |
| - name: Setup Ninja | |
| run: | | |
| sudo apt-get install ninja-build | |
| - name: Checkout xsimd | |
| uses: actions/checkout@v6 | |
| - name: Setup | |
| run: | | |
| cmake -B _build \ | |
| -GNinja \ | |
| -DBUILD_TESTS=ON -DDOWNLOAD_DOCTEST=ON \ | |
| -DCMAKE_BUILD_TYPE=Release \ | |
| -DTARGET_ARCH=generic \ | |
| -DCMAKE_C_FLAGS="-march=armv8-a+sve -msve-vector-bits=${{ matrix.vector_bits }}" \ | |
| -DCMAKE_CXX_FLAGS="-march=armv8-a+sve -msve-vector-bits=${{ matrix.vector_bits }}" \ | |
| -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/.github/toolchains/gcc-aarch64-linux-gnu.cmake | |
| - name: Build | |
| run: cmake --build _build | |
| - name: Set CPU feature test expectations | |
| run: | | |
| echo "XSIMD_TEST_CPU_ASSUME_SSE4_2=0" >> "$GITHUB_ENV" | |
| echo "XSIMD_TEST_CPU_ASSUME_RVV=0" >> "$GITHUB_ENV" | |
| echo "XSIMD_TEST_CPU_ASSUME_NEON64=1" >> "$GITHUB_ENV" | |
| echo "XSIMD_TEST_CPU_ASSUME_SVE=1" >> "$GITHUB_ENV" | |
| echo "XSIMD_TEST_CPU_ASSUME_MANUFACTURER=unknown" >> "$GITHUB_ENV" | |
| - name: Testing xsimd | |
| run: qemu-aarch64 --cpu max,sve${{ matrix.vector_bits }}=on -L /usr/aarch64-linux-gnu/ ./test/test_xsimd | |
| working-directory: ${{ github.workspace }}/_build |