ci(tests) use common script to install development prereqs (#2504)
Simplified workflow and documentation, by moving the development package prerequisites into a new build script `scripts/install-prerequisites.sh`. Also, moved prerequisite installation into its own CI step and removed explicit working directory change as it is no longer needed (`main.py` does it).
This commit is contained in:
4
.github/workflows/ccpp.yml
vendored
4
.github/workflows/ccpp.yml
vendored
@@ -14,8 +14,10 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: ammaraskar/gcc-problem-matcher@master
|
- uses: ammaraskar/gcc-problem-matcher@master
|
||||||
|
- name: Install prerequisites
|
||||||
|
run: scripts/install-prerequisites.sh
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: sudo apt-get install libpng-dev ruby-full gcovr; cd tests; python ./main.py report
|
run: python tests/main.py report
|
||||||
- name: Upload coverage to Codecov
|
- name: Upload coverage to Codecov
|
||||||
uses: codecov/codecov-action@v1
|
uses: codecov/codecov-action@v1
|
||||||
if: github.event_name == 'push'
|
if: github.event_name == 'push'
|
||||||
|
|||||||
8
scripts/install-prerequisites.sh
Executable file
8
scripts/install-prerequisites.sh
Executable file
@@ -0,0 +1,8 @@
|
|||||||
|
#!/usr/bin/sh
|
||||||
|
|
||||||
|
# Install Linux package prerequisites needed for LVGL development
|
||||||
|
# and testing. Some less-common development packages are not included
|
||||||
|
# here, such as MicroPython and PC simulator packages.
|
||||||
|
#
|
||||||
|
# Note: This script is run by the CI workflows.
|
||||||
|
sudo apt install gcc python3 libpng-dev ruby-full gcovr cmake
|
||||||
@@ -5,11 +5,12 @@ The tests in the folder can be run locally and automatically by GitHub CI.
|
|||||||
## Running locally
|
## Running locally
|
||||||
|
|
||||||
### Requirements (Linux)
|
### Requirements (Linux)
|
||||||
1. Be sure GCC and Python3 are installed.
|
|
||||||
2. Install [cmake](https://cmake.org/) with `sudo apt install cmake`.
|
Install requirements by:
|
||||||
3. Install [gcovr](https://gcovr.com/en/stable/index.html) with `sudo apt install gcovr`
|
|
||||||
4. Install Ruby with `sudo apt install ruby-full`
|
```sh
|
||||||
5. Install libpng development package with `sudo apt install libpng-dev`
|
scripts/install-prerequisites.sh
|
||||||
|
```
|
||||||
|
|
||||||
### Run test
|
### Run test
|
||||||
1. Enter `lvgl/tests/`
|
1. Enter `lvgl/tests/`
|
||||||
|
|||||||
Reference in New Issue
Block a user