Only apple sets data to 1 on write events... #61
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI Linux Coverity | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- 'include/sys/*' | |
- 'src/common/*' | |
- 'src/linux/*' | |
- 'test/*' | |
- '.github/workflows/ci-linux-coverity.yml' | |
jobs: | |
linux-build-and-test: | |
if: github.repository == 'mheily/libkqueue' | |
timeout-minutes: 5 | |
strategy: | |
fail-fast: false | |
runs-on: ubuntu-20.04 | |
name: "ci-linux-coverity" | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install build deps | |
run: | | |
sudo apt-get install -y \ | |
build-essential \ | |
devscripts \ | |
fakeroot \ | |
gridsite-clients | |
- name: Download coverity tool MD5 | |
run: | | |
wget https://scan.coverity.com/download/linux64 \ | |
--post-data "token=${TOKEN}&project=`urlencode ${GITHUB_REPOSITORY}`&md5=1" \ | |
-O coverity_tool.tar.gz.md5 | |
env: | |
TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }} | |
- name: Cache coverity tool | |
uses: actions/cache@v2 | |
id: cache-coverity | |
with: | |
path: coverity_tool.tar.gz | |
key: coverity-tool-cache-${{ hashFiles('coverity_tool.tar.gz.md5') }} | |
- name: Download coverity tool | |
if: ${{ steps.cache-coverity.outputs.cache-hit != 'true' }} | |
run: | | |
wget https://scan.coverity.com/download/linux64 \ | |
--post-data "token=${TOKEN}&project=`urlencode ${GITHUB_REPOSITORY}`" \ | |
-O coverity_tool.tar.gz | |
env: | |
TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }} | |
- name: Extract coverity tool | |
run: | | |
mkdir coverity_tool | |
tar xzf coverity_tool.tar.gz --strip 1 -C coverity_tool | |
- name: Install LLVM 10 | |
run: | | |
sudo apt-get install -y --no-install-recommends clang-10 llvm-10 | |
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-10 60 && sudo update-alternatives --set clang /usr/bin/clang-10 | |
sudo update-alternatives --install /usr/bin/llvm-symbolizer llvm-symbolizer /usr/bin/llvm-symbolizer-10 60 && sudo update-alternatives --set llvm-symbolizer /usr/bin/llvm-symbolizer-10 | |
- name: Configure build system | |
run: | | |
cmake . -G "Unix Makefiles" \ | |
-DCMAKE_INSTALL_PREFIX="/usr" \ | |
-DCMAKE_INSTALL_LIBDIR="lib" \ | |
-DCMAKE_VERBOSE_MAKEFILE:BOOL="ON" \ | |
-DENABLE_TESTING="YES" \ | |
-DCMAKE_BUILD_TYPE="Debug" | |
- name: Build libkqueue | |
run: | | |
export PATH=`pwd`/coverity_tool/bin:$PATH | |
export CC=clang | |
cov-configure --template --compiler clang --comptype clangcc | |
cov-build --dir cov-int make | |
- name: Display build result | |
run: | | |
cat /home/runner/work/libkqueue/libkqueue/cov-int/build-log.txt | |
- name: Submit result | |
run: | | |
tar czf cov-int.tar.gz cov-int | |
curl \ | |
--form token="$TOKEN" \ | |
--form email="a.cudbardb@freeradius.org" \ | |
--form file=@cov-int.tar.gz \ | |
--form version="`grep LIBKQUEUE_VERSION_STRING version.h | cut -w -f 3 | sed -e 's/"//g'`" \ | |
--form description="${GITHUB_REPOSITORY}" \ | |
https://scan.coverity.com/builds?project=`urlencode ${GITHUB_REPOSITORY}` | |
env: | |
TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }} |