name: C/C++ CI on: push: branches: [ master, release/v8.* ] pull_request: branches: [ master, release/v8.* ] jobs: build: if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }} runs-on: ubuntu-latest strategy: matrix: # A valid option parameter to the cmake file. # See BUILD_OPTIONS in tests/CMakeLists.txt. build_option: ['OPTIONS_16BIT', 'OPTIONS_24BIT', 'OPTIONS_FULL_32BIT', "OPTIONS_VG_LITE"] name: Build ${{ matrix.build_option }} steps: - uses: actions/checkout@v4 - 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-native: runs-on: ubuntu-latest name: amd64 Executable Tests steps: - uses: actions/checkout@v4 - uses: ammaraskar/gcc-problem-matcher@master - name: Install prerequisites run: scripts/install-prerequisites.sh - name: Run tests run: python tests/main.py --report --update-image test - name: Archive screenshot errors if: failure() uses: actions/upload-artifact@v4 with: name: screenshot-errors-amd64 path: | tests/ref_imgs/**/*_err.png test_screenshot_error.h # - name: Upload coverage to Codecov # uses: codecov/codecov-action@v4 # if: github.event_name == 'push' && github.repository == 'lvgl/lvgl' # with: # fail_ci_if_error: true # verbose: true test-cross: # The host should always be linux runs-on: ubuntu-latest name: ${{ matrix.arch }} Executable Tests # Run steps on a matrix of 3 arch/distro combinations strategy: matrix: arch: [ 'aarch64', 'armv6', 'armv7' ] steps: - uses: actions/checkout@v4 - uses: ammaraskar/gcc-problem-matcher@master - name: Setup cache uses: actions/cache@v4 with: path: | ~/.ccache key: lvgl_ci_cross_test_ccache_${{ matrix.arch }}_${{ github.sha }} restore-keys: | lvgl_ci_cross_test_ccache_${{ matrix.arch }} - uses: uraimo/run-on-arch-action@v2.7.1 name: Run tests id: build with: arch: ${{ matrix.arch }} distro: bullseye # Not required, but speeds up builds githubToken: ${{ github.token }} # The shell to run commands with in the container shell: /bin/bash # Create cached/volume directories on host setup: | mkdir -p ~/.ccache # Mount cached directories in the container for faster builds dockerRunArgs: | --volume "${HOME}/.ccache:/root/.ccache" install: | apt-get update -y apt-get install build-essential ccache libgcc-10-dev python3 libpng-dev ruby-full gcovr cmake libjpeg62-turbo-dev libfreetype6-dev libasan6 pngquant python3-pip libinput-dev libxkbcommon-dev libdrm-dev pkg-config ninja-build -q -y pip install pypng lz4 /usr/sbin/update-ccache-symlinks echo 'export PATH="/usr/lib/ccache:$PATH"' | tee -a ~/.bashrc run: | env PATH="/usr/lib/ccache:$PATH" NON_AMD64_BUILD=1 ASAN_OPTIONS=detect_leaks=0 python3 tests/main.py test - name: Archive screenshot errors if: failure() uses: actions/upload-artifact@v4 with: name: screenshot-errors-${{ matrix.arch }} path: | tests/ref_imgs/**/*_err.png test_screenshot_error.h