mirror of
https://github.com/Echtzeitsysteme/tchecker.git
synced 2024-05-20 20:00:44 +00:00
fixing pipeline, linux only
This commit is contained in:
parent
9b36a60cae
commit
dba572276d
60
.github/workflows/build-and-test.yml
vendored
60
.github/workflows/build-and-test.yml
vendored
|
@ -4,51 +4,21 @@ on:
|
|||
branches:
|
||||
- '*'
|
||||
|
||||
env:
|
||||
CATCH2_REPO_URL : https://github.com/catchorg/Catch2.git
|
||||
CATCH2_BRANCH : v3.4.0
|
||||
TCHECKER_BUILD_TYPE : Debug
|
||||
BUILD_TYPE : Debug
|
||||
NB_CPUS : 2
|
||||
CATCH2_DIRECTORY : ${{ github.workspace }}/tmp/Catch2
|
||||
INSTALL_DIR : ${{ github.workspace }}/tmp/install
|
||||
|
||||
jobs:
|
||||
build-and-test:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest]
|
||||
intsize: [int16, int32, int64]
|
||||
compiler: [gcc, clang]
|
||||
name: ${{ matrix.os }} / ${{ matrix.intsize }} / ${{ matrix.compiler }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
build-and-test-linux:
|
||||
name: build-and-test-linux
|
||||
strategy:
|
||||
matrix:
|
||||
intsize: ["all:int16:memcheck", "all:int32:memcheck", "all:int64:memcheck"]
|
||||
compiler: ["gcc", "clang"]
|
||||
runs-on: ubuntu-latest
|
||||
container: alzeha/echtzeitsysteme-tchecker-${{ matrix.compiler }}:v0.1
|
||||
env:
|
||||
CONFNAME: all:${{ matrix.intsize }}:memcheck
|
||||
CONFNAME: ${{ matrix.intsize }}
|
||||
INSTALL_DIR: "install"
|
||||
TCHECKER_BUILD_TYPE: "Debug"
|
||||
|
||||
steps:
|
||||
- name: Set compiler variables
|
||||
run: |
|
||||
{
|
||||
if test "${{matrix.compiler}}" = "gcc"; then
|
||||
echo "CC=gcc"
|
||||
echo "CXX=g++"
|
||||
echo "CONFNAME=all:${{ matrix.intsize }}:memcheck"
|
||||
else
|
||||
echo "CC=clang"
|
||||
echo "CXX=clang++"
|
||||
echo "CONFNAME=all:${{ matrix.intsize }}"
|
||||
fi
|
||||
} >> "$GITHUB_ENV"
|
||||
- name: Getting project repo
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- if: ${{ matrix.os == 'macos-latest' }}
|
||||
run: echo "/usr/local/opt/bison/bin" >> $GITHUB_PATH
|
||||
|
||||
- name: Install pre-requesites
|
||||
run: |
|
||||
ci-scripts/install-$RUNNER_OS.sh
|
||||
ci-scripts/show-config.sh
|
||||
- name: Build TChecker
|
||||
run: ci-scripts/build.sh
|
||||
- name: Testing TChecker
|
||||
run: ci-scripts/test.sh
|
||||
- uses: actions/checkout@v4
|
||||
- name: build-and-test
|
||||
run: ci-scripts/github-ubuntu-build-and-test-${{ matrix.compiler }}.sh
|
||||
|
|
|
@ -1,60 +0,0 @@
|
|||
variables:
|
||||
INSTALL_DIR: install
|
||||
TCHECKER_BUILD_TYPE: Debug
|
||||
|
||||
.build_and_test: &build_and_test
|
||||
- ci-scripts/build.sh
|
||||
- ci-scripts/test.sh
|
||||
|
||||
.clang_conf: &clang_conf
|
||||
stage: test
|
||||
image: pictavien/tchecker-ci:clang-latest
|
||||
variables:
|
||||
CC : "clang"
|
||||
CXX : "clang++"
|
||||
|
||||
.gcc_conf: &gcc_conf
|
||||
stage: test
|
||||
image: pictavien/tchecker-ci:gcc-latest
|
||||
variables:
|
||||
CC : "gcc"
|
||||
CXX : "g++"
|
||||
artifacts:
|
||||
paths:
|
||||
- build/src/tck-reach
|
||||
- build/src/tck-liveness
|
||||
- build/src/tck-simulate
|
||||
- build/src/tck-syntax
|
||||
|
||||
|
||||
gcc_all_int32_no_memcheck:
|
||||
<<: *gcc_conf
|
||||
script:
|
||||
- export CONFNAME="all:int32:no-memcheck"
|
||||
- *build_and_test
|
||||
|
||||
gcc_all_int16_no_memcheck:
|
||||
<<: *gcc_conf
|
||||
script:
|
||||
- export CONFNAME="all:int16:no-memcheck"
|
||||
- *build_and_test
|
||||
|
||||
gcc_all_int64_memcheck:
|
||||
<<: *gcc_conf
|
||||
script:
|
||||
- export CONFNAME="all:int64:memcheck"
|
||||
- *build_and_test
|
||||
|
||||
gcc_simplest_int32_memcheck:
|
||||
<<: *gcc_conf
|
||||
script:
|
||||
- export CONFNAME="smallest:int32:memcheck"
|
||||
- *build_and_test
|
||||
|
||||
clang_all_int32_no_memcheck:
|
||||
<<: *clang_conf
|
||||
script:
|
||||
- export CONFNAME="all:int32:no-memcheck"
|
||||
- *build_and_test
|
||||
|
||||
|
3
AUTHORS
3
AUTHORS
|
@ -1,4 +1,5 @@
|
|||
List of contributors to the TChecker projet:
|
||||
List of contributors to the TChecker project:
|
||||
- Frédéric Herbreteau, Bordeaux INP, fh at labri.fr
|
||||
- Gérald POINT, CNRS, gerald.point at labri.fr
|
||||
- Ocan Sankur, CNRS, ocan.sankur at irisa.fr
|
||||
- Alexander Lieb, TU Darmstadt
|
||||
|
|
|
@ -1,66 +1,59 @@
|
|||
#
|
||||
# build and publish the image with command:
|
||||
# docker-image-build-publish.sh
|
||||
#
|
||||
ARG COMPILER_IMAGE
|
||||
ARG LIBBOOST_VERSION=1.81
|
||||
FROM ubuntu:latest as base
|
||||
ARG CXX
|
||||
|
||||
FROM gcc:12 as gcc-12
|
||||
ENV CXX=g++
|
||||
ENV CC=gcc
|
||||
ENV GCC_VERSION=12
|
||||
|
||||
RUN apt-get update
|
||||
|
||||
FROM gcc:10 as gcc-10
|
||||
ENV CXX=g++
|
||||
ENV CC=gcc
|
||||
ENV GCC_VERSION=10
|
||||
ENV LIBBOOST_VERSION=1.74
|
||||
|
||||
FROM gcc:11 as gcc-11
|
||||
ENV CXX=g++
|
||||
ENV CC=gcc
|
||||
ENV GCC_VERSION=11
|
||||
ENV LIBBOOST_VERSION=1.74
|
||||
|
||||
RUN apt-get update
|
||||
|
||||
FROM debian:latest as clang-13
|
||||
ENV CXX=clang++
|
||||
ENV CC=clang
|
||||
ENV CLANG_VERSION=13
|
||||
ENV LIBBOOST_VERSION=${LIBBOOST_VERSION}
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y clang-${CLANG_VERSION} && \
|
||||
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-${CLANG_VERSION} 1 && \
|
||||
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-${CLANG_VERSION} 1
|
||||
|
||||
FROM ${COMPILER_IMAGE} as target-image
|
||||
ARG CATCH2_REV=v3.4.0
|
||||
ARG CATCH2_REPO=https://github.com/catchorg/Catch2.git
|
||||
ARG COMPILER_IMAGE=${COMPILER_IMAGE}
|
||||
|
||||
ENV TCHECKER_DOCKER=true
|
||||
ENV TCHECKER_DOCKER_IMAGE="${COMPILER_IMAGE}"
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y \
|
||||
git cmake bison flex doxygen \
|
||||
libboost${LIBBOOST_VERSION}-dev \
|
||||
RUN apt update && \
|
||||
apt install -y \
|
||||
git cmake bison flex doxygen wget \
|
||||
valgrind graphviz
|
||||
|
||||
RUN if test $(echo "${LIBBOOST_VERSION}" | tr -d '.') -ge 175; then \
|
||||
apt-get install -y libboost-json${LIBBOOST_VERSION}-dev; \
|
||||
fi
|
||||
|
||||
RUN git clone --branch ${CATCH2_REV} ${CATCH2_REPO} /tmp/catch2
|
||||
FROM base as gcc-image
|
||||
RUN apt install -y gcc-12 g++-12 \
|
||||
build-essential g++ python-dev-is-python3 autotools-dev libicu-dev libbz2-dev && \
|
||||
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 1 && \
|
||||
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 1
|
||||
|
||||
RUN apt --purge remove libboost-all-dev libboost-doc libboost-dev
|
||||
|
||||
RUN wget http://downloads.sourceforge.net/project/boost/boost/1.81.0/boost_1_81_0.tar.gz && \
|
||||
tar -zxvf boost_1_81_0.tar.gz && \
|
||||
cd boost_1_81_0/ && \
|
||||
./bootstrap.sh && \
|
||||
./b2 --with=all install && \
|
||||
cd ..
|
||||
|
||||
RUN git clone --branch v3.2.0 https://github.com/catchorg/Catch2.git /tmp/catch2
|
||||
|
||||
RUN mkdir -p /tmp/catch2/build && \
|
||||
cd /tmp/catch2/build && \
|
||||
cmake -DCMAKE_CXX_COMPILER=${CXX} .. && \
|
||||
make -j 4 && \
|
||||
cmake -DCMAKE_CXX_COMPILER=g++ .. && \
|
||||
make && \
|
||||
make install
|
||||
|
||||
ENTRYPOINT [ "/bin/bash", "-s" ]
|
||||
ENTRYPOINT ["/bin/bash", "-s"]
|
||||
|
||||
FROM base as clang-image
|
||||
|
||||
RUN apt install -y clang-13 \
|
||||
build-essential g++ python-dev-is-python3 autotools-dev libicu-dev libbz2-dev && \
|
||||
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-13 1 && \
|
||||
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-13 1
|
||||
|
||||
RUN apt --purge remove libboost-all-dev libboost-doc libboost-dev
|
||||
|
||||
RUN wget http://downloads.sourceforge.net/project/boost/boost/1.81.0/boost_1_81_0.tar.gz && \
|
||||
tar -zxvf boost_1_81_0.tar.gz && \
|
||||
cd boost_1_81_0/ && \
|
||||
./bootstrap.sh && \
|
||||
./b2 --with=all install && \
|
||||
cd ..
|
||||
|
||||
RUN git clone --branch v3.2.0 https://github.com/catchorg/Catch2.git /tmp/catch2
|
||||
|
||||
RUN mkdir -p /tmp/catch2/build && \
|
||||
cd /tmp/catch2/build && \
|
||||
cmake -DCMAKE_CXX_COMPILER=clang++ .. && \
|
||||
make && \
|
||||
make install
|
||||
|
||||
ENTRYPOINT ["/bin/bash", "-s"]"
|
||||
|
|
|
@ -1,108 +0,0 @@
|
|||
#! /usr/bin/env bash
|
||||
|
||||
GCC_LATEST_IMAGE="gcc-12"
|
||||
CLANG_LATEST_IMAGE="clang-13"
|
||||
REPOSITORY=pictavien/tchecker-ci
|
||||
|
||||
SCRIPTDIR=$(cd $(dirname $0); pwd)
|
||||
|
||||
OPT_TAG=NONE
|
||||
OPT_GCC_IMAGE=NONE
|
||||
OPT_CLANG_IMAGE=NONE
|
||||
|
||||
# option set to true if built images have to be pushed on Docker registry
|
||||
OPT_PUSH=false
|
||||
# option set to true to only display Docker commands
|
||||
OPT_DRY=false
|
||||
|
||||
usage() {
|
||||
cat <<EOF
|
||||
USAGE: $0 [options]
|
||||
where options are:
|
||||
-n
|
||||
-p
|
||||
-g gcc-image
|
||||
-c clang-image
|
||||
-t image-tag-suffix
|
||||
-h display this help message
|
||||
|
||||
EOF
|
||||
exit 0
|
||||
}
|
||||
|
||||
error() {
|
||||
echo "$0: error: $1." 1>&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
parse_args() {
|
||||
OPTIONS=":g:c:t:nph"
|
||||
while getopts ${OPTIONS} opt; do
|
||||
case ${opt} in
|
||||
"g") OPT_GCC_IMAGE=${OPTARG} ;;
|
||||
"c") OPT_CLANG_IMAGE=${OPTARG} ;;
|
||||
"t") OPT_TAG=${OPTARG} ;;
|
||||
"h") usage ;;
|
||||
"p") OPT_PUSH=true ;;
|
||||
"n") OPT_DRY=true ;;
|
||||
":") error "missing argument to option '${OPTARG}'" ;;
|
||||
"?") error "invalid option '${OPTARG}'" ;;
|
||||
esac
|
||||
done
|
||||
|
||||
if test $((${OPTIND}-1)) -ne $#; then
|
||||
error "wrong # of arguments ($#)"
|
||||
fi
|
||||
}
|
||||
|
||||
set -eu
|
||||
|
||||
parse_args "$@"
|
||||
|
||||
GCC_COMPILER_IMAGE=${OPT_GCC_IMAGE}
|
||||
CLANG_COMPILER_IMAGE=${OPT_CLANG_IMAGE}
|
||||
case ${OPT_TAG} in
|
||||
"latest")
|
||||
GCC_COMPILER_IMAGE=${GCC_LATEST_IMAGE}
|
||||
GCC_TAG=gcc-${OPT_TAG}
|
||||
CLANG_COMPILER_IMAGE=${CLANG_LATEST_IMAGE}
|
||||
CLANG_TAG=clang-${OPT_TAG}
|
||||
;;
|
||||
"NONE")
|
||||
GCC_TAG=${OPT_GCC_IMAGE}
|
||||
CLANG_TAG=${OPT_CLANG_IMAGE}
|
||||
;;
|
||||
*)
|
||||
GCC_TAG=gcc-${OPT_TAG}
|
||||
CLANG_TAG=clang-${OPT_TAG}
|
||||
;;
|
||||
esac
|
||||
|
||||
if ${OPT_DRY}; then
|
||||
dry="echo"
|
||||
else
|
||||
dry=""
|
||||
fi
|
||||
|
||||
if ${OPT_PUSH}; then
|
||||
push="--push"
|
||||
else
|
||||
push=""
|
||||
echo "warning: images are not pushed."
|
||||
fi
|
||||
|
||||
cd ${SCRIPTDIR}
|
||||
if test "${GCC_COMPILER_IMAGE}" != "NONE"; then
|
||||
${dry} docker build --build-arg "COMPILER_IMAGE=${GCC_COMPILER_IMAGE}" \
|
||||
--target target-image -t ${REPOSITORY}:${GCC_TAG} .
|
||||
else
|
||||
echo "no image built for GCC compiler"
|
||||
fi
|
||||
|
||||
if test "${CLANG_COMPILER_IMAGE}" != "NONE"; then
|
||||
${dry} docker build --build-arg "COMPILER_IMAGE=${CLANG_COMPILER_IMAGE}" \
|
||||
--target target-image -t ${REPOSITORY}:${CLANG_TAG} .
|
||||
else
|
||||
echo "no image built for CLANG compiler"
|
||||
fi
|
||||
|
12
ci-scripts/github-ubuntu-build-and-test-clang.sh
Executable file
12
ci-scripts/github-ubuntu-build-and-test-clang.sh
Executable file
|
@ -0,0 +1,12 @@
|
|||
#!/bin/sh -l
|
||||
|
||||
apt update
|
||||
apt upgrade -y
|
||||
|
||||
export CC="clang"
|
||||
export CXX="clang++"
|
||||
|
||||
./ci-scripts/build.sh
|
||||
./ci-scripts/test.sh
|
||||
|
||||
./ci-scripts/show-config.sh
|
12
ci-scripts/github-ubuntu-build-and-test-gcc.sh
Executable file
12
ci-scripts/github-ubuntu-build-and-test-gcc.sh
Executable file
|
@ -0,0 +1,12 @@
|
|||
#!/bin/sh -l
|
||||
|
||||
apt update
|
||||
apt upgrade -y
|
||||
|
||||
export CC="gcc"
|
||||
export CXX="g++"
|
||||
|
||||
./ci-scripts/build.sh
|
||||
./ci-scripts/test.sh
|
||||
|
||||
./ci-scripts/show-config.sh
|
|
@ -1,14 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
LIBBOOST_VERSION=1.81
|
||||
|
||||
set -eu
|
||||
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y valgrind
|
||||
if ! sudo apt-get install -y libboost${LIBBOOST_VERSION}-dev \
|
||||
libboost-json${LIBBOOST_VERSION}-dev; then
|
||||
sudo apt-get install -y libboost-dev
|
||||
fi
|
||||
|
||||
$(dirname $0)/install-sources.sh
|
|
@ -1,14 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -eu
|
||||
|
||||
brew update
|
||||
brew upgrade
|
||||
brew install boost@1.81
|
||||
brew install bison@3.8
|
||||
|
||||
$(dirname $0)/install-sources.sh
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -eux
|
||||
|
||||
echo "#### INSTALLING Catch2"
|
||||
|
||||
git clone --branch ${CATCH2_BRANCH} ${CATCH2_REPO_URL} ${CATCH2_DIRECTORY} || true
|
||||
mkdir -p ${CATCH2_DIRECTORY}/build || true
|
||||
|
||||
HERE=${PWD}
|
||||
cd ${CATCH2_DIRECTORY}/build
|
||||
cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} -DCMAKE_CXX_COMPILER=${CXX} ..
|
||||
make -j ${NB_CPUS}
|
||||
make install
|
||||
ls -R ${INSTALL_DIR}
|
||||
cd ${HERE}
|
||||
|
||||
|
||||
|
Loading…
Reference in a new issue