Skip to content

Commit

Permalink
Add CI stage to test and deploy conan package
Browse files Browse the repository at this point in the history
  • Loading branch information
manusharded committed Jan 21, 2019
1 parent b0025b5 commit aaf7566
Show file tree
Hide file tree
Showing 4 changed files with 122 additions and 5 deletions.
113 changes: 113 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,20 @@ stages:
- clang-format-check
- test
- user-integration
- conan-integration

before_script:
- conan remote add manu343726 https://api.bintray.com/conan/manu343726/conan-packages
- conan user manu343726 -p $manu343726_bintray_key -r manu343726

clang-format-check:
stage: clang-format-check
tags:
- linux
- docker
image: manu343726/tinyrefl:clang-format-ci
before_script: # Overrides global before_script with conan setup
- echo do nothing before script
script:
- CLANG_FORMAT=clang-format ./ci/ci_clang_format_check.sh
- echo clang-format was applied ok
Expand Down Expand Up @@ -739,3 +747,108 @@ user-integration-gcc8-x86-llvm6.0.0:
script:
- ./ci/ci_user_integration.sh
- echo finished ok

conan-integration-clang40:
stage: conan-integration
tags:
- linux
- docker
image: manu343726/tinyrefl:clang40-x86
script:
- conan create . Manu343726/testing --build=missing
after_script:
- conan upload "llvm*" --confirm --all -r manu343726
- conan upload "clang*" --confirm --all -r manu343726
- conan upload "libclang" --confirm --all -r manu343726
- conan upload "cppast" --confirm --all -r manu343726
- conan upload "tinyrefl" --confirm --all -r manu343726

conan-integration-clang50:
stage: conan-integration
tags:
- linux
- docker
image: manu343726/tinyrefl:clang50-x86
script:
- conan create . Manu343726/testing --build=missing
after_script:
- conan upload "llvm*" --confirm --all -r manu343726
- conan upload "clang*" --confirm --all -r manu343726
- conan upload "libclang" --confirm --all -r manu343726
- conan upload "cppast" --confirm --all -r manu343726
- conan upload "tinyrefl" --confirm --all -r manu343726

conan-integration-clang60:
stage: conan-integration
tags:
- linux
- docker
image: manu343726/tinyrefl:clang60-x86
script:
- conan create . Manu343726/testing --build=missing
after_script:
- conan upload "llvm*" --confirm --all -r manu343726
- conan upload "clang*" --confirm --all -r manu343726
- conan upload "libclang" --confirm --all -r manu343726
- conan upload "cppast" --confirm --all -r manu343726
- conan upload "tinyrefl" --confirm --all -r manu343726

conan-integration-gcc5:
stage: conan-integration
tags:
- linux
- docker
image: manu343726/tinyrefl:gcc5-x86
script:
- conan create . Manu343726/testing --build=missing
after_script:
- conan upload "llvm*" --confirm --all -r manu343726
- conan upload "clang*" --confirm --all -r manu343726
- conan upload "libclang" --confirm --all -r manu343726
- conan upload "cppast" --confirm --all -r manu343726
- conan upload "tinyrefl" --confirm --all -r manu343726

conan-integration-gcc6:
stage: conan-integration
tags:
- linux
- docker
image: manu343726/tinyrefl:gcc6-x86
script:
- conan create . Manu343726/testing --build=missing
after_script:
- conan upload "llvm*" --confirm --all -r manu343726
- conan upload "clang*" --confirm --all -r manu343726
- conan upload "libclang" --confirm --all -r manu343726
- conan upload "cppast" --confirm --all -r manu343726
- conan upload "tinyrefl" --confirm --all -r manu343726

conan-integration-gcc7:
stage: conan-integration
tags:
- linux
- docker
image: manu343726/tinyrefl:gcc7-x86
script:
- conan create . Manu343726/testing --build=missing
after_script:
- conan upload "llvm*" --confirm --all -r manu343726
- conan upload "clang*" --confirm --all -r manu343726
- conan upload "libclang" --confirm --all -r manu343726
- conan upload "cppast" --confirm --all -r manu343726
- conan upload "tinyrefl" --confirm --all -r manu343726

conan-integration-gcc8:
stage: conan-integration
tags:
- linux
- docker
image: manu343726/tinyrefl:gcc8-x86
script:
- conan create . Manu343726/testing --build=missing
after_script:
- conan upload "llvm*" --confirm --all -r manu343726
- conan upload "clang*" --confirm --all -r manu343726
- conan upload "libclang" --confirm --all -r manu343726
- conan upload "cppast" --confirm --all -r manu343726
- conan upload "tinyrefl" --confirm --all -r manu343726
6 changes: 5 additions & 1 deletion ci/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ USER root
# Install libtinfo required by LLVM
RUN echo "deb http://us.archive.ubuntu.com/ubuntu/ trusty multiverse" >> /etc/apt/sources.list && \
apt update && \
apt install -y libtinfo-dev libz-dev
apt install -y libtinfo-dev libz-dev python3-pip && \
apt clean

ADD toolchain.cmake /usr/share/toolchain.cmake
ADD build_toolchain.sh build_toolchain.sh
Expand All @@ -18,6 +19,9 @@ ENV BOOST_VERSION=$BOOST_VERSION
ADD install_boost.sh install_boost.sh
RUN chmod +x install_boost.sh && ./install_boost.sh

RUN pip uninstall conan -y
RUN pip3 install conan

USER conan
WORKDIR /home/conan

Expand Down
6 changes: 3 additions & 3 deletions ci/docker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ if [[ -z "$NAME" ]]; then
NAME="tinyrefl"
fi
if [[ -z "$BOOST_VERSION" ]]; then
BOOST_VERSION="1.66.0"
BOOST_VERSION="1.69.0"
fi

NO_CACHE=$1
Expand Down Expand Up @@ -60,5 +60,5 @@ build lasote/conangcc7 gcc7-x86 gcc g++
build lasote/conangcc8-armv7 gcc8-armv7 gcc g++ CROSS_BUILDING
build lasote/conangcc8 gcc8-x86 gcc g++

docker build clang-format -t manu343726/tinyrefl:clang-format && docker push manu343726/tinyrefl:clang-format
docker build clang-format-ci -t manu343726/tinyrefl:clang-format-ci && docker push manu343726/tinyrefl:clang-format-ci
docker build ${DOCKER_DIR}/clang-format -t manu343726/tinyrefl:clang-format && docker push manu343726/tinyrefl:clang-format
docker build ${DOCKER_DIR}/clang-format-ci -t manu343726/tinyrefl:clang-format-ci && docker push manu343726/tinyrefl:clang-format-ci
2 changes: 1 addition & 1 deletion ci/docker/clang-format/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ARG CLANG_FORMAT_VERSION_ARG=6.0
ENV CLANG_FORMAT_VERSION=$CLANG_FORMAT_VERSION_ARG

RUN apt-get update && \
apt-get install -y clang-format-${CLANG_FORMAT_VERSION} git && \
apt-get install -y clang-format-${CLANG_FORMAT_VERSION} git python-pip && \
apt-get clean

RUN update-alternatives \
Expand Down

0 comments on commit aaf7566

Please sign in to comment.