CI: Simplify CI builds

parent 4a9387e8
......@@ -44,66 +44,28 @@ stages:
- cd build
- ctest . --output-on-failure -j $(grep -c processor /proc/cpuinfo)
.config:alpine: &distro_alpine
<<: *only-merge
image: alpine:3.11
.config:archlinux: &distro_archlinux
<<: *only-merge
image: archlinux/base
.config:builder: &distro_builder
image: gitlab.fit.cvut.cz:5000/algorithms-library-toolkit/ci-docker-images/alt-builder:latest
.config:debian: &distro_debian
<<: *only-merge
image: amd64/debian:testing-slim
.config:opensuse:leap: &distro_opensuse-leap
<<: *only-merge
image: opensuse/leap:latest
.config:ubuntu:lts: &distro_ubuntu-lts
<<: *only-merge
image: ubuntu:latest
.config:ubuntu:rolling: &distro_ubuntu-rolling
<<: *only-merge
image: ubuntu:rolling
# -----------------------------------------------------------------------------
build:alpine:
<<: *distro_alpine
extends: .template:build
before_script:
- apk add --no-cache bash build-base cmake ninja python3 libexecinfo-dev libxml2-dev tclap-dev readline-dev qt5-qtbase-dev graphviz-dev jsoncpp-dev
test:alpine:
<<: *distro_alpine
extends: .template:test
dependencies:
- build:alpine
before_script:
- apk add --no-cache bash bc coreutils python3 cmake libexecinfo libxml2 tclap readline qt5-qtbase qt5-qtbase-x11 graphviz jsoncpp
# .config:alpine: &distro_alpine
# <<: *only-merge
# image: alpine:3.11
#
# build:alpine:
# <<: *distro_alpine
# extends: .template:build
# before_script:
# - apk add --no-cache bash build-base cmake ninja python3 libexecinfo-dev libxml2-dev tclap-dev readline-dev qt5-qtbase-dev graphviz-dev jsoncpp-dev
#
# test:alpine:
# <<: *distro_alpine
# extends: .template:test
# dependencies:
# - build:alpine
# before_script:
# - apk add --no-cache bash bc coreutils python3 cmake libexecinfo libxml2 tclap readline qt5-qtbase qt5-qtbase-x11 graphviz jsoncpp
# -----------------------------------------------------------------------------
build:archlinux:
<<: *distro_archlinux
extends: .template:build
before_script:
- pacman -Syu --noconfirm base-devel cmake ninja python libxml2 tclap readline qt5-base graphviz jsoncpp
test:archlinux:
<<: *distro_archlinux
extends: .template:test
dependencies:
- build:archlinux
before_script:
- pacman -Syu --noconfirm base-devel bash bc coreutils cmake ninja python libxml2 tclap readline qt5-base graphviz jsoncpp
# -----------------------------------------------------------------------------
.config:builder: &distro_builder
image: gitlab.fit.cvut.cz:5000/algorithms-library-toolkit/ci-docker-images/alt-builder:latest
.build:builder:
<<: *distro_builder
......@@ -116,97 +78,22 @@ test:archlinux:
build:builder:gcc:
extends: .build:builder
#build:builder:clang:
# extends: .build:builder
# variables:
# CXX: clang++
build:builder:clang-sanitizers:
extends: .build:builder
variables:
CXX: clang++
CXXFLAGS: "-fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
CXXFLAGS: "-fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all" # -stdlib=libc++
test:builder:gcc:
extends: .test:builder
dependencies:
- build:builder:gcc
#test:builder:clang:
# extends: .test:builder
# dependencies:
# - build:builder:clang
test:builder:clang-sanitizers:
extends: .test:builder
dependencies:
- build:builder:clang-sanitizers
# -----------------------------------------------------------------------------
build:debian:
<<: *distro_debian
extends: .template:build
before_script:
- apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential cmake ninja-build python3 libxml2-dev libtclap-dev libreadline-dev qtbase5-dev graphviz-dev libjsoncpp-dev
test:debian:
<<: *distro_debian
extends: .template:test
dependencies:
- build:debian
before_script:
- apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential bash cmake libxml2 libreadline8 libqt5widgets5 libqt5xml5 graphviz libjsoncpp1
# -----------------------------------------------------------------------------
build:opensuse:leap:
<<: *distro_opensuse-leap
extends: .template:build
before_script:
- zypper -n install python3 cmake gcc-c++ bash ninja libxml2-devel tclap readline-devel libQt5Widgets-devel libQt5Xml-devel graphviz-devel jsoncpp-devel
test:opensuse:leap:
<<: *distro_opensuse-leap
extends: .template:test
dependencies:
- build:opensuse:leap
before_script:
- zypper -n install bash cmake libxml2 readline libQt5Widgets5 libQt5Xml5 graphviz libjsoncpp19
# -----------------------------------------------------------------------------
build:ubuntu:lts:
<<: *distro_ubuntu-lts
extends: .template:build
before_script:
- apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential cmake ninja-build python3 libxml2-dev libtclap-dev libreadline-dev qtbase5-dev graphviz-dev libjsoncpp-dev
test:ubuntu:lts:
<<: *distro_ubuntu-lts
extends: .template:test
dependencies:
- build:ubuntu:lts
before_script:
- apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential bash cmake libxml2 libreadline8 libqt5widgets5 libqt5xml5 graphviz libjsoncpp1
# -----------------------------------------------------------------------------
build:ubuntu:rolling:
<<: *distro_ubuntu-rolling
extends: .template:build
before_script:
- apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential cmake ninja-build python3 libxml2-dev libtclap-dev libreadline-dev qtbase5-dev graphviz-dev libjsoncpp-dev
test:ubuntu:rolling:
<<: *distro_ubuntu-rolling
extends: .template:test
before_script:
- apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential bash cmake libxml2 libreadline8 libqt5widgets5 libqt5xml5 graphviz libjsoncpp1
dependencies:
- build:ubuntu:rolling
#######################################################################################################################
# doc
......@@ -251,7 +138,6 @@ static-analysis:clang-tidy:
script:
- jq ".[].file" build/compile_commands.json | tr -d "\"" | grep -v "test-src" | xargs -n1 -P$(grep -c processor /proc/cpuinfo) clang-tidy -p build/
#######################################################################################################################
# notify
......@@ -260,23 +146,30 @@ static-analysis:clang-tidy:
before_script:
- apk add --no-cache curl
dependencies: []
script:
- curl -X POST -F token="$TOKEN" -F ref=master $PARAMS https://gitlab.fit.cvut.cz/api/v4/projects/$PROJECT_ID/trigger/pipeline
# -----------------------------------------------------------------------------
notify:pyalib:
<<: *only-master
extends: .template:notify
script:
- curl -X POST -F token="$TOKEN_TRIGGER_PYALIB" -F ref=master https://gitlab.fit.cvut.cz/api/v4/projects/11497/trigger/pipeline
variables:
TOKEN: "$TOKEN_TRIGGER_PYALIB"
PROJECT_ID: "11497"
notify:release:stable:
<<: *only-tag
extends: .template:notify
script:
- curl -X POST -F token="$TOKEN_TRIGGER_RELEASE" -F ref=master -F "variables[RELEASE_REF]=$CI_COMMIT_TAG" -F "variables[RELEASE_MODE]=stable" https://gitlab.fit.cvut.cz/api/v4/projects/17683/trigger/pipeline
variables:
TOKEN: "$TOKEN_TRIGGER_RELEASE"
PROJECT_ID: "17683"
PARAMS: "-F variables[RELEASE_REF]=$CI_COMMIT_TAG -F variables[RELEASE_MODE]=stable"
notify:release:snapshot:
<<: *only-master
extends: .template:notify
script:
- curl -X POST -F token="$TOKEN_TRIGGER_RELEASE" -F ref=master -F "variables[RELEASE_REF]=$CI_COMMIT_SHA" -F "variables[RELEASE_MODE]=snapshot" https://gitlab.fit.cvut.cz/api/v4/projects/17683/trigger/pipeline
variables:
TOKEN: "$TOKEN_TRIGGER_RELEASE"
PROJECT_ID: "17683"
PARAMS: "-F variables[RELEASE_REF]=$CI_COMMIT_SHA -F variables[RELEASE_MODE]=snapshot"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment