--- /dev/null
+name: Coverity
+on:
+ push:
+ branches:
+ - master
+
+jobs:
+ test:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v2
+
+ - name: Download Coverity Build Tool
+ run: |
+ wget -q https://scan.coverity.com/download/cxx/linux64 --post-data "token=$TOKEN&project=lxc/lxcfs" -O cov-analysis-linux64.tar.gz
+ mkdir cov-analysis-linux64
+ tar xzf cov-analysis-linux64.tar.gz --strip 1 -C cov-analysis-linux64
+ env:
+ TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
+
+ - name: Install dependencies
+ run: |
+ sudo apt-get update -qq
+ sudo apt-get install -qq gcc clang
+ sudo apt-get install -qq libfuse-dev uuid-runtime
+
+ - name: Run coverity
+ run: |
+ export PATH="$(pwd)/cov-analysis-linux64/bin:${PATH}"
+
+ # Configure
+ ./bootstrap.sh
+ mkdir build
+ cd build
+ ../configure --prefix=/usr
+
+ # Build
+ cov-build --dir cov-int make -j4
+ tar czvf lxcfs.tgz cov-int
+
+ # Submit the results
+ curl \
+ --form project=lxc/lxcfs \
+ --form token=${TOKEN} \
+ --form email=lxc-devel@lists.linuxcontainers.org \
+ --form file=@lxcfs.tgz \
+ --form version=master \
+ --form description="${GITHUB_SHA}" \
+ https://scan.coverity.com/builds?project=lxc/lxcfs
+ env:
+ TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
--- /dev/null
+name: Build and test
+on:
+ - push
+ - pull_request
+
+jobs:
+ test:
+ strategy:
+ fail-fast: false
+ matrix:
+ compiler:
+ - gcc
+ - clang
+ os:
+ - ubuntu-16.04
+ - ubuntu-18.04
+ - ubuntu-20.04
+ exclude:
+ - os: ubuntu-16.04
+ compiler: gcc
+ runs-on: ${{ matrix.os }}
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v2
+
+ - name: Install dependencies
+ run: |
+ sudo apt-get update -qq
+ sudo apt-get install -qq gcc clang
+ sudo apt-get install -qq libfuse-dev uuid-runtime
+
+ - name: Compiler version
+ env:
+ CC: ${{ matrix.compiler }}
+ run: |
+ ${CC} --version
+
+ - name: Build
+ env:
+ CC: ${{ matrix.compiler }}
+ run: |
+ # Configure
+ ./bootstrap.sh
+ CFLAGS='-g -O0 -std=c11 -DDEBUG -DVERBOSE -DRESOLVE_NOW -Wall -Werror' ./configure --prefix=/usr
+
+ # Build
+ make -j4
+ (cd tests && make tests)
+
+ - name: Test
+ env:
+ CC: ${{ matrix.compiler }}
+ run: |
+ echo 1 | sudo tee /sys/fs/cgroup/cpuset/cgroup.clone_children || true
+ sudo -E PATH="${PATH}" LD_LIBRARY_PATH="${LD_LIBRARY_PATH}" tests/main.sh
+++ /dev/null
-dist: bionic
-sudo: required
-language: c
-
-compiler:
- - gcc
- - clang
-
-arch:
- - amd64
- - arm64
- - ppc64le
- - s390x
-
-env:
- global:
- - secure: "git3Pry4fHtyXFNdy+b5NjIxHOkg1olPKCqKXc0SD9FLBF6oxmvrt8QXDoPWolLK6Y62GEu751tWXJ8YsYAkPMlNX3lrfyxomhmhKCB1pHQvnZ/ln15Na3EGG9HvpKs2VTqc1s5817rfo+USUwGmbeNqe99BI3egNG1o/WiKiOQ="
-
-before_install:
- - sudo apt-get update -qq
- - sudo apt-get -y install -qq automake coreutils libfuse-dev libtool uuid-runtime
-
-script:
- - ./bootstrap.sh
- - CFLAGS='-g -O0 -std=c11 -DDEBUG -DVERBOSE -DRESOLVE_NOW -Wall -Werror' ./configure --prefix=/usr
- - make -j4
- - (cd tests && make tests)
- - echo 1 | sudo tee /sys/fs/cgroup/cpuset/cgroup.clone_children || true
- - sudo -E PATH="${PATH}" LD_LIBRARY_PATH="${LD_LIBRARY_PATH}" tests/main.sh
-
-notifications:
- email:
- recipients:
- - serge.hallyn@ubuntu.com
- - stgraber@ubuntu.com
-
-addons:
- coverity_scan:
- build_script_url: https://dl.stgraber.org/coverity_travis.sh
- project:
- name: lxc/lxcfs
- description: "FUSE filesystem for LXC https://linuxcontainers.org/lxcfs"
-
- # Where email notification of build analysis results will be sent
- notification_email: christian.brauner@ubuntu.com
-
- build_command_prepend: "./bootstrap.sh && mkdir build && cd build && ../configure --prefix=/usr"
- build_command: "make -j4"
- branch_pattern: master