diff options
author | Jörg Frings-Fürst <debian@jff-webhsoting.net> | 2021-04-26 20:34:38 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhsoting.net> | 2021-04-26 20:34:38 +0200 |
commit | 57be5b9e80075d32249105407879dd1d2bac460b (patch) | |
tree | f161e88bc941e1c861b1dd1a34a332f8cdc53f7a /.github | |
parent | cf9293531802f491b4b145d98a4900e72a7d105b (diff) | |
parent | 7d4216c07bd36b69ae7f5eabb7b4d6b59166a508 (diff) |
Merge branch 'feature/upstream' into develop
Diffstat (limited to '.github')
-rw-r--r-- | .github/dependabot.yml | 15 | ||||
-rw-r--r-- | .github/workflows/build-and-test.yml | 116 |
2 files changed, 131 insertions, 0 deletions
diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..b149019 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,15 @@ +# Copyright (C) 2021 Sebastian Pipping <sebastian@pipping.org> +# Licensed under the MIT license + +version: 2 +updates: + + - package-ecosystem: "github-actions" + commit-message: + include: "scope" + prefix: "Actions" + directory: "/" + labels: + - "enhancement" + schedule: + interval: "weekly" diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml new file mode 100644 index 0000000..ba5cb84 --- /dev/null +++ b/.github/workflows/build-and-test.yml @@ -0,0 +1,116 @@ +# Copyright (C) 2021 Sebastian Pipping <sebastian@pipping.org> +# Licensed under the MIT license + +name: Build and test + +on: + pull_request: + push: + schedule: + - cron: '0 4 * * 5' # Every Friday at 4am + +jobs: + build_and_test: + name: Build and test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2.3.4 + + - name: Add Clang/LLVM repositories + run: |- + wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - + sudo add-apt-repository 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-11 main' + + - name: Install build dependencies + run: |- + sudo apt-get install --yes --no-install-recommends -V \ + clang-11 \ + cmake \ + doxygen \ + graphviz \ + llvm-11 \ + lzip \ + qhelpgenerator-qt5 \ + qtchooser + + - name: Build, test and install + run: |- + sed 's,:,\n,g' <<<"${PATH}" + clang --version + + GTEST_VERSION=1.8.1 + GTEST_PREFIX=~/.local/ + + wget https://github.com/google/googletest/archive/release-${GTEST_VERSION}.tar.gz + tar xf release-${GTEST_VERSION}.tar.gz + ( + cd googletest-release-${GTEST_VERSION}/ + cmake \ + -DBUILD_SHARED_LIBS=ON \ + -DCVF_VERSION=${GTEST_VERSION} \ + -DCMAKE_INSTALL_PREFIX:PATH=${GTEST_PREFIX} \ + . + make + make install + ) + + mkdir build + pushd build + compile_flags=( + -pipe + + -O1 + -g + -fsanitize=address,undefined,leak + -fno-sanitize-recover=all + -fno-omit-frame-pointer + + -Wall + -Wextra + -pedantic + ) + CFLAGS="${compile_flags[*]} -std=c89" + CXXFLAGS="${compile_flags[*]} -std=c++98" + LDFLAGS='-g -fsanitize=address' + cmake_args=( + -DCMAKE_INSTALL_PREFIX:PATH=${GTEST_PREFIX} + + -Wdev + -Werror=dev + -Wdeprecated + -Werror=deprecated + + -DCMAKE_C_COMPILER=clang-11 + -DCMAKE_CXX_COMPILER=clang++-11 + -DCMAKE_C_FLAGS="${CFLAGS}" + -DCMAKE_CXX_FLAGS="${CXXFLAGS}" + -DCMAKE_EXE_LINKER_FLAGS="${LDFLAGS}" + -DCMAKE_MODULE_LINKER_FLAGS="${LDFLAGS}" + -DCMAKE_SHARED_LINKER_FLAGS="${LDFLAGS}" + + -DURIPARSER_WARNINGS_AS_ERRORS=ON + ) + cmake "${cmake_args[@]}" -DCMAKE_INSTALL_INCLUDEDIR=include123 .. + + make VERBOSE=1 all + + make VERBOSE=1 test ARGS=--verbose + cat Testing/Temporary/LastTest.log + + make install + make DESTDIR="${PWD}"/ROOT/ install + find ROOT | sort + + ./doc/release.sh + popd + pushd cmake/test_find_package + cmake "${cmake_args[@]}" . + make VERBOSE=1 + ./hello + popd + + git fetch --tags --unshallow origin # for "git describe" in make-distcheck.sh + + ./make-distcheck.sh -DCMAKE_INSTALL_PREFIX:PATH=${GTEST_PREFIX} # without AddressSanitizer + + ! git status | fgrep -A100 'Untracked files:' # works best at the very end |