aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-06-07 13:31:28 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-06-07 13:31:28 +0200
commitf4d654e6b5e993c15a3545c8d4e8d8ef3bb12b2b (patch)
tree023bddfb96e7d9a338c94be7040628f225bf7ccd
parent0e2b7971343845248353f6d8503e28506e9536ea (diff)
parent69864ad11cf05198a673e4507d6006b21a243a31 (diff)
downloadnx-libs-f4d654e6b5e993c15a3545c8d4e8d8ef3bb12b2b.tar.gz
nx-libs-f4d654e6b5e993c15a3545c8d4e8d8ef3bb12b2b.tar.bz2
nx-libs-f4d654e6b5e993c15a3545c8d4e8d8ef3bb12b2b.zip
Merge branch 'test-github-actions' into 3.6.x
Attributes GH PR #974: https://github.com/ArcticaProject/nx-libs/pull/974
-rw-r--r--.github/workflows/linters.yml126
-rw-r--r--.github/workflows/nx-libs-archs.yml81
-rw-r--r--.github/workflows/nx-libs.yml186
-rw-r--r--.pvs-studio.sh37
-rw-r--r--.travis.yml172
-rw-r--r--README.md2
-rwxr-xr-xrun-static-analysis.sh14
7 files changed, 394 insertions, 224 deletions
diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml
new file mode 100644
index 000000000..f8a670610
--- /dev/null
+++ b/.github/workflows/linters.yml
@@ -0,0 +1,126 @@
+name: linters
+
+on:
+ push:
+ branches: [ 3.6.x ]
+ pull_request:
+ branches: [ 3.6.x ]
+
+jobs:
+ # see https://github.com/koalaman/shellcheck
+ shellcheck:
+ runs-on: ubuntu-20.04
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v2
+
+ - name: Install linters on ubuntu
+ run: |
+ sudo apt-get update -q -y
+ sudo apt-get install shellcheck
+
+ - name: run Shellcheck
+ run: |
+ shellcheck --version
+ find . -name "*.sh" | xargs shellcheck -e SC1004,SC2010,SC2035,SC2086
+
+ # see https://pylint.org/
+ pylint:
+ runs-on: ubuntu-20.04
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v2
+
+ - name: Install linters on ubuntu
+ run: |
+ sudo apt-get update -q -y
+ sudo apt-get install pylint
+ # dependencies
+ sudo apt-get install --reinstall python-gi
+ sudo apt-get install python-dbus python-gobject
+
+ - name: run Pylint
+ run: |
+ pylint --version
+ cd nxdialog/; find . -name "nxdialog" -type f | xargs pylint --exit-zero
+
+ # see https://github.com/danmar/cppcheck
+ cppcheck:
+ runs-on: ubuntu-20.04
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v2
+
+ - name: Install linters on ubuntu
+ run: |
+ sudo apt-get update -q -y
+ sudo apt-get install cppcheck
+
+ - name: run cppcheck
+ run: |
+ # cppcheck
+ if ! [ -x "$(command -v cppcheck)" ]; then
+ echo 'Error: cppcheck is not installed.' >&2
+ exit 1
+ fi
+ CPPCHECK_OPTS='--error-exitcode=0 --force --quiet --suppressions-list=./static-analysis-suppressions'
+ # we exclude some external projects
+ CPPCHECK_EXCLUDES='-i ./nx-X11/extras/ -i nx-X11/programs/Xserver/GL/mesa* -i ./.pc -i ./nx-X11/.build-exports -i ./nx-X11/exports -i ./doc'
+ echo "$(cppcheck --version):";
+ cppcheck $CPPCHECK_OPTS $CPPCHECK_EXCLUDES .;
+
+ # see https://www.viva64.com/en/pvs-studio/
+ pvs:
+ environment: pvs
+ runs-on: ubuntu-20.04
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v2
+
+ - name: Install linters on ubuntu
+ env:
+ DEBIAN_FRONTEND: noninteractive
+ run: |
+ sudo apt-get update -qq -y
+ # compiler
+ sudo apt-get install -qq -y gcc g++
+ # basic packages
+ sudo apt-get install -qq -y \
+ autoconf libtool make pkg-config
+ # imake deps
+ sudo apt-get install -qq -y \
+ libxkbfile-dev xfonts-utils xutils-dev
+ # X11 libraries deps
+ sudo apt-get install -qq -y \
+ libpixman-1-dev libjpeg-dev libxcomposite-dev libxdamage-dev \
+ libxml2-dev libxfont-dev libxinerama-dev libxpm-dev libxrandr-dev \
+ libxtst-dev x11proto-fonts-dev
+ # soft requirements
+ sudo apt-get install -qq -y \
+ quilt x11-xkb-utils
+ # PVS
+ sudo wget -q -O - https://files.viva64.com/etc/pubkey.txt | sudo apt-key add -
+ sudo wget -O /etc/apt/sources.list.d/viva64.list https://files.viva64.com/etc/viva64.list
+ sudo apt-get update -qq
+ sudo apt-get install -qq pvs-studio
+
+ - name: Run PVS-Studio Analyzer
+ shell: bash
+ env:
+ PVS_USERNAME: ${{ secrets.PVS_USERNAME }}
+ PVS_KEY: ${{ secrets.PVS_KEY }}
+ run: |
+ # check environment variables
+ if [[ -z "${PVS_USERNAME}" ]]; then
+ echo '"PVS_USERNAME" environment variable not set'
+ exit 0
+ elif [[ -z "${PVS_KEY}" ]]; then
+ echo '"PVS_KEY" environment variable not set'
+ exit 0
+ else
+ pvs-studio-analyzer credentials -o "PVS-Studio.lic" "${PVS_USERNAME}" "${PVS_KEY}"
+ pvs-studio-analyzer trace -- make
+ pvs-studio-analyzer analyze --quiet --lic-file "PVS-Studio.lic" --output-file "PVS-Studio-${CC}.log"
+ plog-converter -a "GA:1,2" -t tasklist -o "PVS-Studio-${CC}.tasks" "PVS-Studio-${CC}.log"
+ cat "PVS-Studio-${CC}.tasks"
+ fi
diff --git a/.github/workflows/nx-libs-archs.yml b/.github/workflows/nx-libs-archs.yml
new file mode 100644
index 000000000..b2e343acd
--- /dev/null
+++ b/.github/workflows/nx-libs-archs.yml
@@ -0,0 +1,81 @@
+name: nx-libs CI diff archs
+
+on:
+ push:
+ branches: [ 3.6.x ]
+ pull_request:
+ branches: [ 3.6.x ]
+
+jobs:
+ build:
+ runs-on: ubuntu-20.04
+ name: Build on ${{ matrix.distro }} ${{ matrix.arch }} with gcc
+
+ # Run steps on a matrix of 4 arch/distro combinations
+ strategy:
+ fail-fast: false
+ matrix:
+ include:
+ - arch: aarch64
+ distro: ubuntu20.04
+ - arch: ppc64le
+ distro: ubuntu20.04
+ - arch: s390x
+ distro: ubuntu20.04
+ - arch: armv7
+ distro: ubuntu20.04
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v2
+ - uses: uraimo/run-on-arch-action@v2.0.8
+ name: Build artifact
+ id: build
+ with:
+ arch: ${{ matrix.arch }}
+ distro: ${{ matrix.distro }}
+
+ # Not required, but speeds up builds
+ githubToken: ${{ github.token }}
+
+ # Pass some environment variables to the container
+ env: |
+ CC: gcc
+ CXX: g++
+ DEBIAN_FRONTEND: noninteractive
+
+ # The shell to run commands with in the container
+ shell: /bin/sh
+
+ # Install some dependencies in the container. This speeds up builds if
+ # you are also using githubToken. Any dependencies installed here will
+ # be part of the container image that gets cached, so subsequent
+ # builds don't have to re-install them. The image layer is cached
+ # publicly in your project's package repository, so it is vital that
+ # no secrets are present in the container state or logs.
+ install: |
+ case "${{ matrix.distro }}" in
+ ubuntu*)
+ cat /etc/debian_version
+ apt-get update -q -y
+ apt-get install -q -y gcc g++
+ gcc --version
+ # basic packages
+ apt-get install -q -y \
+ autoconf libtool make pkg-config
+ # imake deps
+ apt-get install -q -y \
+ libxkbfile-dev xfonts-utils xutils-dev
+ # X11 libraries deps
+ apt-get install -q -y \
+ libpixman-1-dev libjpeg-dev libxcomposite-dev libxdamage-dev \
+ libxml2-dev libxfont-dev libxinerama-dev libxpm-dev libxrandr-dev \
+ libxtst-dev x11proto-fonts-dev
+ # soft requirements
+ apt-get install -q -y \
+ quilt x11-xkb-utils
+ ;;
+ esac
+
+ run: |
+ make
diff --git a/.github/workflows/nx-libs.yml b/.github/workflows/nx-libs.yml
new file mode 100644
index 000000000..fe5523166
--- /dev/null
+++ b/.github/workflows/nx-libs.yml
@@ -0,0 +1,186 @@
+name: nx-libs CI
+
+on:
+ push:
+ branches: [ 3.6.x ]
+ pull_request:
+ branches: [ 3.6.x ]
+
+jobs:
+ build:
+ name: Build on ${{ matrix.cfg.container }} - ${{ matrix.cfg.cc-version }}
+ runs-on: ubuntu-20.04
+ container: ${{ matrix.cfg.container }}
+ strategy:
+ fail-fast: false
+ matrix:
+ cfg:
+ - { container: 'ubuntu:16.04', cc-version: gcc }
+ - { container: 'ubuntu:16.04', cc-version: clang }
+ - { container: 'ubuntu:20.04', cc-version: gcc }
+ - { container: 'ubuntu:20.04', cc-version: clang }
+ - { container: 'debian:stable', cc-version: gcc }
+ - { container: 'debian:stable', cc-version: clang }
+ - { container: 'debian:sid', cc-version: gcc }
+ - { container: 'debian:sid', cc-version: clang }
+ - { container: 'centos:7', cc-version: gcc }
+ - { container: 'centos:7', cc-version: clang }
+ - { container: 'centos:8', cc-version: gcc }
+ - { container: 'centos:8', cc-version: clang }
+ - { container: 'fedora:latest', cc-version: gcc }
+ - { container: 'fedora:latest', cc-version: clang }
+
+ steps:
+ - name: Install compiler ${{ matrix.cfg.cc-version }}
+ shell: sh
+ env:
+ DEBIAN_FRONTEND: noninteractive
+ run: |
+ case "${{ matrix.cfg.container }}" in
+ ubuntu*|debian*)
+ cat /etc/debian_version
+ apt-get update -q -y
+ apt-get install -q -y ${{ matrix.cfg.cc-version }}
+ ${{ matrix.cfg.cc-version }} --version
+ case "${{ matrix.cfg.cc-version }}" in
+ gcc)
+ apt-get install -q -y g++
+ ;;
+ clang)
+ apt-get install -q -y build-essential
+ esac
+ ;;
+ fedora*)
+ cat /etc/fedora-release
+ dnf -y update
+ dnf -y install ${{ matrix.cfg.cc-version }}
+ ${{ matrix.cfg.cc-version }} --version
+ ;;
+ centos:8)
+ cat /etc/centos-release
+ rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
+ dnf -y update
+ dnf -y install ${{ matrix.cfg.cc-version }}
+ ${{ matrix.cfg.cc-version }} --version
+ ;;
+ centos:7)
+ cat /etc/centos-release
+ rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
+ yum -y update
+ yum -y install ${{ matrix.cfg.cc-version }}
+ ${{ matrix.cfg.cc-version }} --version
+ ;;
+ esac
+
+ - name: Install nx-libs dependencies ${{ matrix.cfg.cc-version }}
+ shell: sh
+ env:
+ DEBIAN_FRONTEND: noninteractive
+ run: |
+ case "${{ matrix.cfg.container }}" in
+ ubuntu*|debian*)
+ # basic packages
+ apt-get install -q -y \
+ autoconf libtool make pkg-config
+ # imake deps
+ apt-get install -q -y \
+ libxkbfile-dev xfonts-utils xutils-dev
+ # X11 libraries deps
+ apt-get install -q -y \
+ libpixman-1-dev libjpeg-dev libxcomposite-dev libxdamage-dev \
+ libxml2-dev libxfont-dev libxinerama-dev libxpm-dev libxrandr-dev \
+ libxtst-dev x11proto-fonts-dev
+ # soft requirements
+ apt-get install -q -y \
+ quilt x11-xkb-utils
+ ;;
+ fedora*)
+ # basic packages
+ dnf -y install \
+ autoconf automake gcc-c++ libtool make imake pkgconfig which
+ # imake deps
+ dnf -y install \
+ xorg-x11-proto-devel zlib-devel
+ # X11 libraries deps
+ dnf -y install \
+ libjpeg-devel expat-devel libpng-devel libxml2-devel pixman-devel \
+ libX11-devel libXext-devel libXpm-devel libXfont2-devel \
+ libXdmcp-devel libXdamage-devel libXcomposite-devel \
+ libXrandr-devel libXfixes-devel libXtst-devel libXinerama-devel \
+ xorg-x11-font-utils libtirpc-devel xkeyboard-config
+ # soft requirements
+ dnf -y install \
+ quilt xorg-x11-xkb-utils-devel
+ ;;
+ centos:8)
+ # Enable powertools repository for imake
+ dnf -y install dnf-plugins-core epel-release
+ rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8
+ dnf config-manager --set-enabled powertools
+ # basic packages
+ dnf -y install \
+ autoconf automake gcc-c++ libtool make imake pkgconfig which
+ # imake deps
+ dnf -y install \
+ xorg-x11-proto-devel zlib-devel
+ # X11 libraries deps
+ dnf -y install \
+ libjpeg-devel expat-devel libpng-devel libxml2-devel pixman-devel \
+ libX11-devel libXext-devel libXpm-devel libXfont2-devel \
+ libXdmcp-devel libXdamage-devel libXcomposite-devel \
+ libXrandr-devel libXfixes-devel libXtst-devel libXinerama-devel \
+ xorg-x11-font-utils libtirpc-devel xkeyboard-config
+ # soft requirements
+ dnf --enablerepo="epel" -y install \
+ quilt xorg-x11-xkb-utils-devel
+ ;;
+ centos:7)
+ # enable epel repository for quilt
+ yum -y install epel-release
+ rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
+ # basic packages
+ yum -y install \
+ autoconf automake gcc-c++ libtool make imake pkgconfig which
+ # imake deps
+ yum -y install \
+ xorg-x11-proto-devel zlib-devel
+ # X11 libraries deps
+ yum -y install \
+ libjpeg-devel expat-devel libpng-devel libxml2-devel pixman-devel \
+ libX11-devel libXext-devel libXpm-devel libXfont-devel \
+ libXdmcp-devel libXdamage-devel libXcomposite-devel \
+ libXrandr-devel libXfixes-devel libXtst-devel libXinerama-devel \
+ xorg-x11-font-utils libtirpc-devel xkeyboard-config
+ # soft requirements
+ yum -y --enablerepo=epel install \
+ quilt xorg-x11-xkb-utils-devel
+ ;;
+ esac
+
+ - name: Checkout repository
+ uses: actions/checkout@v2
+
+ - name: Build nx-libs with ${{ matrix.cfg.cc-version }}
+ shell: sh
+ env:
+ DEBIAN_FRONTEND: noninteractive
+ run: |
+ case "${{ matrix.cfg.cc-version }}" in
+ gcc)
+ export CC=gcc
+ export CXX=g++
+ ;;
+ clang)
+ export CC=clang
+ export CXX=clang++
+ ;;
+ esac
+ case "${{ matrix.cfg.container }}" in
+ ubuntu*|debian*)
+ make
+ ;;
+ fedora*|centos*)
+ export IMAKE_DEFINES="-DUseTIRPC=YES"
+ make IMAKE_DEFINES="${IMAKE_DEFINES}"
+ ;;
+ esac
diff --git a/.pvs-studio.sh b/.pvs-studio.sh
deleted file mode 100644
index 9e9f0370c..000000000
--- a/.pvs-studio.sh
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/bin/bash
-
-before_install() {
- if [ "$PVS_ANALYZE" = "yes" ]; then
- sudo wget -q -O - https://files.viva64.com/etc/pubkey.txt | sudo apt-key add -
- sudo wget -O /etc/apt/sources.list.d/viva64.list https://files.viva64.com/etc/viva64.list
- sudo apt-get update -qq
- sudo apt-get install -qq pvs-studio
- else
- echo "not installing PVS-Studio"
- fi
-}
-
-build_script() {
- if [ "$PVS_ANALYZE" = "yes" ]; then
- if [[ -z "${PVS_USERNAME}" ]]; then
- echo '"PVS_USERNAME" environment variable not set'
- exit 0
- elif [[ -z "${PVS_KEY}" ]]; then
- echo '"PVS_KEY" environment variable not set'
- exit 0
- else
- pvs-studio-analyzer credentials -o "PVS-Studio.lic" "${PVS_USERNAME}" "${PVS_KEY}"
- pvs-studio-analyzer trace -- make -j2
- pvs-studio-analyzer analyze --quiet -j2 --lic-file "PVS-Studio.lic" --output-file "PVS-Studio-${CC}.log"
- plog-converter -a "GA:1,2" -t tasklist -o "PVS-Studio-${CC}.tasks" "PVS-Studio-${CC}.log"
- cat "PVS-Studio-${CC}.tasks"
- fi
- else
- make -j2
- fi
-}
-
-set -e
-set -x
-
-$1;
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 776c1a4bd..000000000
--- a/.travis.yml
+++ /dev/null
@@ -1,172 +0,0 @@
-# Use new bionic images, should yield newer compilers and packages
-language: cpp
-os: linux
-dist: xenial
-
-jobs:
- include:
- - name: "GCC 5.4"
- addons:
- apt:
- update: true
- sources:
- - ubuntu-toolchain-r-test
- packages:
- # imake
- - libxkbfile-dev
- - xfonts-utils
- - xutils-dev
- # X11 libaries
- - libxcomposite-dev
- - libxdamage-dev
- - libxfont-dev
- - libxinerama-dev
- - libxpm-dev
- - libxrandr-dev
- - libxtst-dev
- - x11proto-fonts-dev
- # soft requirements
- - quilt
- - x11-xkb-utils
-
- env:
- - MATRIX_EVAL="CC=gcc && CXX=g++"
- - STATIC_ANALYSIS="no"
- - PVS_ANALYZE="no"
-
- - name: "cppcheck 1.82 + GCC 10.x"
- dist: bionic
- addons:
- apt:
- update: true
- sources:
- - ubuntu-toolchain-r-test
- packages:
- - cppcheck
- - g++-10
- # imake
- - libxkbfile-dev
- - xfonts-utils
- - xutils-dev
- # X11 libaries
- - libxcomposite-dev
- - libxdamage-dev
- - libxfont-dev
- - libxinerama-dev
- - libxpm-dev
- - libxrandr-dev
- - libxtst-dev
- - x11proto-fonts-dev
- # soft requirements
- - quilt
- - x11-xkb-utils
-
- env:
- - MATRIX_EVAL="CC=gcc-10 && CXX=g++-10"
- - STATIC_ANALYSIS="yes"
- - PVS_ANALYZE="no"
-
- - name: "GCC 10.x + PVS-Studio"
- dist: bionic
- addons:
- apt:
- update: true
- sources:
- - ubuntu-toolchain-r-test
- packages:
- - g++-10
- # imake
- - libxkbfile-dev
- - xfonts-utils
- - xutils-dev
- # X11 libaries
- - libxcomposite-dev
- - libxdamage-dev
- - libxfont-dev
- - libxinerama-dev
- - libxpm-dev
- - libxrandr-dev
- - libxtst-dev
- - x11proto-fonts-dev
- # soft requirements
- - quilt
- - x11-xkb-utils
-
- env:
- - MATRIX_EVAL="CC=gcc-10 && CXX=g++-10"
- - STATIC_ANALYSIS="no"
- - PVS_ANALYZE="yes"
-
- - name: "Clang 3.9"
- addons:
- apt:
- update: true
- sources:
- - llvm-toolchain-xenial-3.9
- packages:
- - clang-3.9
- # imake
- - libxkbfile-dev
- - xfonts-utils
- - xutils-dev
- # X11 libaries
- - libxcomposite-dev
- - libxdamage-dev
- - libxfont-dev
- - libxinerama-dev
- - libxpm-dev
- - libxrandr-dev
- - libxtst-dev
- - x11proto-fonts-dev
- # soft requirements
- - quilt
- - x11-xkb-utils
-
- env:
- - MATRIX_EVAL="CC=clang-3.9 && CXX=clang++-3.9"
- - STATIC_ANALYSIS="no"
- - PVS_ANALYZE="no"
-
- - name: "Clang 9.x"
- dist: bionic
- addons:
- apt:
- update: true
- sources:
- - llvm-toolchain-bionic-9
- - ubuntu-toolchain-r-test
- packages:
- - clang-9
- # imake
- - libxkbfile-dev
- - xfonts-utils
- - xutils-dev
- # X11 libaries
- - libxcomposite-dev
- - libxdamage-dev
- - libxfont-dev
- - libxinerama-dev
- - libxpm-dev
- - libxrandr-dev
- - libxtst-dev
- - x11proto-fonts-dev
- # soft requirements
- - quilt
- - x11-xkb-utils
-
- env:
- - MATRIX_EVAL="CC=clang-9 && CXX=clang++-9"
- - STATIC_ANALYSIS="no"
- - PVS_ANALYZE="no"
-
-before_install:
- - eval "${MATRIX_EVAL}"
- - travis_retry bash .pvs-studio.sh before_install
-
-script:
- # run static analysis tools
- - ./run-static-analysis.sh
- # print compiler version
- - ${CC} --version
- # build all packages
- - travis_retry bash .pvs-studio.sh build_script
diff --git a/README.md b/README.md
index d781194b4..8470199f9 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# NX development by ArticaProject, X2Go and TheQVD [![Build Status](https://travis-ci.org/ArcticaProject/nx-libs.svg)](https://travis-ci.org/ArcticaProject/nx-libs)
+# NX development by ArticaProject, X2Go and TheQVD
This source tree started as a re-distribution of those NX packages needed
to setup FreeNX and/or X2Go on a Linux server.
diff --git a/run-static-analysis.sh b/run-static-analysis.sh
deleted file mode 100755
index a9368973b..000000000
--- a/run-static-analysis.sh
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/bash
-
-if [[ "${STATIC_ANALYSIS}" == "yes" ]]; then
- # cppcheck
- if ! [ -x "$(command -v cppcheck)" ]; then
- echo 'Error: cppcheck is not installed.' >&2
- exit 1
- fi
- CPPCHECK_OPTS='--error-exitcode=0 --force --quiet --suppressions-list=./static-analysis-suppressions'
- # we exclude some external projects
- CPPCHECK_EXCLUDES='-i ./nx-X11/extras/ -i nx-X11/programs/Xserver/GL/mesa* -i ./.pc -i ./nx-X11/.build-exports -i ./nx-X11/exports -i ./doc'
- echo "$(cppcheck --version):";
- cppcheck $CPPCHECK_OPTS $CPPCHECK_EXCLUDES .;
-fi