From 8e446de1f4abd800df26376bb6a24981eb82747f Mon Sep 17 00:00:00 2001 From: eidheim Date: Tue, 19 Jun 2018 10:24:16 +0200 Subject: [PATCH] Updated CI --- .appveyor.sh | 5 +++++ .appveyor.yml | 15 +++++++++++++++ .gitlab-ci.yml | 26 ++++++++++++++++++++++++++ .travis.yml | 20 -------------------- README.md | 2 +- appveyor.yml | 15 --------------- ci/compile.sh | 24 ------------------------ ci/execute.sh | 36 ------------------------------------ ci/static_analysis.sh | 14 -------------- ci/update_ci.sh | 42 ------------------------------------------ 10 files changed, 47 insertions(+), 152 deletions(-) create mode 100644 .appveyor.sh create mode 100644 .appveyor.yml create mode 100644 .gitlab-ci.yml delete mode 100644 .travis.yml delete mode 100644 appveyor.yml delete mode 100755 ci/compile.sh delete mode 100755 ci/execute.sh delete mode 100755 ci/static_analysis.sh delete mode 100755 ci/update_ci.sh diff --git a/.appveyor.sh b/.appveyor.sh new file mode 100644 index 0000000..01c9f4d --- /dev/null +++ b/.appveyor.sh @@ -0,0 +1,5 @@ +cd ${APPVEYOR_BUILD_FOLDER} +mkdir -p build +cd build +export PATH="/mingw64/bin:/usr/local/bin:/usr/bin:/bin:/c/WINDOWS/system32:/c/WINDOWS:/c/WINDOWS/System32/Wbem:/c/WINDOWS/System32/WindowsPowerShell/v1.0:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl" +exec sh -c "cmake -G\"MSYS Makefiles\" -DCMAKE_INSTALL_PREFIX=/mingw64 -DBUILD_TESTING=1 .. && make && make test" diff --git a/.appveyor.yml b/.appveyor.yml new file mode 100644 index 0000000..bad268e --- /dev/null +++ b/.appveyor.yml @@ -0,0 +1,15 @@ +platform: + - x64 + +environment: + MSYSTEM: MSYS + CTEST_OUTPUT_ON_FAILURE: 1 + +before_build: + - C:\msys64\usr\bin\pacman --noconfirm --ask 20 --sync --refresh --sysupgrade + - C:\msys64\usr\bin\pacman --noconfirm --sync --refresh pacman + - C:\msys64\usr\bin\pacman --noconfirm --sync --refresh git + - C:\msys64\usr\bin\pacman --noconfirm --needed --sync mingw-w64-x86_64-cmake make mingw-w64-x86_64-toolchain mingw-w64-x86_64-clang + +build_script: + - C:\msys64\usr\bin\bash -lc "$(cygpath ${APPVEYOR_BUILD_FOLDER})/.appveyor.sh" diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..873c349 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,26 @@ +.script: &compile + script: + - mkdir build + - cd build + - scan-build cmake .. + - scan-build --status-bugs make -j$(nproc) + - rm -r * + - cmake -DBUILD_TESTING=1 .. + - make -j$(nproc) + - CTEST_OUTPUT_ON_FAILURE=1 make test + +ubuntu: + image: cppit/jucipp:ubuntu + <<: *compile +fedora: + image: cppit/jucipp:fedora + <<: *compile +arch: + image: cppit/jucipp:arch + <<: *compile +debian-testing: + image: cppit/jucipp:debian-testing + <<: *compile +debian: + image: cppit/jucipp:debian + <<: *compile diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 1504d55..0000000 --- a/.travis.yml +++ /dev/null @@ -1,20 +0,0 @@ -sudo: required - -env: - - distribution: ubuntu - - distribution: fedora - - distribution: arch - - distribution: debian-testing - - distribution: debian - -services: - - docker - -before_install: - - ./ci/update_ci.sh - -script: - - script=static_analysis ./ci/execute.sh - - script=clean ./ci/execute.sh - - script=compile CXX=g++ CC=gcc ./ci/execute.sh - - script=compile make_command="CTEST_OUTPUT_ON_FAILURE=1 make test" ./ci/execute.sh diff --git a/README.md b/README.md index 2553548..7e720f2 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# libclangmm [![Build Status](https://travis-ci.org/cppit/libclangmm.svg?branch=master)](https://travis-ci.org/cppit/libclangmm) [![Build status](https://ci.appveyor.com/api/projects/status/bqcva8fovxu31yp3/branch/master?svg=true)](https://ci.appveyor.com/project/zalox/libclangmm/branch/master) +# libclangmm ###### an easy-to-use C++ wrapper for libclang diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 9fed3a7..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,15 +0,0 @@ -platform: - - x64 - -environment: - MSYSTEM: MSYS - -before_build: - - C:\msys64\usr\bin\pacman --noconfirm --sync --refresh --refresh pacman - - C:\msys64\usr\bin\pacman --noconfirm --sync --refresh --refresh git - - C:\msys64\usr\bin\pacman --noconfirm --sync --refresh --refresh --sysupgrade --sysupgrade - - C:\msys64\usr\bin\bash -lc "$(cygpath ${APPVEYOR_BUILD_FOLDER})/ci/update_ci.sh" - -build_script: - - C:\msys64\usr\bin\bash -lc "script=compile $(cygpath ${APPVEYOR_BUILD_FOLDER})/ci/execute.sh" - - C:\msys64\usr\bin\bash -lc "script=compile make_command='CTEST_OUTPUT_ON_FAILURE=1 make test' $(cygpath ${APPVEYOR_BUILD_FOLDER})/ci/execute.sh" diff --git a/ci/compile.sh b/ci/compile.sh deleted file mode 100755 index 56bfa94..0000000 --- a/ci/compile.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash - -if [ "${cmake_command}" == "" ]; then - if [ "$APPVEYOR" != "" ]; then - if [ "$PLATFORM" == "x64" ]; then - mingw="mingw64" - else - mingw="mingw32" - fi - cmake_command="cmake -G\"MSYS Makefiles\" -DCMAKE_INSTALL_PREFIX=/${mingw} -DBUILD_TESTING=1 .." - make_command="make" - else - cmake_command="cmake -DBUILD_TESTING=1 .." - fi -fi - -if [ "${make_command}" == "" ]; then - make_command="make -j 2" -fi - -cd libclangmm || echo "Can't cd into libclangmm" -mkdir -p build && cd build || echo "Error making build directory" -sh -c "${cmake_command}" || echo "Cmake configuration failed" -exec sh -c "${make_command}" diff --git a/ci/execute.sh b/ci/execute.sh deleted file mode 100755 index 7cb3d31..0000000 --- a/ci/execute.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash - -function linux () { - cd ci || exit - if [ "${script}" == "clean" ]; then - sudo rm ../build -rf - return 0 - fi - sudo docker run -it \ - -e "CXX=$CXX" \ - -e "CC=$CC" \ - -e "make_command=$make_command" \ - -e "cmake_command=$cmake_command" \ - -e "distribution=$distribution" \ - -v "$PWD/../:/libclangmm" \ - --entrypoint="/libclangmm/ci/${script}.sh" \ - "cppit/jucipp:$distribution" -} - -function windows () { - export PATH="/mingw64/bin:/usr/local/bin:/usr/bin:/bin:/c/WINDOWS/system32:/c/WINDOWS:/c/WINDOWS/System32/Wbem:/c/WINDOWS/System32/WindowsPowerShell/v1.0:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl" - bf=$(cygpath ${APPVEYOR_BUILD_FOLDER}) - cd "$bf" || (echo "Error changing directory"; return 1) - if [ "${script}" == "clean" ]; then - sudo rm "./build" -rf - return 0 - fi - sh -c "${bf}/ci/${script}.sh" -} - - -if [ "$TRAVIS_OS_NAME" == "" ]; then - TRAVIS_OS_NAME=windows -fi - -$TRAVIS_OS_NAME diff --git a/ci/static_analysis.sh b/ci/static_analysis.sh deleted file mode 100755 index 04b440b..0000000 --- a/ci/static_analysis.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -if [ "${cmake_command}" == "" ]; then - cmake_command="scan-build cmake .." -fi - -if [ "${make_command}" == "" ]; then - make_command="scan-build --status-bugs make -j 2" -fi - -cd libclangmm || echo "Can't cd into libclangmm" -mkdir -p build && cd build || echo "Error making build directory" -sh -c "${cmake_command}" || echo "Cmake configuration failed" -exec sh -c "${make_command}" diff --git a/ci/update_ci.sh b/ci/update_ci.sh deleted file mode 100755 index 93ebb0e..0000000 --- a/ci/update_ci.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash - -function linux () { - sudo apt-get update - sudo apt-get purge lxc-docker - sudo apt-get install --yes --force-yes -o Dpkg::Options::="--force-confnew" linux-image-extra-$(uname -r) docker-engine - sudo service docker stop || exit - sudo rm -rf /var/lib/docker || exit - sudo service docker start || exit -} - -function brew_install() { - (brew outdated "$1" || brew install $1) || (echo "Error installing $1"; return 1) -} - -function osx () { - brew update || return 1 - brew uninstall llvm --force || return 1 - brew upgrade --all || return 1 - brew update || return 1 - brew upgrade --all || return 1 - brew install --with-clang llvm - brew_install "boost" || return 1 - brew_install "aspell" || return 1 - brew_install "clang-format" || return 1 - brew_install "pkg-config" || return 1 - brew_install "gtksourceviewmm3" || return 1 -} - -function windows () { - arch=x86_64 - if [ "$PLATFORM" == "x86" ]; then - arch=i686 - fi - sh -c "pacman -S --noconfirm git mingw-w64-${arch}-cmake make mingw-w64-${arch}-toolchain mingw-w64-${arch}-clang mingw-w64-${arch}-gtkmm3 mingw-w64-${arch}-gtksourceviewmm3 mingw-w64-${arch}-boost mingw-w64-${arch}-aspell mingw-w64-${arch}-aspell-en mingw-w64-${arch}-libgit2" -} - -if [ "$TRAVIS_OS_NAME" == "" ]; then - TRAVIS_OS_NAME=windows -fi - -$TRAVIS_OS_NAME \ No newline at end of file