cppcheck/.github/workflows/CI-unixish.yml

77 lines
2.0 KiB
YAML

# Syntax reference https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions
# Environment reference https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners
name: CI-unixish
on: [push, pull_request]
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
fail-fast: false # not worthwhile...
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Install missing software on ubuntu
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install libxml2-utils
sudo apt-get install z3 libz3-dev
cp externals/z3_version_old.h externals/z3_version.h
- name: Install missing software on macos
if: matrix.os == 'macos-latest'
run: |
brew install z3
- name: Install Qt
if: matrix.os == 'ubuntu-latest'
uses: jurplel/install-qt-action@v2
with:
modules: 'qtcharts'
- name: Build cppcheck
run: |
cp externals/z3_version_old.h externals/z3_version.h
make -j$(nproc) USE_Z3=yes HAVE_RULES=yes
- name: Build test
run: |
make -j$(nproc) testrunner USE_Z3=yes HAVE_RULES=yes
- name: Run test
run: |
make -j$(nproc) check USE_Z3=yes HAVE_RULES=yes
- name: Validate
run: |
make -j$(nproc) validateCFG validatePlatforms
- name: Build GUI on ubuntu
if: matrix.os == 'ubuntu-latest'
run: |
pushd gui
qmake HAVE_QCHART=yes
make -j$(nproc)
- uses: actions/upload-artifact@v2
with:
name: cppcheck_cli
path: ./cppcheck
- uses: actions/upload-artifact@v2
with:
name: cppcheck_cli
path: ./**/cfg/*.cfg
- uses: actions/upload-artifact@v2
with:
name: cppcheck_cli
path: ./**/platforms/*.xml