mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-14 06:42:58 +08:00
b1bf7fd29a
Create one GitHub workflow job for each build option build or test execution. This allows each of the five builds to be executed in parallel as well as making it easier to navigate to the test output as it now resides in its own job. This change **does** change the command-line arguments to the test execution script. This is required to allow the build options name to be passed in. New `tests/main.py` command-line help: ``` usage: main.py [-h] [--build-options BUILD_OPTIONS] [--clean] [--report] [{build,test} [{build,test} ...]] Build and/or run LVGL tests. positional arguments: {build,test} build: compile build tests, test: compile/run executable tests. optional arguments: -h, --help show this help message and exit --build-options BUILD_OPTIONS the build option name to build or run. When omitted all build configurations are used. --clean clean existing build artifacts before operation. --report generate code coverage report for tests. This program builds and optionally runs the LVGL test programs. There are two types of LVGL tests: "build", and "test". The build-only tests, as their name suggests, only verify that the program successfully compiles and links (with various build options). There are also a set of tests that execute to verify correct LVGL library behavior. ```
45 lines
1.3 KiB
YAML
45 lines
1.3 KiB
YAML
name: C/C++ CI
|
|
|
|
on:
|
|
push:
|
|
branches: [ master, release/v8.* ]
|
|
pull_request:
|
|
branches: [ master, release/v8.* ]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
# A valid option parameter to the cmake file.
|
|
# See BUILD_OPTIONS in tests/CMakeLists.txt.
|
|
build_option: ['OPTIONS_MINIMAL_MONOCHROME',
|
|
'OPTIONS_NORMAL_8BIT',
|
|
'OPTIONS_16BIT',
|
|
'OPTIONS_16BIT_SWAP',
|
|
'OPTIONS_FULL_32BIT']
|
|
name: Build ${{ matrix.build_option }}
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: ammaraskar/gcc-problem-matcher@master
|
|
- name: Install prerequisites
|
|
run: scripts/install-prerequisites.sh
|
|
- name: Building ${{ matrix.build_option }}
|
|
run: python tests/main.py --build-option=${{ matrix.build_option }} build
|
|
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
name: Executable Tests
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: ammaraskar/gcc-problem-matcher@master
|
|
- name: Install prerequisites
|
|
run: scripts/install-prerequisites.sh
|
|
- name: Run tests
|
|
run: python tests/main.py --report test
|
|
- name: Upload coverage to Codecov
|
|
uses: codecov/codecov-action@v1
|
|
if: github.event_name == 'push'
|
|
with:
|
|
fail_ci_if_error: true
|
|
verbose: true |