mirror of
https://github.com/whisperity/CodeChecker-Action.git
synced 2025-12-28 18:57:26 +08:00
54 lines
1.6 KiB
YAML
54 lines
1.6 KiB
YAML
name: 'Action test'
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- master
|
|
- 'releases/*'
|
|
|
|
jobs:
|
|
# Fetch tests do not produce results, but test the functionality of the
|
|
# "grab LLVM" and "grab and build CodeChecker" features.
|
|
fetch_ubuntu_2004_latestllvm:
|
|
name: "Fetch test: Ubuntu Linux 20.04 (latest LLVM)"
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: ./
|
|
with:
|
|
version: "master"
|
|
llvm-version: "latest"
|
|
logfile: "test/empty/compile_commands.json"
|
|
fetch_ubuntu_1804_12llvm:
|
|
name: "Fetch test: Ubuntu Linux 18.04 (LLVM 12.y)"
|
|
runs-on: ubuntu-18.04
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: ./
|
|
with:
|
|
version: "master"
|
|
llvm-version: 12
|
|
logfile: "test/empty/compile_commands.json"
|
|
|
|
# Test simple build and analysis configuration.
|
|
simple_analysis_test:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
logfile: ['', 'test/simple/compile_commands.json']
|
|
build-command: ['', 'cd test/simple; g++ -c main.cpp -o main.o']
|
|
|
|
name: "Simple analysis: (${{ matrix.logfile && 'logfile' || 'no-logfile' }} ${{ matrix.build-command && 'build-command' || 'no-build-command' }})"
|
|
runs-on: ubuntu-20.04
|
|
|
|
# Allow continuing the build, this step is "expected failure".
|
|
continue-on-error: ${{ (matrix.logfile != '') == (matrix.build-command != '') }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: ./
|
|
with:
|
|
logfile: ${{ matrix.logfile }}
|
|
build-command: ${{ matrix.build-command }}
|