Skip to content

Commit 139f435

Browse files
Move CI to doctest instead of gtest
1 parent 122f282 commit 139f435

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1979
-2215
lines changed

.github/workflows/benchmark.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: benchmark & examples
22
on: [push, pull_request]
3-
concurrency:
3+
concurrency:
44
group: ${{ github.workflow }}-${{ github.job }}-${{ github.ref }}
55
cancel-in-progress: true
66
jobs:

.github/workflows/clang-format-check.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: clang-format
22
on: [push, pull_request]
3-
concurrency:
3+
concurrency:
44
group: ${{ github.workflow }}-${{ github.job }}-${{ github.ref }}
55
cancel-in-progress: true
66
jobs:
@@ -13,3 +13,4 @@ jobs:
1313
uses: jidicula/clang-format-action@v4.2.0
1414
with:
1515
clang-format-version: '13'
16+
exclude-regex: 'doctest.h'

.github/workflows/cross-sve.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
- name: Setup
3232
run: |
3333
mkdir _build
34-
cd _build && cmake .. -GNinja -DDOWNLOAD_GTEST=ON -DBUILD_TESTS=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
34+
cd _build && cmake .. -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
3535
- name: Build
3636
run: cmake --build _build
3737
- name: Testing xsimd

.github/workflows/cross.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Arm cross-compilation build
22
on: [push, pull_request]
3-
concurrency:
3+
concurrency:
44
group: ${{ github.workflow }}-${{ github.job }}-${{ github.ref }}
55
cancel-in-progress: true
66
jobs:
@@ -53,7 +53,7 @@ jobs:
5353
- name: Setup
5454
run: |
5555
mkdir _build
56-
cd _build && cmake .. -DDOWNLOAD_GTEST=ON -DBUILD_TESTS=ON -DBUILD_BENCHMARK=ON -DBUILD_EXAMPLES=ON -DCMAKE_BUILD_TYPE=Release -DTARGET_ARCH=generic -DCMAKE_C_FLAGS="-march=${{ matrix.target.arch }} ${{ matrix.target.flags }}" -DCMAKE_CXX_FLAGS="-march=${{ matrix.target.arch }} ${{ matrix.target.flags }}" -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/.github/toolchains/${{ matrix.sys.compiler }}-${{ matrix.target.dir }}.cmake
56+
cd _build && cmake .. -DBUILD_TESTS=ON -DDOWNLOAD_DOCTEST=ON -DBUILD_BENCHMARK=ON -DBUILD_EXAMPLES=ON -DCMAKE_BUILD_TYPE=Release -DTARGET_ARCH=generic -DCMAKE_C_FLAGS="-march=${{ matrix.target.arch }} ${{ matrix.target.flags }}" -DCMAKE_CXX_FLAGS="-march=${{ matrix.target.arch }} ${{ matrix.target.flags }}" -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/.github/toolchains/${{ matrix.sys.compiler }}-${{ matrix.target.dir }}.cmake
5757
- name: Build
5858
run: cmake --build _build
5959
- name: Testing xsimd

.github/workflows/cxx-versions.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: C++ compatibility build
22
on: [push, pull_request]
3-
concurrency:
3+
concurrency:
44
group: ${{ github.workflow }}-${{ github.job }}-${{ github.ref }}
55
cancel-in-progress: true
66
jobs:
@@ -13,11 +13,11 @@ jobs:
1313
- uses: actions/checkout@v2
1414
- name: Install dependencies
1515
run: |
16-
sudo apt install g++ cmake
16+
sudo apt install g++ cmake
1717
- name: Setup
1818
run: |
1919
mkdir _build
20-
cd _build && cmake .. -DDOWNLOAD_GTEST=ON -DBUILD_TESTS=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=${{matrix.cxx-version}}
20+
cd _build && cmake .. -DBUILD_TESTS=ON -DDOWNLOAD_DOCTEST=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=${{matrix.cxx-version}}
2121
- name: Build
2222
run: cmake --build _build
2323

.github/workflows/linux.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ jobs:
3939
sudo apt-get --no-install-suggests --no-install-recommends install gcc-$GCC_VERSION-multilib g++-$GCC_VERSION-multilib linux-libc-dev:i386
4040
fi
4141
CC=gcc-$GCC_VERSION
42-
echo "CC=$CC" >> $GITHUB_ENV
42+
echo "CC=$CC" >> $GITHUB_ENV
4343
CXX=g++-$GCC_VERSION
44-
echo "CXX=$CXX" >> $GITHUB_ENV
44+
echo "CXX=$CXX" >> $GITHUB_ENV
4545
- name: Setup compiler
4646
if: ${{ matrix.sys.compiler == 'clang' }}
4747
run: |
@@ -61,10 +61,7 @@ jobs:
6161
CC=clang-$LLVM_VERSION
6262
echo "CC=$CC" >> $GITHUB_ENV
6363
CXX=clang++-$LLVM_VERSION
64-
echo "CXX=$CXX" >> $GITHUB_ENV
65-
- name: Setup Ninja
66-
run: |
67-
sudo apt-get install ninja-build
64+
echo "CXX=$CXX" >> $GITHUB_ENV
6865
- name: Checkout xsimd
6966
uses: actions/checkout@v2
7067
- name: Install mamba
@@ -97,8 +94,7 @@ jobs:
9794
9895
mkdir _build
9996
cd _build
100-
cmake .. -DDOWNLOAD_GTEST=ON \
101-
-DBUILD_TESTS=ON \
97+
cmake .. -DBUILD_TESTS=ON \
10298
-DBUILD_BENCHMARK=ON \
10399
-DBUILD_EXAMPLES=ON \
104100
-DCMAKE_BUILD_TYPE=Release \

.github/workflows/macos.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: macOS build
22
on: [push, pull_request]
3-
concurrency:
3+
concurrency:
44
group: ${{ github.workflow }}-${{ github.job }}-${{ github.ref }}
55
cancel-in-progress: true
66
jobs:
@@ -17,7 +17,7 @@ jobs:
1717
- name: Setup
1818
run: |
1919
mkdir _build
20-
cd _build && cmake .. -DDOWNLOAD_GTEST=ON -DBUILD_TESTS=ON -DBUILD_BENCHMARK=ON -DBUILD_EXAMPLES=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64"
20+
cd _build && cmake .. -DBUILD_TESTS=ON -DDOWNLOAD_DOCTEST=ON -DBUILD_BENCHMARK=ON -DBUILD_EXAMPLES=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64"
2121
- name: Build
2222
run: cmake --build _build
2323
- name: Testing sequential

.github/workflows/windows.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Windows build
22
on: [push, pull_request]
3-
concurrency:
3+
concurrency:
44
group: ${{ github.workflow }}-${{ github.job }}-${{ github.ref }}
55
cancel-in-progress: true
66
jobs:
@@ -27,7 +27,7 @@ jobs:
2727
# On 2019 in _mm256_rsqrt_ps, on 2022 in _mm256_blend_p*
2828
- { sys: { set: AVX } }
2929
# On both platforms x86 + AVX512 triggers a compiler crash
30-
- { target: x86, sys: { set: AVX512 } }
30+
- { target: x86, sys: { set: AVX512 } }
3131
runs-on: windows-${{ matrix.os }}
3232
steps:
3333
- name: Setup compiler
@@ -43,7 +43,7 @@ jobs:
4343
- name: Setup
4444
run: |
4545
mkdir _build
46-
cd _build && cmake .. -DDOWNLOAD_GTEST=ON -DBUILD_TESTS=ON -DBUILD_BENCHMARK=ON -DBUILD_EXAMPLES=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="${{ matrix.sys.flags }}" -G Ninja
46+
cd _build && cmake .. -DBUILD_TESTS=ON -DDOWNLOAD_DOCTEST=ON -DBUILD_BENCHMARK=ON -DBUILD_EXAMPLES=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="${{ matrix.sys.flags }}" -G Ninja
4747
- name: Build
4848
run: |
4949
cd _build && cmake --build .
@@ -73,13 +73,14 @@ jobs:
7373
cc:p
7474
cmake:p
7575
ninja:p
76+
doctest:p
7677
- name: Checkout xsimd
7778
uses: actions/checkout@v2
7879
- name: Configure
7980
run: |
8081
mkdir _build
8182
cd _build
82-
cmake .. -DDOWNLOAD_GTEST=ON -DBUILD_TESTS=ON -DBUILD_BENCHMARK=ON -DBUILD_EXAMPLES=ON -DCMAKE_BUILD_TYPE=Release -G Ninja
83+
cmake .. -DBUILD_TESTS=ON -DBUILD_BENCHMARK=ON -DBUILD_EXAMPLES=ON -DCMAKE_BUILD_TYPE=Release -G Ninja
8384
- name: Build
8485
run: ninja -C _build
8586
- name: Test

CMakeLists.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,6 @@ endif()
9494

9595
OPTION(ENABLE_XTL_COMPLEX "enables support for xcomplex defined in xtl" OFF)
9696
OPTION(BUILD_TESTS "xsimd test suite" OFF)
97-
OPTION(DOWNLOAD_GTEST "build gtest from downloaded sources" OFF)
98-
99-
if(DOWNLOAD_GTEST OR GTEST_SRC_DIR)
100-
set(BUILD_TESTS ON)
101-
endif()
10297

10398
if(ENABLE_XTL_COMPLEX)
10499
add_definitions(-DXSIMD_ENABLE_XTL_COMPLEX=1)

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -179,15 +179,15 @@ void mean(const vector_type& a, const vector_type& b, vector_type& res)
179179

180180
## Building and Running the Tests
181181

182-
Building the tests requires the [GTest](https://github.com/google/googletest) testing framework and [cmake](https://cmake.org).
182+
Building the tests requires [cmake](https://cmake.org).
183183

184-
gtest and cmake are available as a packages for most linux distributions. Besides, they can also be installed with the `conda` package manager (even on windows):
184+
`cmake` is available as a package for most linux distributions. Besides, they can also be installed with the `conda` package manager (even on windows):
185185

186186
```bash
187-
conda install -c conda-forge gtest cmake
187+
conda install -c conda-forge cmake
188188
```
189189

190-
Once `gtest` and `cmake` are installed, you can build and run the tests:
190+
Once `cmake` is installed, you can build and run the tests:
191191

192192
```bash
193193
mkdir build

0 commit comments

Comments
 (0)