Add clang to Travis configurations
This adds the clang compiler to the tested Travis configurations.
This commit is contained in:
parent
22238bb398
commit
fde2af5841
@ -1,6 +1,9 @@
|
|||||||
FROM archimg/base-devel:latest
|
FROM archimg/base-devel:latest
|
||||||
|
|
||||||
|
ARG toolchain
|
||||||
|
|
||||||
RUN pacman -Sy
|
RUN pacman -Sy
|
||||||
RUN pacman -S --noconfirm boost cmake git ninja re2c
|
RUN pacman -S --noconfirm boost cmake git ninja re2c
|
||||||
|
RUN if [ "${toolchain}" = "clang" ]; then pacman -S --noconfirm clang; fi
|
||||||
|
|
||||||
VOLUME /app
|
VOLUME /app
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
FROM ubuntu:18.04
|
FROM ubuntu:18.04
|
||||||
|
|
||||||
|
ARG toolchain
|
||||||
|
|
||||||
RUN apt-get update
|
RUN apt-get update
|
||||||
RUN apt-get install -y libboost-all-dev cmake git ninja-build re2c
|
RUN apt-get install -y libboost-all-dev cmake git ninja-build re2c
|
||||||
|
RUN if [ "${toolchain}" = "clang" ]; then apt-get install -y clang; fi
|
||||||
|
|
||||||
VOLUME /app
|
VOLUME /app
|
||||||
|
12
.ci/ci.sh
12
.ci/ci.sh
@ -1,7 +1,17 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ "$1" = "gcc" ]
|
||||||
|
then
|
||||||
|
cxx=g++
|
||||||
|
cc=gcc
|
||||||
|
elif [ "$1" = "clang" ]
|
||||||
|
then
|
||||||
|
cxx=clang++
|
||||||
|
cc=clang
|
||||||
|
fi
|
||||||
|
|
||||||
git submodule update --init --recursive
|
git submodule update --init --recursive
|
||||||
mkdir -p build/debug
|
mkdir -p build/debug
|
||||||
cd build/debug
|
cd build/debug
|
||||||
cmake ../.. -GNinja -DANTHEM_BUILD_TESTS=ON
|
cmake ../.. -GNinja -DANTHEM_BUILD_TESTS=ON -DCMAKE_CXX_COMPILER=${cxx} -DCMAKE_C_COMPILER=${cc}
|
||||||
ninja anthem-app && ninja run-tests
|
ninja anthem-app && ninja run-tests
|
||||||
|
14
.travis.yml
14
.travis.yml
@ -5,15 +5,21 @@ services:
|
|||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- env: distribution=arch-latest
|
- env: distribution=arch-latest toolchain=gcc
|
||||||
os: linux
|
os: linux
|
||||||
language: cpp
|
language: cpp
|
||||||
- env: distribution=ubuntu-18.04
|
- env: distribution=arch-latest toolchain=clang
|
||||||
|
os: linux
|
||||||
|
language: cpp
|
||||||
|
- env: distribution=ubuntu-18.04 toolchain=gcc
|
||||||
|
os: linux
|
||||||
|
language: cpp
|
||||||
|
- env: distribution=ubuntu-18.04 toolchain=clang
|
||||||
os: linux
|
os: linux
|
||||||
language: cpp
|
language: cpp
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
- docker build -t ${distribution} - < .ci/Dockerfile-${distribution}
|
- docker build --build-arg toolchain=${toolchain} -t ${distribution} - < .ci/Dockerfile-${distribution}
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- docker run --mount source=$(pwd),target=/app,type=bind -w /app ${distribution} /bin/bash -c ".ci/ci.sh"
|
- docker run --mount source=$(pwd),target=/app,type=bind -w /app ${distribution} /bin/bash -c ".ci/ci.sh ${toolchain}"
|
||||||
|
Loading…
Reference in New Issue
Block a user