CI for both arms (#151)

* Add another ARM
This commit is contained in:
Amaury Chamayou
2020-03-20 09:17:38 +00:00
committed by GitHub
parent e92fef6e63
commit 60861eef44
3 changed files with 40 additions and 11 deletions

View File

@@ -1,6 +1,8 @@
cmake_minimum_required(VERSION 3.8)
project(snmalloc C CXX)
include(CheckCXXCompilerFlag)
option(USE_SNMALLOC_STATS "Track allocation stats" OFF)
option(SNMALLOC_CI_BUILD "Disable features not sensible for CI" OFF)
option(USE_MEASURE "Measure performance with histograms" OFF)
@@ -145,12 +147,14 @@ if(NOT DEFINED SNMALLOC_ONLY_HEADER_LIBRARY)
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /DEBUG")
else()
add_compile_options(-fno-exceptions -fno-rtti -g -ftls-model=initial-exec -fomit-frame-pointer)
if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64")
add_compile_options(-march=native)
elseif(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86")
add_compile_options(-march=native)
elseif(${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm")
add_compile_options(-march=native)
if((${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64") OR
(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86") OR
(${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm"))
check_cxx_compiler_flag(-march=native SUPPORT_MARCH_NATIVE)
if (SUPPORT_MARCH_NATIVE)
add_compile_options(-march=native)
endif()
endif()
endif()

View File

@@ -103,25 +103,43 @@ jobs:
displayName: 'Test'
- job:
displayName: 'ARM64 Linux'
displayName: 'ARM Linux'
pool:
vmImage: 'ubuntu-18.04'
strategy:
matrix:
Clang-9 Debug:
64-bit Clang-9 Debug:
CC: clang-9
CXX: clang++-9
BuildType: Debug
SelfHost: false
CMakeArgs: ''
Image: snmallocciteam/build_linux_arm64:latest
Clang-9 Release:
64-bit Clang-9 Release:
CC: clang-9
CXX: clang++-9
BuildType: Release
SelfHost: false
CMakeArgs: ''
Image: snmallocciteam/build_linux_arm64:latest
32-bit Clang-9 Debug:
CC: clang-9
CXX: clang++-9
BuildType: Debug
SelfHost: false
CMakeArgs: ''
Image: snmallocciteam/build_linux_armhf:latest
32-bit Clang-9 Release:
CC: clang-9
CXX: clang++-9
BuildType: Release
SelfHost: false
CMakeArgs: ''
Image: snmallocciteam/build_linux_armhf:latest
steps:
- script: |
@@ -134,7 +152,7 @@ jobs:
-e CXX=$(CXX) \
-e BUILD_TYPE=$(BuildType) \
-e CMAKE_ARGS=$(CMakeArgs) \
snmallocciteam/build_linux_arm64:latest \
$(Image) \
ci/scripts/build.sh
displayName: 'Build'
@@ -142,7 +160,7 @@ jobs:
sudo docker run -v $PWD:/src \
-e BUILD_TYPE=$(BuildType) \
-e SELF_HOST=$(SelfHost) \
snmallocciteam/build_linux_arm64:latest \
$(Image) \
ci/scripts/test.sh
displayName: 'Test'

7
ci/linux_armhf Normal file
View File

@@ -0,0 +1,7 @@
FROM multiarch/ubuntu-core:armhf-bionic
WORKDIR /src
RUN apt update \
&& apt install --no-install-recommends -y ninja-build clang++-9 cmake \
&& apt -y clean