Permalink
Browse files

Use scripts for automated tests

  • Loading branch information...
dlevin256 committed Nov 23, 2018
1 parent 006818c commit e595a51dc225f8216683a0a097b387028348888a
Showing with 37 additions and 43 deletions.
  1. +1 −0 .gitignore
  2. +7 −43 azure-pipelines.yml
  3. +13 −0 ci/run.cmd
  4. +16 −0 ci/run.sh
@@ -43,6 +43,7 @@ build32/
build64/
cmake-build-debug/
cmake-build-release/
build-*/
# test directory
svg/
@@ -6,12 +6,7 @@ jobs:
- bash: |
set -e
sudo apt-get install -y ninja-build libmpfr-dev
mkdir build
cd build
cmake -GNinja -DENABLE_TESTS=ON -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Release ..
ninja
cd tests
ctest -V
ci/run.sh build-release -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Release
- job: Linux_ARM
pool:
@@ -20,12 +15,7 @@ jobs:
- bash: |
set -e
sudo apt-get install -y ninja-build g++-arm-linux-gnueabihf qemu
mkdir build
cd build
cmake -GNinja -DENABLE_TESTS=ON -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=../cmake/arm.cmake -DARCH_FLAGS=-DLIBC_WORKAROUND_GETS=1 ..
ninja
cd tests
ctest -V
ci/run.sh build-release -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=../cmake/arm.cmake -DARCH_FLAGS=-DLIBC_WORKAROUND_GETS=1
- job: macOS
strategy:
@@ -47,12 +37,7 @@ jobs:
set -e
/bin/bash -c "sudo xcode-select -s /Applications/Xcode_$(XCODE_VER).app/Contents/Developer"
brew install ninja
mkdir build
cd build
cmake -GNinja -DENABLE_TESTS=ON -DCMAKE_BUILD_TYPE=Release ..
ninja
cd tests
ctest -V
ci/run.sh build-release -DCMAKE_BUILD_TYPE=Release
- job: Windows_MinGW
pool:
@@ -61,54 +46,33 @@ jobs:
- bash: |
set -e
choco install llvm ninja
mkdir build
cd build
cmake -GNinja -DENABLE_TESTS=ON -DCMAKE_CXX_COMPILER="C:/Program Files/LLVM/bin/clang++.exe" -DCMAKE_CXX_FLAGS=--target=x86_64-w64-windows-gnu -DCMAKE_BUILD_TYPE=Release ..
ninja
cd tests
ctest -V
ci/run.sh build-release -DCMAKE_CXX_COMPILER="C:/Program Files/LLVM/bin/clang++.exe" -DCMAKE_CXX_FLAGS=--target=x86_64-w64-windows-gnu -DCMAKE_BUILD_TYPE=Release
- job: Windows_MSVC64
pool:
vmImage: 'vs2017-win2016'
steps:
- script: |
choco install llvm ninja
mkdir build
cd build
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
set PATH=%PATH:C:\tools\mingw64\bin;=%
set PATH=%PATH:C:\Program Files\Git\mingw64\bin;=%
cmake -GNinja -DENABLE_TESTS=ON -DCMAKE_CXX_COMPILER="C:/Program Files/LLVM/bin/clang-cl.exe" -DARCH_FLAGS=-mavx -DCMAKE_CXX_FLAGS=-m64 -DCMAKE_BUILD_TYPE=Release ..
ninja
cd tests
ctest -V
ci\run.sh build-release -DCMAKE_CXX_COMPILER="C:/Program Files/LLVM/bin/clang-cl.exe" -DARCH_FLAGS=-mavx -DCMAKE_CXX_FLAGS=-m64 -DCMAKE_BUILD_TYPE=Release
- job: Windows_MSVC32
pool:
vmImage: 'vs2017-win2016'
steps:
- script: |
choco install llvm ninja
mkdir build
cd build
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvars32.bat"
set PATH=%PATH:C:\tools\mingw64\bin;=%
set PATH=%PATH:C:\Program Files\Git\mingw64\bin;=%
cmake -GNinja -DENABLE_TESTS=ON -DCMAKE_CXX_COMPILER="C:/Program Files/LLVM/bin/clang-cl.exe" -DARCH_FLAGS=-mavx -DCMAKE_CXX_FLAGS=-m32 -DCMAKE_BUILD_TYPE=Release ..
ninja
cd tests
ctest -V
ci\run.sh build-release -DCMAKE_CXX_COMPILER="C:/Program Files/LLVM/bin/clang-cl.exe" -DARCH_FLAGS=-mavx -DCMAKE_CXX_FLAGS=-m32 -DCMAKE_BUILD_TYPE=Release
- job: Windows_AVX512
pool: WIN-AVX512
steps:
- script: |
rmdir /s /q build
mkdir build
cd build
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"
cmake -GNinja -DENABLE_TESTS=ON -DARCH_TESTS=ON -DCMAKE_CXX_COMPILER="C:/LLVM/bin/clang-cl.exe" -DARCH_FLAGS="-mavx512f -mavx512cd -mavx512bw -mavx512dq -mavx512vl" -DCMAKE_CXX_FLAGS=-m64 -DCMAKE_BUILD_TYPE=Release ..
ninja
cd tests
ctest -V
ci\run.sh build-release -DARCH_TESTS=ON -DCMAKE_CXX_COMPILER="C:/LLVM/bin/clang-cl.exe" -DARCH_FLAGS="-mavx512f -mavx512cd -mavx512bw -mavx512dq -mavx512vl" -DCMAKE_CXX_FLAGS=-m64 -DCMAKE_BUILD_TYPE=Release
@@ -0,0 +1,13 @@
set build_dir=%1
shift
echo Preparing directories...
rmdir /s /q %build_dir%
mkdir %build_dir%
pushd %build_dir%
echo Running cmake -GNinja -DENABLE_TESTS=ON %* ..
cmake -GNinja -DENABLE_TESTS=ON %* .. || exit /b
echo Running ninja...
ninja || exit /b
echo Running tests...
cd tests && ctest -V || exit /b
popd
@@ -0,0 +1,16 @@
#!/bin/bash
set -e
build_dir=$1
shift
echo Preparing directories...
rm -r $build_dir || true
mkdir $build_dir
pushd $build_dir
echo Running cmake -GNinja -DENABLE_TESTS=ON $@ ..
cmake -GNinja -DENABLE_TESTS=ON $@ ..
echo Running ninja...
ninja
echo Running tests...
cd tests && ctest -V
popd

0 comments on commit e595a51

Please sign in to comment.