test/affinity: Made use of more brace initialisation in the suite #23
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: Coverity | |
on: | |
push: | |
branches: | |
- coverityScan | |
jobs: | |
scan-linux: | |
runs-on: ubuntu-20.04 | |
if: github.repository == 'bad-alloc-heavy-industries/substrate' | |
strategy: | |
fail-fast: false | |
steps: | |
- name: Runtime environment | |
shell: bash | |
env: | |
WORKSPACE: ${{ github.workspace }} | |
run: | | |
echo "PATH=$HOME/.local/bin:$PATH" >> $GITHUB_ENV | |
echo "GITHUB_WORKSPACE=`pwd`" >> $GITHUB_ENV | |
- name: Setup GCC | |
shell: bash | |
run: | | |
CXX=${CC/#gcc/g++} | |
sudo apt-add-repository ppa:ubuntu-toolchain-r/test | |
sudo apt-get update | |
sudo apt-get install $CC $CXX | |
echo "CC=$CC" >> $GITHUB_ENV | |
echo "CXX=$CXX" >> $GITHUB_ENV | |
echo "GCOV=${CC/#gcc/gcov}" >> $GITHUB_ENV | |
env: | |
CC: gcc-11 | |
- name: Checkout substrate | |
uses: actions/checkout@v3 | |
with: | |
lfs: true | |
submodules: true | |
- name: Setup Meson + Ninja | |
shell: bash | |
run: | | |
sudo pip3 install --upgrade pip setuptools wheel | |
pip3 install --user meson ninja | |
working-directory: ${{ runner.temp }} | |
- name: Version tools | |
shell: bash | |
run: | | |
$CC --version | |
$CXX --version | |
$GCOV --version | |
meson --version | |
ninja --version | |
- name: Install Coverity | |
shell: bash | |
run: | | |
.github/installCoverity.sh | |
env: | |
COVERITY_SCAN_TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }} | |
COVERITY_PROJECT_NAME: substrate | |
- name: Run Coverity | |
shell: bash | |
run: | | |
meson setup build --prefix=$HOME/.local -Dcpp_std=c++17 | |
cov-build --dir cov-int ninja -C build | |
env: | |
COVERITY_SCAN_TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }} | |
- name: Upload Coverity | |
shell: bash | |
run: | | |
VERSION=`meson introspect build --projectinfo | jq -r '.["version"]'`-`git rev-parse --short HEAD` | |
tar cJf substrate.tar.xz cov-int | |
curl --form token=${{ secrets.COVERITY_SCAN_TOKEN }} \ | |
--form email=dx-mon@users.sourceforge.net \ | |
--form file=@substrate.tar.xz \ | |
--form version=$VERSION \ | |
--form description="A collection of headers containing useful tools and gadgets for building C++ programs" \ | |
https://scan.coverity.com/builds?project=${COVERITY_PROJECT_NAME} | |
- name: Debug | |
if: failure() | |
shell: bash | |
run: cat cov-int/build-log.txt |