Skip to content

Commit 2d54b57

Browse files
committed
Revert "Run only windows"
This reverts commit 15745ae.
1 parent 65030dd commit 2d54b57

19 files changed

Lines changed: 894 additions & 0 deletions

.github/workflows/android.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Android build
2+
on: [push, pull_request]
3+
concurrency:
4+
group: ${{ github.workflow }}-${{ github.job }}-${{ github.ref }}
5+
cancel-in-progress: true
6+
jobs:
7+
test:
8+
runs-on: ubuntu-latest
9+
strategy:
10+
matrix:
11+
target:
12+
- armeabi-v7a
13+
- arm64-v8a
14+
- x86
15+
- x86_64
16+
api:
17+
- 16
18+
- 18
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v6
22+
23+
- name: Build script
24+
env:
25+
TARGET: ${{ matrix.target }}
26+
API: ${{ matrix.api }}
27+
run: |
28+
NDK="$($ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --list_installed | sed -E 's/( +[|] +)/|/g;s/ +$//' | grep '^ ndk' | cut -d '|' -f 4 | sort | head -n1)"
29+
cmake -B _build \
30+
-DCMAKE_TOOLCHAIN_FILE=$ANDROID_HOME/$NDK/build/cmake/android.toolchain.cmake \
31+
-DBUILD_TESTS=ON -DDOWNLOAD_DOCTEST=ON \
32+
-DANDROID_ABI=$ABI -DANDROID_PLATFORM=android-$API \
33+
-DCMAKE_BUILD_TYPE=Release
34+
cmake --build _build --verbose
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Arch consistency check
2+
on: [push, pull_request]
3+
concurrency:
4+
group: ${{ github.workflow }}-${{ github.job }}-${{ github.ref }}
5+
cancel-in-progress: true
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout xsimd
11+
uses: actions/checkout@v6
12+
- name: Install dependencies
13+
run: sudo apt install g++
14+
- name: Check architecture consistency
15+
run: cd test && sh ./check_arch.sh

.github/workflows/benchmark.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: benchmark & examples
2+
on: [push, pull_request]
3+
concurrency:
4+
group: ${{ github.workflow }}-${{ github.job }}-${{ github.ref }}
5+
cancel-in-progress: true
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v6
11+
- name: Setup
12+
run: cmake -B _build -DBUILD_BENCHMARK=ON -DBUILD_EXAMPLES=ON -DCMAKE_BUILD_TYPE=Release
13+
- name: Build
14+
run: cmake --build _build
15+
- name: Testing sequential
16+
run: cmake --build _build --target xbenchmark
17+

.github/workflows/cmake.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: CMake integration
2+
on: [push, pull_request]
3+
concurrency:
4+
group: ${{ github.workflow }}-${{ github.job }}-${{ github.ref }}
5+
cancel-in-progress: true
6+
defaults:
7+
run:
8+
shell: bash -l {0}
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout xsimd
14+
uses: actions/checkout@v6
15+
- name: Configure build
16+
run: cmake -B _build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=_install
17+
- name: Build
18+
run: cmake --build _build --target install
19+
- name: Check install
20+
run: |
21+
mkdir _install_build && cd _install_build
22+
cp ${{ github.workspace }}/.github/cmake-test/* .
23+
ls $PWD/../_install/share/cmake/xsimd
24+
cmake . -DCMAKE_PREFIX_PATH=$PWD/../_install/share/cmake/xsimd
25+
cmake --build .
26+

.github/workflows/cross-arm.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Arm cross-compilation build
2+
on: [push, pull_request]
3+
concurrency:
4+
group: ${{ github.workflow }}-${{ github.job }}-${{ github.ref }}
5+
cancel-in-progress: true
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
name: '${{ matrix.target.arch }}, ${{ matrix.sys.compiler }} ${{ matrix.sys.version }}'
10+
strategy:
11+
matrix:
12+
target:
13+
- { platform: 'arm', arch: 'armv7-a', dir: 'arm-linux-gnueabihf', flags: '-mfpu=neon', full: 'ON'}
14+
- { platform: 'arm', arch: 'armv7-a', dir: 'arm-linux-gnueabihf', flags: '-mfpu=vfpv3-d16', full: 'OFF' } # no neon
15+
- { platform: 'aarch64', arch: 'armv8-a', dir: 'aarch64-linux-gnu', flags: '', full: 'ON' }
16+
sys:
17+
- { compiler: 'gcc', version: '10' }
18+
- { compiler: 'gcc', version: '14' }
19+
steps:
20+
- name: Setup compiler
21+
if: ${{ matrix.sys.compiler == 'gcc' }}
22+
run: |
23+
sudo apt-get update || exit 1
24+
sudo apt-get --no-install-suggests --no-install-recommends install g++-${{ matrix.sys.version }}-${{ matrix.target.dir }} g++-${{ matrix.sys.version }}-multilib || exit 1
25+
sudo update-alternatives --remove-all ${{ matrix.target.dir }}-gcc || true
26+
sudo update-alternatives --remove-all ${{ matrix.target.dir }}-g++ || true
27+
sudo update-alternatives --install /usr/bin/${{ matrix.target.dir }}-gcc ${{ matrix.target.dir }}-gcc /usr/bin/${{ matrix.target.dir }}-gcc-${{ matrix.sys.version }} 20
28+
sudo update-alternatives --install /usr/bin/${{ matrix.target.dir }}-g++ ${{ matrix.target.dir }}-g++ /usr/bin/${{ matrix.target.dir }}-g++-${{ matrix.sys.version }} 20
29+
- name: Setup QEMU
30+
run: |
31+
sudo apt-get --no-install-suggests --no-install-recommends install qemu-user
32+
- name: Setup Ninja
33+
run: |
34+
sudo apt-get install ninja-build
35+
- name: Checkout xsimd
36+
uses: actions/checkout@v6
37+
- name: Setup
38+
run: |
39+
cmake -B _build \
40+
-DBUILD_TESTS=ON -DDOWNLOAD_DOCTEST=ON -DBUILD_BENCHMARK=${{ matrix.target.full }} \
41+
-DBUILD_EXAMPLES=${{ matrix.target.full }} -DCMAKE_BUILD_TYPE=Release \
42+
-DTARGET_ARCH=generic \
43+
-DCMAKE_C_FLAGS="-march=${{ matrix.target.arch }} ${{ matrix.target.flags }}" \
44+
-DCMAKE_CXX_FLAGS="-march=${{ matrix.target.arch }} ${{ matrix.target.flags }}" \
45+
-DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/.github/toolchains/${{ matrix.sys.compiler }}-${{ matrix.target.dir }}.cmake
46+
- name: Build
47+
run: cmake --build _build
48+
- name: Testing xsimd
49+
run: qemu-${{ matrix.target.platform }} -L /usr/${{ matrix.target.dir}}/ ./test/test_xsimd
50+
working-directory: ${{ github.workspace }}/_build

.github/workflows/cross-ppc.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: PowerPC cross-compilation build
2+
on: [push, pull_request]
3+
concurrency:
4+
group: ${{ github.workflow }}-${{ github.job }}-${{ github.ref }}
5+
cancel-in-progress: true
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
name: '${{ matrix.target.platform }}, ${{ matrix.sys.compiler }} ${{ matrix.sys.version }}'
11+
strategy:
12+
matrix:
13+
target:
14+
- { platform: 'ppc64le', dir: 'powerpc64le-linux-gnu', flags: '-maltivec -mvsx -mcpu=power10', full: 'OFF' }
15+
- { platform: 'ppc64', dir: 'powerpc64-linux-gnu', flags: '-maltivec -mvsx -mcpu=power10', full: 'OFF' }
16+
sys:
17+
- { compiler: 'gcc', version: '12' }
18+
steps:
19+
- name: Setup compiler
20+
if: ${{ matrix.sys.compiler == 'gcc' }}
21+
run: |
22+
sudo apt-get update || exit 1
23+
sudo apt-get --no-install-suggests --no-install-recommends install g++-${{ matrix.sys.version }}-${{ matrix.target.dir }} g++-${{ matrix.sys.version }}-multilib || exit 1
24+
sudo update-alternatives --remove-all ${{ matrix.target.dir }}-gcc || true
25+
sudo update-alternatives --remove-all ${{ matrix.target.dir }}-g++ || true
26+
sudo update-alternatives --install /usr/bin/${{ matrix.target.dir }}-gcc ${{ matrix.target.dir }}-gcc /usr/bin/${{ matrix.target.dir }}-gcc-${{ matrix.sys.version }} 20
27+
sudo update-alternatives --install /usr/bin/${{ matrix.target.dir }}-g++ ${{ matrix.target.dir }}-g++ /usr/bin/${{ matrix.target.dir }}-g++-${{ matrix.sys.version }} 20
28+
- name: Setup QEMU
29+
run: |
30+
sudo apt-get --no-install-suggests --no-install-recommends install qemu-user
31+
- name: Setup Ninja
32+
run: |
33+
sudo apt-get install ninja-build
34+
- name: Checkout xsimd
35+
uses: actions/checkout@v6
36+
- name: Setup
37+
run: |
38+
cmake -B build/ \
39+
-DBUILD_TESTS=ON -DDOWNLOAD_DOCTEST=ON \
40+
-DBUILD_BENCHMARK=${{ matrix.target.full }} -DBUILD_EXAMPLES=${{ matrix.target.full }} \
41+
-DCMAKE_BUILD_TYPE=Release \
42+
-DCMAKE_C_FLAGS="${{ matrix.target.flags }}" \
43+
-DCMAKE_CXX_FLAGS="${{ matrix.target.flags }}" \
44+
-DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/.github/toolchains/${{ matrix.sys.compiler }}-${{ matrix.target.dir }}.cmake
45+
- name: Build
46+
run: cmake --build build/ --verbose -j1
47+
- name: Set CPU feature test expectations
48+
run: |
49+
- name: Testing xsimd
50+
run: |
51+
# Set CPU feature test expectations, 0 is explicit absence of the feature
52+
export XSIMD_TEST_CPU_ASSUME_SSE4_2="0"
53+
export XSIMD_TEST_CPU_ASSUME_NEON64="0"
54+
export XSIMD_TEST_CPU_ASSUME_RVV="0"
55+
export XSIMD_TEST_CPU_ASSUME_VSX="1"
56+
57+
qemu-${{ matrix.target.platform }} -cpu power10 -L /usr/${{ matrix.target.dir}}/ ./build/test/test_xsimd

.github/workflows/cross-rvv.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: RISC-V RVV cross-compilation build
2+
on: [push, pull_request]
3+
concurrency:
4+
group: ${{ github.workflow }}-${{ github.job }}-${{ github.ref }}
5+
cancel-in-progress: true
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
name: 'RISC-V RVV${{ matrix.vector_bits }}'
10+
strategy:
11+
matrix:
12+
sys:
13+
- { compiler: 'gcc', gcc_runtime: '14'}
14+
- { compiler: 'clang', version: '17', gcc_runtime: '14'}
15+
- { compiler: 'clang', version: '18', gcc_runtime: '14'}
16+
vector_bits:
17+
- 128
18+
- 256
19+
- 512
20+
steps:
21+
- name: Setup GCC
22+
run: |
23+
sudo apt-get -y -qq update
24+
sudo apt-get -y -qq --no-install-suggests --no-install-recommends install gcc-${{ matrix.sys.gcc_runtime }}-riscv64-linux-gnu g++-${{ matrix.sys.gcc_runtime }}-riscv64-linux-gnu
25+
sudo update-alternatives --install /usr/bin/riscv64-linux-gnu-gcc riscv64-linux-gnu-gcc /usr/bin/riscv64-linux-gnu-gcc-${{ matrix.sys.gcc_runtime }} 20
26+
sudo update-alternatives --install /usr/bin/riscv64-linux-gnu-g++ riscv64-linux-gnu-g++ /usr/bin/riscv64-linux-gnu-g++-${{ matrix.sys.gcc_runtime }} 20
27+
- name: Setup LLVM
28+
if: ${{ matrix.sys.compiler == 'clang' }}
29+
run: |
30+
# Install given LLVM version
31+
curl -o llvm.sh https://apt.llvm.org/llvm.sh
32+
chmod u+x llvm.sh
33+
sudo ./llvm.sh ${{ matrix.sys.version }}
34+
sudo ln -srf $(which clang-${{ matrix.sys.version }}) /usr/bin/clang
35+
sudo ln -srf $(which clang++-${{ matrix.sys.version }}) /usr/bin/clang++
36+
rm llvm.sh
37+
- name: Setup QEMU
38+
uses: docker/setup-qemu-action@v3.0.0
39+
with:
40+
platforms: riscv64
41+
- name: Setup Ninja
42+
run: |
43+
sudo apt-get -y -qq install ninja-build
44+
- name: Checkout xsimd
45+
uses: actions/checkout@v6
46+
- name: Setup
47+
run: >
48+
cmake -S . -B _build
49+
-GNinja
50+
-DBUILD_TESTS=ON
51+
-DDOWNLOAD_DOCTEST=ON
52+
-DCMAKE_BUILD_TYPE=Release
53+
-DTARGET_ARCH=generic
54+
-DCMAKE_C_FLAGS="-march=rv64gcv_zvl${{ matrix.vector_bits }}b_zba_zbb_zbs -mrvv-vector-bits=zvl"
55+
-DCMAKE_CXX_FLAGS="-march=rv64gcv_zvl${{ matrix.vector_bits }}b_zba_zbb_zbs -mrvv-vector-bits=zvl"
56+
-DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/.github/toolchains/${{ matrix.sys.compiler }}-riscv64-linux-gnu.cmake
57+
- name: Build
58+
run: cmake --build _build
59+
- name: Set CPU feature test expectations
60+
run: |
61+
echo "XSIMD_TEST_CPU_ASSUME_SSE4_2=0" >> "$GITHUB_ENV"
62+
echo "XSIMD_TEST_CPU_ASSUME_SVE=0" >> "$GITHUB_ENV"
63+
echo "XSIMD_TEST_CPU_ASSUME_RVV=1" >> "$GITHUB_ENV"
64+
- name: Testing xsimd
65+
run: >
66+
QEMU_CPU="rv64,zba=true,zbb=true,zbs=true,v=true,vlen=${{ matrix.vector_bits }},elen=64,vext_spec=v1.0"
67+
QEMU_LD_PREFIX="/usr/riscv64-linux-gnu"
68+
./test/test_xsimd
69+
working-directory: ${{ github.workspace }}/_build

.github/workflows/cross-s390x.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: IBM Z cross-compilation build
2+
on: [push, pull_request]
3+
concurrency:
4+
group: ${{ github.workflow }}-${{ github.job }}-${{ github.ref }}
5+
cancel-in-progress: true
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
name: '${{ matrix.target.platform }}, ${{ matrix.sys.compiler }} ${{ matrix.sys.version }}'
11+
strategy:
12+
matrix:
13+
target:
14+
- { platform: 's390x', dir: 's390x-linux-gnu', full: 'OFF' }
15+
sys:
16+
- { compiler: 'gcc', version: '14' }
17+
steps:
18+
- name: Setup compiler
19+
if: ${{ matrix.sys.compiler == 'gcc' }}
20+
run: |
21+
sudo apt-get update || exit 1
22+
sudo apt-get -y --no-install-suggests --no-install-recommends install g++-${{ matrix.sys.version }}-${{ matrix.target.dir }} g++-${{ matrix.sys.version }}-multilib cmake || exit 1
23+
sudo update-alternatives --remove-all ${{ matrix.target.dir }}-gcc || true
24+
sudo update-alternatives --remove-all ${{ matrix.target.dir }}-g++ || true
25+
sudo update-alternatives --install /usr/bin/${{ matrix.target.dir }}-gcc ${{ matrix.target.dir }}-gcc /usr/bin/${{ matrix.target.dir }}-gcc-${{ matrix.sys.version }} 20
26+
sudo update-alternatives --install /usr/bin/${{ matrix.target.dir }}-g++ ${{ matrix.target.dir }}-g++ /usr/bin/${{ matrix.target.dir }}-g++-${{ matrix.sys.version }} 20
27+
- name: Setup QEMU
28+
run: |
29+
sudo apt-get --no-install-suggests --no-install-recommends install qemu-user
30+
- name: Setup Ninja
31+
run: |
32+
sudo apt-get install ninja-build
33+
- name: Checkout xsimd
34+
uses: actions/checkout@v6
35+
- name: Setup
36+
run: |
37+
cmake -B build/ \
38+
-DBUILD_TESTS=ON -DDOWNLOAD_DOCTEST=ON \
39+
-DBUILD_BENCHMARK=${{ matrix.target.full }} -DBUILD_EXAMPLES=${{ matrix.target.full }} \
40+
-DCMAKE_BUILD_TYPE=Release \
41+
-DCMAKE_C_FLAGS="${{ matrix.target.flags }}" \
42+
-DCMAKE_CXX_FLAGS="${{ matrix.target.flags }}" \
43+
-DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/.github/toolchains/${{ matrix.sys.compiler }}-${{ matrix.target.dir }}.cmake
44+
- name: Build
45+
run: cmake --build build/ --verbose -j1
46+
- name: Testing xsimd
47+
run: |
48+
# Set CPU feature test expectations, 0 is explicit absence of the feature
49+
export XSIMD_TEST_CPU_ASSUME_SSE4_2="0"
50+
export XSIMD_TEST_CPU_ASSUME_NEON64="0"
51+
export XSIMD_TEST_CPU_ASSUME_RVV="0"
52+
export XSIMD_TEST_CPU_ASSUME_VSX="0"
53+
export XSIMD_TEST_CPU_ASSUME_VXE="1"
54+
55+
qemu-${{ matrix.target.platform }} -L /usr/${{ matrix.target.dir}}/ ./build/test/test_xsimd

.github/workflows/cross-sve.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Arm-SVE cross-compilation build
2+
on: [push, pull_request]
3+
concurrency:
4+
group: ${{ github.workflow }}-${{ github.job }}-${{ github.ref }}
5+
cancel-in-progress: true
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
name: 'Arm SVE${{ matrix.vector_bits }}'
10+
strategy:
11+
matrix:
12+
vector_bits:
13+
- 128
14+
- 256
15+
- 512
16+
steps:
17+
- name: Setup compiler
18+
run: |
19+
sudo apt-get update || exit 1
20+
sudo apt-get --no-install-suggests --no-install-recommends install g++-10-aarch64-linux-gnu || exit 1
21+
sudo update-alternatives --install /usr/bin/aarch64-linux-gnu-gcc aarch64-linux-gnu-gcc /usr/bin/aarch64-linux-gnu-gcc-10 20
22+
sudo update-alternatives --install /usr/bin/aarch64-linux-gnu-g++ aarch64-linux-gnu-g++ /usr/bin/aarch64-linux-gnu-g++-10 20
23+
- name: Setup QEMU
24+
run: |
25+
sudo apt-get --no-install-suggests --no-install-recommends install qemu-user
26+
- name: Setup Ninja
27+
run: |
28+
sudo apt-get install ninja-build
29+
- name: Checkout xsimd
30+
uses: actions/checkout@v6
31+
- name: Setup
32+
run: |
33+
cmake -B _build \
34+
-GNinja \
35+
-DBUILD_TESTS=ON -DDOWNLOAD_DOCTEST=ON \
36+
-DCMAKE_BUILD_TYPE=Release \
37+
-DTARGET_ARCH=generic \
38+
-DCMAKE_C_FLAGS="-march=armv8-a+sve -msve-vector-bits=${{ matrix.vector_bits }}" \
39+
-DCMAKE_CXX_FLAGS="-march=armv8-a+sve -msve-vector-bits=${{ matrix.vector_bits }}" \
40+
-DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/.github/toolchains/gcc-aarch64-linux-gnu.cmake
41+
- name: Build
42+
run: cmake --build _build
43+
- name: Set CPU feature test expectations
44+
run: |
45+
echo "XSIMD_TEST_CPU_ASSUME_SSE4_2=0" >> "$GITHUB_ENV"
46+
echo "XSIMD_TEST_CPU_ASSUME_RVV=0" >> "$GITHUB_ENV"
47+
echo "XSIMD_TEST_CPU_ASSUME_NEON64=1" >> "$GITHUB_ENV"
48+
echo "XSIMD_TEST_CPU_ASSUME_SVE=1" >> "$GITHUB_ENV"
49+
echo "XSIMD_TEST_CPU_ASSUME_MANUFACTURER=unknown" >> "$GITHUB_ENV"
50+
- name: Testing xsimd
51+
run: qemu-aarch64 --cpu max,sve${{ matrix.vector_bits }}=on -L /usr/aarch64-linux-gnu/ ./test/test_xsimd
52+
working-directory: ${{ github.workspace }}/_build
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: C++ -fno-except compatibility
2+
on: [push, pull_request]
3+
jobs:
4+
build:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/checkout@v6
8+
- name: Setup
9+
run: cmake -B _build -DBUILD_TESTS=ON -DDOWNLOAD_DOCTEST=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS=-fno-exceptions
10+
- name: Build
11+
run: cmake --build _build
12+

0 commit comments

Comments
 (0)