1name: run units target on GNU/Linux 2 3on: 4 push: 5 branches: [ master ] 6 pull_request: 7 branches: [ master ] 8 9jobs: 10 testing: 11 12 strategy: 13 matrix: 14 # os: [ubuntu-18.04, ubuntu-20.04] 15 os: [ubuntu-18.04, ubuntu-20.04] 16 compiler: [gcc, clang] 17 18 runs-on: ${{ matrix.os }} 19 20 env: 21 CC: ${{ matrix.compiler }} 22 BUILDDIR: ${{ matrix.os }}-${{ matrix.compiler }} 23 24 # Our sandbox doesn't work with gcov. 25 # Following cases target ctags without gcov. 26 SANDBOX_CASES: sandbox,sandbox-crash,sandbox-default-req,sandbox-unknown-submode 27 DEBIAN_FRONTEND: noninteractive 28 29 steps: 30 - uses: actions/checkout@v2 31 with: 32 fetch-depth: 0 33 - name: update package information 34 run: sudo apt-get -y -o APT::Immediate-Configure=false update 35 - name: install tools and libraries 36 run: sudo apt-get -y -o APT::Immediate-Configure=false install valgrind pkg-config automake bash libjansson-dev libyaml-dev libseccomp-dev libxml2-dev gdb python3-docutils libpcre2-dev 37 - name: install rubygems and lcov 38 if: matrix.compiler == 'gcc' && matrix.os == 'ubuntu-20.04' 39 #run: sudo apt-get -y -o APT::Immediate-Configure=false install rubygems lcov 40 run: sudo apt-get -y -o APT::Immediate-Configure=false install lcov 41 # - name: install lcoveralls 42 # if: matrix.compiler == 'gcc' && matrix.os == 'ubuntu-20.04' 43 # run: sudo gem install lcoveralls 44 - name: autogen.sh 45 run: ./autogen.sh 46 - name: report the version of cc 47 run: ${{ matrix.compiler }} --version 48 - name: report the version of make 49 run: make --version 50 - name: configure 51 run: | 52 mkdir -p ${{ matrix.os }}-"$CC" 53 ( 54 cd $BUILDDIR 55 if [ ${{ matrix.compiler }} = 'gcc' -a ${{ matrix.os }} = 'ubuntu-20.04' ]; then 56 extra_args=--enable-coverage-gcov 57 fi 58 ../configure --enable-debugging --enable-iconv ${extra_args} 59 ) 60 - name: make 61 run: make -C $BUILDDIR -j2 62 - name: report features 63 run: | 64 ( 65 cd $BUILDDIR 66 ./ctags --list-features 67 ) 68 - name: make check 69 run: make -C $BUILDDIR check 70 - name: make roundtrip 71 run: make -C $BUILDDIR roundtrip 72 - name: make dist 73 run: make -C $BUILDDIR dist 74 - name: make for testing ctags in sandbox 75 run: | 76 ( 77 cd $BUILDDIR 78 tar zxf universal-ctags*tar.gz 79 ( 80 cd universal-ctags*[0-9] 81 mkdir -p ${BUILDDIR} 82 ( 83 cd ${BUILDDIR} 84 ../configure --enable-debugging --enable-iconv 85 ) 86 make -C ${BUILDDIR} -j2 87 ) 88 ) 89 - name: make tmain in sandbox 90 run: | 91 ( 92 cd $BUILDDIR/universal-ctags*[0-9] 93 make -C ${BUILDDIR} tmain UNITS=${SANDBOX_CASES} 94 make -C ${BUILDDIR} clean 95 ) 96 - name: send coverage info 97 if: matrix.compiler == 'gcc' && matrix.os == 'ubuntu-20.04' 98 run: | 99 # for f in /var/lib/gems/*/gems/lcoveralls-*/lib/lcoveralls/color_formatter.rb; do 100 # sudo sed -i -e 's/severity.capitalize!/severity = severity.capitalize/' $f 101 # done 102 # for f in /var/lib/gems/*/gems/lcoveralls-*/lib/lcoveralls/runner.rb; do 103 # sudo sed -i -e 's/\(.*format.*f\)\(%\)\('"'"'.*$\)/\1%%\3/' $f 104 # done 105 106 (cd ${BUILDDIR}; lcov -c -b . -d . -o coverage.info) 107 108 # Upload to coveralls. 109 # lcoveralls --root . --retry-count 5 ${BUILDDIR}/coverage.info 110 111 # Upload to codecov. 112 bash <(curl -s https://codecov.io/bash) -f ${BUILDDIR}/coverage.info -Z -X gcov -X coveragepy -X search -X xcode -X gcovout -n travis-${{ matrix.os }} 113