Skip to content

Commit

Permalink
Win32 CI (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
felixguendling authored Mar 9, 2020
1 parent 09b6ecc commit df3a62e
Show file tree
Hide file tree
Showing 3 changed files with 116 additions and 107 deletions.
218 changes: 113 additions & 105 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,109 +1,117 @@
jobs:
- job: VS2019
strategy:
matrix:
REL:
BUILD_TYPE: Release
DBG:
BUILD_TYPE: Debug
pool:
vmImage: windows-2019
steps:
- task: CMake@1
displayName: 'CMake'
inputs:
cmakeArgs: -G "Visual Studio 16 2019" -A x64 ..
- task: MSBuild@1
displayName: 'Build Solution'
inputs:
solution: build/cista.sln
msbuildArguments: '/m /p:Configuration=$(BUILD_TYPE)'
- script: cista-test
workingDirectory: build\$(BUILD_TYPE)
displayName: Run Tests
- job: VS2019
strategy:
matrix:
REL-WIN32:
BUILD_TYPE: Release
ARCH: Win32
DBG-WIN32:
BUILD_TYPE: Debug
ARCH: Win32
REL-X64:
BUILD_TYPE: Release
ARCH: x64
DBG-X64:
BUILD_TYPE: Debug
ARCH: x64
pool:
vmImage: windows-2019
steps:
- task: CMake@1
displayName: 'CMake'
inputs:
cmakeArgs: -G "Visual Studio 16 2019" -A x64 ..
- task: MSBuild@1
displayName: 'Build Solution'
inputs:
solution: build/cista.sln
msbuildArguments: '/m /p:Configuration=$(BUILD_TYPE)'
- script: cista-test
workingDirectory: build\$(BUILD_TYPE)
displayName: Run Tests

- job: LINUX_CLANG
strategy:
matrix:
REL:
BUILD_TYPE: Release
CXXFLAGS: '-stdlib=libc++ -D_LIBCPP_VERSION=1 -march=native'
FUZZ: False
DBG:
BUILD_TYPE: Debug
CXXFLAGS: '-stdlib=libc++ -D_LIBCPP_VERSION=1 -fno-omit-frame-pointer -fsanitize=address'
FUZZ: False
FUZZ:
BUILD_TYPE: Debug
CXXFLAGS: '-stdlib=libc++ -D_LIBCPP_VERSION=1 -fno-omit-frame-pointer'
FUZZ: True
pool:
vmImage: ubuntu-16.04
variables:
CXX: /opt/clang+llvm-8.0.0-x86_64-linux-gnu-ubuntu-16.04/bin/clang++
LD_LIBRARY_PATH: /opt/clang+llvm-8.0.0-x86_64-linux-gnu-ubuntu-16.04/lib
ASAN_SYMBOLIZER_PATH: /opt/clang+llvm-8.0.0-x86_64-linux-gnu-ubuntu-16.04/bin/llvm-symbolizer
steps:
- script: |
sudo curl -Ls http://releases.llvm.org/8.0.0/clang%2bllvm-8.0.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz -o clang.tar.xz
sudo tar -xf clang.tar.xz -C /opt
- script: |
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) ..
displayName: 'CMake'
- script: make cista-test
workingDirectory: build
displayName: 'Build'
condition: not(eq(variables['FUZZ'], 'True'))
- script: make cista-fuzz
workingDirectory: build
displayName: 'Build & Execute Fuzzing'
condition: eq(variables['FUZZ'], 'True')
- script: ./cista-test
workingDirectory: build
displayName: 'Run Tests'
condition: not(eq(variables['FUZZ'], 'True'))
- job: LINUX_CLANG
strategy:
matrix:
REL:
BUILD_TYPE: Release
CXXFLAGS: '-stdlib=libc++ -D_LIBCPP_VERSION=1 -march=native'
FUZZ: False
DBG:
BUILD_TYPE: Debug
CXXFLAGS: '-stdlib=libc++ -D_LIBCPP_VERSION=1 -fno-omit-frame-pointer -fsanitize=address'
FUZZ: False
FUZZ:
BUILD_TYPE: Debug
CXXFLAGS: '-stdlib=libc++ -D_LIBCPP_VERSION=1 -fno-omit-frame-pointer'
FUZZ: True
pool:
vmImage: ubuntu-16.04
variables:
CXX: /opt/clang+llvm-8.0.0-x86_64-linux-gnu-ubuntu-16.04/bin/clang++
LD_LIBRARY_PATH: /opt/clang+llvm-8.0.0-x86_64-linux-gnu-ubuntu-16.04/lib
ASAN_SYMBOLIZER_PATH: /opt/clang+llvm-8.0.0-x86_64-linux-gnu-ubuntu-16.04/bin/llvm-symbolizer
steps:
- script: |
sudo curl -Ls http://releases.llvm.org/8.0.0/clang%2bllvm-8.0.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz -o clang.tar.xz
sudo tar -xf clang.tar.xz -C /opt
- script: |
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) ..
displayName: 'CMake'
- script: make cista-test
workingDirectory: build
displayName: 'Build'
condition: not(eq(variables['FUZZ'], 'True'))
- script: make cista-fuzz
workingDirectory: build
displayName: 'Build & Execute Fuzzing'
condition: eq(variables['FUZZ'], 'True')
- script: ./cista-test
workingDirectory: build
displayName: 'Run Tests'
condition: not(eq(variables['FUZZ'], 'True'))

- job: LINUX_GCC
strategy:
matrix:
REL:
BUILD_TYPE: Release
CXXFLAGS: '-march=native'
DBG:
BUILD_TYPE: Debug
CXXFLAGS: '-D_LIBCPP_VERSION=1 -fno-omit-frame-pointer -fsanitize=address'
pool:
vmImage: ubuntu-16.04
variables:
CXX: g++-8
steps:
- script: |
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt install -y --no-install-recommends g++-8
- script: |
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) ..
displayName: 'CMake'
- script: make cista-test
workingDirectory: build
displayName: 'Build'
- script: ./cista-test
workingDirectory: build
displayName: 'Run Tests'
- job: LINUX_GCC
strategy:
matrix:
REL:
BUILD_TYPE: Release
CXXFLAGS: '-march=native'
DBG:
BUILD_TYPE: Debug
CXXFLAGS: '-D_LIBCPP_VERSION=1 -fno-omit-frame-pointer -fsanitize=address'
pool:
vmImage: ubuntu-16.04
variables:
CXX: g++-8
steps:
- script: |
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt install -y --no-install-recommends g++-8
- script: |
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) ..
displayName: 'CMake'
- script: make cista-test
workingDirectory: build
displayName: 'Build'
- script: ./cista-test
workingDirectory: build
displayName: 'Run Tests'

- job: POWERPC
pool:
vmImage: ubuntu-16.04
steps:
- script: |
docker run \
-v "$PWD:/repo" \
-e "CXXFLAGS=-static" \
--rm \
felixguendling/cross-build-cpp \
bash -c "cmake-ppc /repo && ninja cista-test && qemu-ppc-static cista-test"
displayName: 'Build & Run Tests'
- job: POWERPC
pool:
vmImage: ubuntu-16.04
steps:
- script: |
docker run \
-v "$PWD:/repo" \
-e "CXXFLAGS=-static" \
--rm \
felixguendling/cross-build-cpp \
bash -c "cmake-ppc /repo && ninja cista-test && qemu-ppc-static cista-test"
displayName: 'Build & Run Tests'
3 changes: 2 additions & 1 deletion include/cista/containers/vector.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ struct basic_vector {

template <typename It>
void set(It begin_it, It end_it) {
auto range_size = std::distance(begin_it, end_it);
auto range_size =
static_cast<TemplateSizeType>(std::distance(begin_it, end_it));
assert(range_size <= std::numeric_limits<TemplateSizeType>::max() &&
"size type overflow");
reserve(static_cast<TemplateSizeType>(range_size));
Expand Down
2 changes: 1 addition & 1 deletion test/std_vector_test.cc
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ inline void deserialize(Ctx const& c, std::vector<T>* el) {
auto& vec = *new (static_cast<void*>(el)) std::vector<T>();

if (size != 0 && data != nullptr) {
vec.resize(size);
vec.resize(static_cast<typename std::vector<T>::size_type>(size));
vec.insert(begin(vec), std::make_move_iterator(data),
std::make_move_iterator(data + size));
}
Expand Down

0 comments on commit df3a62e

Please sign in to comment.