Skip to content

Provide batch_bool::count() to count the number of positive value in … #307

Provide batch_bool::count() to count the number of positive value in …

Provide batch_bool::count() to count the number of positive value in … #307

Workflow file for this run

name: Linux emulated build
on: [push, pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.job }}-${{ github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash -l {0}
jobs:
build:
runs-on: ubuntu-20.04
name: '${{ matrix.sys.compiler }} ${{ matrix.sys.version }} - emulated'
strategy:
matrix:
sys:
- { compiler: 'gcc', version: '7'}
- { compiler: 'clang', version: '8'}
steps:
- name: Setup compiler
if: ${{ matrix.sys.compiler == 'gcc' }}
run: |
GCC_VERSION=${{ matrix.sys.version }}
sudo apt-get update
sudo apt-get --no-install-suggests --no-install-recommends install g++-$GCC_VERSION
CC=gcc-$GCC_VERSION
echo "CC=$CC" >> $GITHUB_ENV
CXX=g++-$GCC_VERSION
echo "CXX=$CXX" >> $GITHUB_ENV
CXXFLAGS="-Wno-noexcept-type -Wno-stringop-overflow -Wno-maybe-uninitialized"
echo "CXXFLAGS=$CXXFLAGS" >> $GITHUB_ENV
- name: Setup compiler
if: ${{ matrix.sys.compiler == 'clang' }}
run: |
LLVM_VERSION=${{ matrix.sys.version }}
#sudo add-apt-repository ppa:ubuntu-toolchain-r/test || exit 1
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - || exit 1
sudo add-apt-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal main" || exit 1
sudo apt-get update || exit 1
sudo apt-get --no-install-suggests --no-install-recommends install clang-$LLVM_VERSION || exit 1
sudo apt-get --no-install-suggests --no-install-recommends install g++-9 g++-9-multilib || exit 1
sudo ln -s /usr/include/asm-generic /usr/include/asm
CC=clang-$LLVM_VERSION
echo "CC=$CC" >> $GITHUB_ENV
CXX=clang++-$LLVM_VERSION
echo "CXX=$CXX" >> $GITHUB_ENV
- name: Checkout xsimd
uses: actions/checkout@v3
- name: Install mamba
uses: mamba-org/provision-with-micromamba@main
with:
environment-file: environment.yml
- name: Configure build
env:
CC: ${{ env.CC }}
CXX: ${{ env.CXX }}
run: |
mkdir _build
cd _build
cmake .. -DBUILD_TESTS=ON \
-DBUILD_BENCHMARK=ON \
-DBUILD_EXAMPLES=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER=$CC \
-DCMAKE_CXX_COMPILER=$CXX \
-DXSIMD_ENABLE_WERROR=ON \
-DCMAKE_CXX_FLAGS="-DXSIMD_DEFAULT_ARCH=emulated\<128\> -DXSIMD_WITH_EMULATED=1 ${CXXFLAGS}" \
-G Ninja
- name: Build
run: ninja -C _build
- name: Test
run: |
cd _build/test
./test_xsimd