"Fossies" - the Fresh Open Source Software Archive

Member "uriparser-0.9.5/.github/workflows/build-and-test.yml" (18 Mar 2021, 3378 Bytes) of package /linux/www/uriparser-0.9.5.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Ansible YAML source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 # Copyright (C) 2021 Sebastian Pipping <sebastian@pipping.org>
    2 # Licensed under the MIT license
    3 
    4 name: Build and test
    5 
    6 on:
    7   pull_request:
    8   push:
    9   schedule:
   10     - cron: '0 4 * * 5'  # Every Friday at 4am
   11 
   12 jobs:
   13   build_and_test:
   14     name: Build and test
   15     runs-on: ubuntu-latest
   16     steps:
   17       - uses: actions/checkout@v2.3.4
   18 
   19       - name: Add Clang/LLVM repositories
   20         run: |-
   21           wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
   22           sudo add-apt-repository 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-11 main'
   23 
   24       - name: Install build dependencies
   25         run: |-
   26           sudo apt-get install --yes --no-install-recommends -V \
   27               clang-11 \
   28               cmake \
   29               doxygen \
   30               graphviz \
   31               llvm-11 \
   32               lzip \
   33               qhelpgenerator-qt5 \
   34               qtchooser
   35 
   36       - name: Build, test and install
   37         run: |-
   38           sed 's,:,\n,g' <<<"${PATH}"
   39           clang --version
   40 
   41           GTEST_VERSION=1.8.1
   42           GTEST_PREFIX=~/.local/
   43 
   44           wget https://github.com/google/googletest/archive/release-${GTEST_VERSION}.tar.gz
   45           tar xf release-${GTEST_VERSION}.tar.gz
   46           (
   47             cd googletest-release-${GTEST_VERSION}/
   48             cmake \
   49                 -DBUILD_SHARED_LIBS=ON \
   50                 -DCVF_VERSION=${GTEST_VERSION} \
   51                 -DCMAKE_INSTALL_PREFIX:PATH=${GTEST_PREFIX} \
   52                 .
   53             make
   54             make install
   55           )
   56 
   57           mkdir build
   58           pushd build
   59             compile_flags=(
   60               -pipe
   61 
   62               -O1
   63               -g
   64               -fsanitize=address,undefined,leak
   65               -fno-sanitize-recover=all
   66               -fno-omit-frame-pointer
   67 
   68               -Wall
   69               -Wextra
   70               -pedantic
   71             )
   72             CFLAGS="${compile_flags[*]} -std=c89"
   73             CXXFLAGS="${compile_flags[*]} -std=c++98"
   74             LDFLAGS='-g -fsanitize=address'
   75             cmake_args=(
   76               -DCMAKE_INSTALL_PREFIX:PATH=${GTEST_PREFIX}
   77 
   78               -Wdev
   79               -Werror=dev
   80               -Wdeprecated
   81               -Werror=deprecated
   82 
   83               -DCMAKE_C_COMPILER=clang-11
   84               -DCMAKE_CXX_COMPILER=clang++-11
   85               -DCMAKE_C_FLAGS="${CFLAGS}"
   86               -DCMAKE_CXX_FLAGS="${CXXFLAGS}"
   87               -DCMAKE_EXE_LINKER_FLAGS="${LDFLAGS}"
   88               -DCMAKE_MODULE_LINKER_FLAGS="${LDFLAGS}"
   89               -DCMAKE_SHARED_LINKER_FLAGS="${LDFLAGS}"
   90 
   91               -DURIPARSER_WARNINGS_AS_ERRORS=ON
   92             )
   93             cmake "${cmake_args[@]}" -DCMAKE_INSTALL_INCLUDEDIR=include123 ..
   94 
   95             make VERBOSE=1 all
   96 
   97             make VERBOSE=1 test ARGS=--verbose
   98             cat Testing/Temporary/LastTest.log
   99 
  100             make install
  101             make DESTDIR="${PWD}"/ROOT/ install
  102             find ROOT | sort
  103 
  104             ./doc/release.sh
  105           popd
  106           pushd cmake/test_find_package
  107             cmake "${cmake_args[@]}" .
  108             make VERBOSE=1
  109             ./hello
  110           popd
  111 
  112           git fetch --tags --unshallow origin  # for "git describe" in make-distcheck.sh
  113 
  114           ./make-distcheck.sh -DCMAKE_INSTALL_PREFIX:PATH=${GTEST_PREFIX}  # without AddressSanitizer
  115 
  116           ! git status | fgrep -A100 'Untracked files:'  # works best at the very end