Reuse jobs in Circle CI
This commit is contained in:
parent
c8d50a6060
commit
640283fec6
|
@ -1,291 +1,101 @@
|
|||
version: 2
|
||||
version: 2.1
|
||||
|
||||
executors:
|
||||
gcc7:
|
||||
docker:
|
||||
- image: gcc:7
|
||||
environment:
|
||||
CXX: g++
|
||||
clang6:
|
||||
docker:
|
||||
- image: ubuntu:18.04
|
||||
environment:
|
||||
CXX: clang++-6.0
|
||||
|
||||
commands:
|
||||
init_gcc7:
|
||||
steps:
|
||||
- run: echo true
|
||||
init_clang6:
|
||||
steps:
|
||||
- run: apt-get install -y clang build-essential git
|
||||
|
||||
jobs:
|
||||
"gcc":
|
||||
docker:
|
||||
- image: ubuntu:18.04
|
||||
environment:
|
||||
CXX: g++-7
|
||||
|
||||
# Parameterized job to run all tests with "make"
|
||||
make_test:
|
||||
description: Build, run tests and check performance
|
||||
parameters:
|
||||
compiler:
|
||||
description: Compiler
|
||||
type: string
|
||||
archflags:
|
||||
description: Architecture flags (ARCHFLAGS)
|
||||
default: ""
|
||||
type: string
|
||||
|
||||
executor: << parameters.compiler >>
|
||||
|
||||
environment:
|
||||
ARCHFLAGS: << parameters.archflags >>
|
||||
|
||||
steps:
|
||||
- checkout
|
||||
|
||||
- run: apt-get update -qq
|
||||
- run: >
|
||||
apt-get install -y
|
||||
build-essential
|
||||
cmake
|
||||
g++-7
|
||||
git
|
||||
- init_<< parameters.compiler >>
|
||||
- run: make
|
||||
- run: make amalgamate
|
||||
- run: make test
|
||||
- run: make checkperf
|
||||
|
||||
- run:
|
||||
name: Building (gcc)
|
||||
command: make
|
||||
# Parameterized job to run all tests with "cmake"
|
||||
cmake_test:
|
||||
description: Build, run tests and check performance
|
||||
|
||||
- run:
|
||||
name: Running tests (gcc)
|
||||
command: make quiettest amalgamate
|
||||
parameters:
|
||||
compiler:
|
||||
description: Compiler
|
||||
type: string
|
||||
flags:
|
||||
description: flags to pass to cmake
|
||||
default: ""
|
||||
type: string
|
||||
|
||||
- run:
|
||||
name: Comparing perf against reference (gcc)
|
||||
command: make checkperf
|
||||
executor: << parameters.compiler >>
|
||||
|
||||
- run:
|
||||
name: Building (gcc, cmake, dynamic)
|
||||
command: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DSIMDJSON_BUILD_STATIC=OFF ..
|
||||
make
|
||||
|
||||
- run:
|
||||
name: Running tests (gcc, cmake, dynamic)
|
||||
command: |
|
||||
cd build
|
||||
make test
|
||||
|
||||
- run:
|
||||
name: Building (gcc, cmake, static)
|
||||
command: |
|
||||
mkdir buildstatic
|
||||
cd buildstatic
|
||||
cmake -DSIMDJSON_BUILD_STATIC=ON ..
|
||||
make
|
||||
|
||||
- run:
|
||||
name: Running tests (gcc, cmake, static)
|
||||
command: |
|
||||
cd buildstatic
|
||||
make test
|
||||
|
||||
- run:
|
||||
name: Building (gcc, cmake, sanitize)
|
||||
command: |
|
||||
mkdir buildsani
|
||||
cd buildsani
|
||||
cmake -DSIMDJSON_SANITIZE=ON -DSIMDJSON_BUILD_STATIC=OFF ..
|
||||
make
|
||||
|
||||
- run:
|
||||
name: Running tests (gcc, cmake, sanitize)
|
||||
command: |
|
||||
cd buildsani
|
||||
make test
|
||||
|
||||
"gccnoavx":
|
||||
docker:
|
||||
- image: ubuntu:18.04
|
||||
environment:
|
||||
CXX: g++-7
|
||||
steps:
|
||||
- checkout
|
||||
|
||||
- run: apt-get update -qq
|
||||
- run: >
|
||||
apt-get install -y
|
||||
build-essential
|
||||
cmake
|
||||
g++-7
|
||||
git
|
||||
|
||||
- run:
|
||||
name: Building (gcc)
|
||||
command: ARCHFLAGS="-march=nehalem" make
|
||||
|
||||
- run:
|
||||
name: Running tests (gcc)
|
||||
command: ARCHFLAGS="-march=nehalem" make quiettest amalgamate
|
||||
|
||||
- run:
|
||||
name: Comparing perf against reference (gcc)
|
||||
command: ARCHFLAGS="-march=nehalem" make checkperf
|
||||
|
||||
- run:
|
||||
name: Building (gcc, cmake, dynamic)
|
||||
command: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DSIMDJSON_DISABLE_AVX=ON -DSIMDJSON_BUILD_STATIC=OFF ..
|
||||
make
|
||||
|
||||
- run:
|
||||
name: Running tests (gcc, cmake, dynamic)
|
||||
command: |
|
||||
cd build
|
||||
make test
|
||||
|
||||
- run:
|
||||
name: Building (gcc, cmake, static)
|
||||
command: |
|
||||
mkdir buildstatic
|
||||
cd buildstatic
|
||||
cmake -DSIMDJSON_DISABLE_AVX=ON -DSIMDJSON_BUILD_STATIC=ON ..
|
||||
make
|
||||
|
||||
- run:
|
||||
name: Running tests (gcc, cmake, static)
|
||||
command: |
|
||||
cd buildstatic
|
||||
make test
|
||||
|
||||
- run:
|
||||
name: Building (gcc, cmake, sanitize)
|
||||
command: |
|
||||
mkdir buildsani
|
||||
cd buildsani
|
||||
cmake -DSIMDJSON_BUILD_STATIC=OFF -DSIMDJSON_DISABLE_AVX=ON -DSIMDJSON_SANITIZE=ON ..
|
||||
make
|
||||
|
||||
- run:
|
||||
name: Running tests (gcc, cmake, sanitize)
|
||||
command: |
|
||||
cd buildsani
|
||||
make test
|
||||
"clang":
|
||||
docker:
|
||||
- image: ubuntu:18.04
|
||||
environment:
|
||||
CXX: clang++-6.0
|
||||
steps:
|
||||
- init_<< parameters.compiler >>
|
||||
- run: apt-get install -y cmake
|
||||
- checkout
|
||||
|
||||
- run: apt-get update -qq
|
||||
- run: >
|
||||
apt-get install -y
|
||||
build-essential
|
||||
cmake
|
||||
clang-6.0
|
||||
git
|
||||
|
||||
- run:
|
||||
name: Building (clang)
|
||||
command: make
|
||||
|
||||
- run:
|
||||
name: Running tests (clang)
|
||||
command: make quiettest amalgamate
|
||||
|
||||
- run:
|
||||
name: Comparing perf against reference (clang)
|
||||
command: make checkperf
|
||||
|
||||
- run:
|
||||
name: Building (clang, cmake, dynamic)
|
||||
command: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DSIMDJSON_BUILD_STATIC=OFF ..
|
||||
make
|
||||
|
||||
- run:
|
||||
name: Running tests (clang, cmake, dynamic)
|
||||
command: |
|
||||
cd build
|
||||
make test
|
||||
|
||||
- run:
|
||||
name: Building (clang, cmake, static)
|
||||
command: |
|
||||
mkdir buildstatic
|
||||
cd buildstatic
|
||||
cmake -DSIMDJSON_BUILD_STATIC=ON ..
|
||||
make
|
||||
|
||||
- run:
|
||||
name: Running tests (clang, cmake, static)
|
||||
command: |
|
||||
cd buildstatic
|
||||
make test
|
||||
|
||||
- run:
|
||||
name: Building (clang, cmake, sanitize)
|
||||
command: |
|
||||
mkdir buildsani
|
||||
cd buildsani
|
||||
cmake -DSIMDJSON_BUILD_STATIC=OFF -DSIMDJSON_SANITIZE=ON ..
|
||||
make
|
||||
|
||||
- run:
|
||||
name: Running tests (clang, cmake, sanitize)
|
||||
command: |
|
||||
cd buildsani
|
||||
make test
|
||||
|
||||
"clangnoavx":
|
||||
docker:
|
||||
- image: ubuntu:18.04
|
||||
environment:
|
||||
CXX: clang++-6.0
|
||||
steps:
|
||||
- checkout
|
||||
|
||||
- run: apt-get update -qq
|
||||
- run: >
|
||||
apt-get install -y
|
||||
build-essential
|
||||
cmake
|
||||
clang-6.0
|
||||
git
|
||||
|
||||
- run:
|
||||
name: Building (clang)
|
||||
command: ARCHFLAGS="-march=nehalem" make
|
||||
|
||||
- run:
|
||||
name: Running tests (clang)
|
||||
command: ARCHFLAGS="-march=nehalem" make quiettest amalgamate
|
||||
|
||||
- run:
|
||||
name: Comparing perf against reference (clang)
|
||||
command: ARCHFLAGS="-march=nehalem" make checkperf
|
||||
|
||||
- run:
|
||||
name: Building (clang, cmake, dynamic)
|
||||
command: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DSIMDJSON_BUILD_STATIC=OFF -DSIMDJSON_DISABLE_AVX=on ..
|
||||
make
|
||||
|
||||
- run:
|
||||
name: Running tests (clang, cmake, dynamic)
|
||||
command: |
|
||||
cd build
|
||||
make test
|
||||
|
||||
|
||||
- run:
|
||||
name: Building (clang, cmake, static)
|
||||
command: |
|
||||
mkdir buildstatic
|
||||
cd buildstatic
|
||||
cmake -DSIMDJSON_BUILD_STATIC=ON -DSIMDJSON_DISABLE_AVX=on ..
|
||||
make
|
||||
|
||||
- run:
|
||||
name: Running tests (clang, cmake, static)
|
||||
command: |
|
||||
cd buildstatic
|
||||
make test
|
||||
|
||||
|
||||
- run:
|
||||
name: Building (clang, cmake, sanitize)
|
||||
command: |
|
||||
mkdir buildsani
|
||||
cd buildsani
|
||||
cmake -DSIMDJSON_BUILD_STATIC=OFF -DSIMDJSON_DISABLE_AVX=ON -DSIMDJSON_SANITIZE=ON ..
|
||||
make
|
||||
|
||||
- run:
|
||||
name: Running tests (clang, cmake, sanitize)
|
||||
command: |
|
||||
cd buildsani
|
||||
make test
|
||||
- run: cmake << parameters.flags >>
|
||||
- run: make
|
||||
- run: make test
|
||||
|
||||
workflows:
|
||||
version: 2
|
||||
version: 2.1
|
||||
build_and_test:
|
||||
jobs:
|
||||
- "clang"
|
||||
- "gcc"
|
||||
- "clangnoavx"
|
||||
- "gccnoavx"
|
||||
# gcc7
|
||||
- make_test: { compiler: gcc7 }
|
||||
- cmake_test: { compiler: gcc7, flags: -DSIMDJSON_BUILD_STATIC=ON }
|
||||
- cmake_test: { compiler: gcc7, flags: -DSIMDJSON_BUILD_STATIC=ON }
|
||||
- cmake_test: { compiler: gcc7, flags: -DSIMDJSON_BUILD_STATIC=OFF -DSIMDJSON_SANITIZE=ON }
|
||||
# gcc7 - no AVX
|
||||
- make_test: { compiler: gcc7, archflags: -march=nehalem }
|
||||
- cmake_test: { compiler: gcc7, flags: -DSIMDJSON_DISABLE_AVX=ON -DSIMDJSON_BUILD_STATIC=ON }
|
||||
- cmake_test: { compiler: gcc7, flags: -DSIMDJSON_DISABLE_AVX=ON -DSIMDJSON_BUILD_STATIC=ON }
|
||||
- cmake_test: { compiler: gcc7, flags: -DSIMDJSON_DISABLE_AVX=ON -DSIMDJSON_BUILD_STATIC=OFF -DSIMDJSON_SANITIZE=ON }
|
||||
# clang6
|
||||
- make_test: { compiler: clang6 }
|
||||
- cmake_test: { compiler: clang6, flags: -DSIMDJSON_BUILD_STATIC=ON }
|
||||
- cmake_test: { compiler: clang6, flags: -DSIMDJSON_BUILD_STATIC=ON }
|
||||
- cmake_test: { compiler: clang6, flags: -DSIMDJSON_BUILD_STATIC=OFF -DSIMDJSON_SANITIZE=ON }
|
||||
# clang6 - no AVX
|
||||
- make_test: { compiler: clang6, archflags: -march=nehalem }
|
||||
- cmake_test: { compiler: clang6, flags: -DSIMDJSON_DISABLE_AVX=ON -DSIMDJSON_BUILD_STATIC=ON }
|
||||
- cmake_test: { compiler: clang6, flags: -DSIMDJSON_DISABLE_AVX=ON -DSIMDJSON_BUILD_STATIC=ON }
|
||||
- cmake_test: { compiler: clang6, flags: -DSIMDJSON_DISABLE_AVX=ON -DSIMDJSON_BUILD_STATIC=OFF -DSIMDJSON_SANITIZE=ON }
|
||||
|
||||
# TODO add windows: https://circleci.com/docs/2.0/configuration-reference/#windows
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* auto-generated on Wed Aug 14 10:31:26 DST 2019. Do not edit! */
|
||||
/* auto-generated on Wed Aug 14 13:56:54 DST 2019. Do not edit! */
|
||||
|
||||
#include <iostream>
|
||||
#include "simdjson.h"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* auto-generated on Wed Aug 14 10:31:26 DST 2019. Do not edit! */
|
||||
/* auto-generated on Wed Aug 14 13:56:54 DST 2019. Do not edit! */
|
||||
#include "simdjson.h"
|
||||
|
||||
/* used for http://dmalloc.com/ Dmalloc - Debug Malloc Library */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* auto-generated on Wed Aug 14 10:31:26 DST 2019. Do not edit! */
|
||||
/* auto-generated on Wed Aug 14 13:56:54 DST 2019. Do not edit! */
|
||||
/* begin file include/simdjson/simdjson_version.h */
|
||||
// /include/simdjson/simdjson_version.h automatically generated by release.py,
|
||||
// do not change by hand
|
||||
|
|
Loading…
Reference in New Issue