diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2020-11-27 22:43:00 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-27 22:43:00 +0100 |
| commit | 9e8a790fc424e8026d3e3ac65b7a01cd10a49674 (patch) | |
| tree | 8aecc14e808619cf6d3718e7741a4c486720ff30 | |
| parent | c85a44110d19080215183e0e07d81408d68cdbec (diff) | |
| parent | 90737bcf698c98b2a8600e4c79fb15a675489929 (diff) | |
| download | PROJ-9e8a790fc424e8026d3e3ac65b7a01cd10a49674.tar.gz PROJ-9e8a790fc424e8026d3e3ac65b7a01cd10a49674.zip | |
Merge pull request #2460 from rouault/gha_linux_gcc4.8
Move linux_gcc 4.8 job to github action, and on Travis-CI only keep the doc publishing
| -rw-r--r-- | .github/workflows/linux_gcc_4_8.yml | 29 | ||||
| -rwxr-xr-x | .github/workflows/linux_gcc_4_8/start.sh | 55 | ||||
| -rw-r--r-- | .travis.yml | 10 | ||||
| -rwxr-xr-x | travis/after_success.sh | 7 | ||||
| -rwxr-xr-x | travis/install.sh | 8 | ||||
| -rwxr-xr-x | travis/linux_gcc/before_install.sh | 22 | ||||
| -rwxr-xr-x | travis/linux_gcc/install.sh | 8 | ||||
| -rwxr-xr-x | travis/publish_doc/after_success.sh (renamed from travis/linux_gcc/after_success.sh) | 0 | ||||
| -rwxr-xr-x | travis/publish_doc/before_install.sh | 7 | ||||
| -rwxr-xr-x | travis/publish_doc/install.sh | 3 |
10 files changed, 96 insertions, 53 deletions
diff --git a/.github/workflows/linux_gcc_4_8.yml b/.github/workflows/linux_gcc_4_8.yml new file mode 100644 index 00000000..1f37785c --- /dev/null +++ b/.github/workflows/linux_gcc_4_8.yml @@ -0,0 +1,29 @@ +name: Linux GCC 4.8 + +on: [push, pull_request] + +jobs: + + linux_gcc_4_8: + runs-on: ubuntu-latest + if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')" + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Cache + uses: actions/cache@v2 + id: cache + with: + path: | + ${{ github.workspace }}/ccache.tar.gz + key: ${{ runner.os }}-cache-gcc-4-8-${{ github.run_id }} + restore-keys: ${{ runner.os }}-cache-gcc-4-8- + + - name: Run + run: docker run -e CI -e WORK_DIR="$PWD" -v $PWD:$PWD ubuntu:16.04 $PWD/.github/workflows/linux_gcc_4_8/start.sh + + - name: Coveralls + uses: coverallsapp/github-action@v1.1.2 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/linux_gcc_4_8/start.sh b/.github/workflows/linux_gcc_4_8/start.sh new file mode 100755 index 00000000..2493ea1a --- /dev/null +++ b/.github/workflows/linux_gcc_4_8/start.sh @@ -0,0 +1,55 @@ +#!/bin/bash + +set -e + +export TRAVIS_OS_NAME=linux +export BUILD_NAME=linux_gcc +export TRAVIS_BUILD_DIR="$WORK_DIR" + +apt update -y + +DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + autoconf automake libtool g++-4.8 sqlite3 \ + python3-pip python3-setuptools \ + make cmake ccache pkg-config tar zip \ + libsqlite3-dev libtiff-dev libcurl4-openssl-dev \ + jq lcov + +pip3 install --user --upgrade pip +echo `pip3 --version` +pip3 config --user set global.progress_bar off +pip3 install --user jsonschema +pip3 install --user cmake==3.9.6 + +export PATH=$HOME/.local/bin:$PATH + +export CC="ccache gcc-4.8" +export CXX="ccache g++-4.8" + +NPROC=$(nproc) +echo "NPROC=${NPROC}" +export MAKEFLAGS="-j ${NPROC}" + +cd "$WORK_DIR" + +if test -f "$WORK_DIR/ccache.tar.gz"; then + echo "Restoring ccache..." + (cd $HOME && tar xzf "$WORK_DIR/ccache.tar.gz") +fi + +export CCACHE_CPP2=yes +export PROJ_DB_CACHE_DIR="$HOME/.ccache" + +ccache -M 500M +ccache -s + +CFLAGS="-Werror $CFLAGS" CXXFLAGS="-Werror $CXXFLAGS" ./travis/install.sh + +ccache -s + +echo "Saving ccache..." +rm -f "$WORK_DIR/ccache.tar.gz" +(cd $HOME && tar czf "$WORK_DIR/ccache.tar.gz" .ccache) + +mkdir -p coverage +lcov --no-external --capture --directory src --output-file coverage/lcov.info diff --git a/.travis.yml b/.travis.yml index 07138324..bf53a57c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,14 +20,8 @@ matrix: services: - docker env: - - BUILD_NAME=linux_gcc - - DETAILS="linux, gcc-4.8" - - CC=gcc-4.8 - - CXX=g++-4.8 - addons: - apt: - packages: - - g++-4.8 + - BUILD_NAME=publish_doc + - DETAILS="publish_doc" - os: linux dist: bionic diff --git a/travis/after_success.sh b/travis/after_success.sh index 095bafbd..abe11d91 100755 --- a/travis/after_success.sh +++ b/travis/after_success.sh @@ -2,13 +2,6 @@ set -e -if [ "$BUILD_NAME" != "linux_clang" ]; then - # coveralls falsely reports .c-files in the build directories as having 100% coverage so we exclude them - coveralls --build-root src --extension .c --extension .cpp \ - --exclude build_autoconf --exclude build_cmake --exclude test --exclude examples \ - --exclude include/proj/internal/nlohmann -fi - echo "$TRAVIS_SECURE_ENV_VARS" ./travis/build_docs.sh # Only build and publish docs when changes are made on most recent maintenance branch diff --git a/travis/install.sh b/travis/install.sh index 84e7de25..6426e1b3 100755 --- a/travis/install.sh +++ b/travis/install.sh @@ -141,12 +141,4 @@ if [ "$BUILD_NAME" != "linux_gcc8" -a "$BUILD_NAME" != "linux_gcc_32bit" ]; then fi make >/dev/null make check - - if [ "$BUILD_NAME" != "linux_clang" ]; then - mv src/.libs/*.gc* src - mv src/conversions/.libs/*.gc* src/conversions - mv src/iso19111/.libs/*.gc* src/iso19111 - mv src/projections/.libs/*.gc* src/projections - mv src/transformations/.libs/*.gc* src/transformations - fi fi diff --git a/travis/linux_gcc/before_install.sh b/travis/linux_gcc/before_install.sh deleted file mode 100755 index 3068794d..00000000 --- a/travis/linux_gcc/before_install.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash - -set -e - -./travis/before_install_apt.sh -./travis/before_install_pip.sh - -sudo apt-get install -qq \ - lcov \ - doxygen graphviz \ - sqlite3 libsqlite3-dev \ - libtiff-dev libcurl4-openssl-dev \ - cppcheck - -scripts/cppcheck.sh -scripts/doxygen.sh - -pip3 install --user sphinxcontrib-bibtex -pip3 install --user cpp-coveralls -pip3 install --user cmake==3.9.6 - -./travis/docker.sh diff --git a/travis/linux_gcc/install.sh b/travis/linux_gcc/install.sh deleted file mode 100755 index 5dd97f07..00000000 --- a/travis/linux_gcc/install.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -set -e - -export CCACHE_CPP2=yes -export PROJ_DB_CACHE_DIR="$HOME/.ccache" - -CC="ccache $CC" CXX="ccache $CXX" CFLAGS="-std=c99 -Werror" CXXFLAGS="-Werror" ./travis/install.sh diff --git a/travis/linux_gcc/after_success.sh b/travis/publish_doc/after_success.sh index 6602f6c3..6602f6c3 100755 --- a/travis/linux_gcc/after_success.sh +++ b/travis/publish_doc/after_success.sh diff --git a/travis/publish_doc/before_install.sh b/travis/publish_doc/before_install.sh new file mode 100755 index 00000000..bbb7b35b --- /dev/null +++ b/travis/publish_doc/before_install.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +set -e + +./travis/before_install_apt.sh +./travis/before_install_pip.sh +./travis/docker.sh diff --git a/travis/publish_doc/install.sh b/travis/publish_doc/install.sh new file mode 100755 index 00000000..d9628ae7 --- /dev/null +++ b/travis/publish_doc/install.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +set -e |
