From 0c5e09a14476054151c0bd03c45229eb733bc8ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Costa?= Date: Wed, 12 Feb 2025 20:26:44 +0100 Subject: [PATCH] ci: add 8bit build option (#7574) --- .github/workflows/ccpp.yml | 50 ++++++++++++++++++++++---------------- tests/main.py | 2 +- 2 files changed, 30 insertions(+), 22 deletions(-) diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index 496d9ab04..b36dde113 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -13,19 +13,21 @@ concurrency: cancel-in-progress: true jobs: - build: + build-ubuntu: if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }} runs-on: ubuntu-22.04 strategy: + fail-fast: false matrix: # A valid option parameter to the cmake file. # See BUILD_OPTIONS in tests/CMakeLists.txt. - build_option: ['OPTIONS_16BIT', + build_option: ['OPTIONS_NORMAL_8BIT', + 'OPTIONS_16BIT', 'OPTIONS_24BIT', 'OPTIONS_FULL_32BIT', 'OPTIONS_VG_LITE', 'OPTIONS_SDL'] - name: Build ${{ matrix.build_option }} + name: Build ${{ matrix.build_option }} - Ubuntu steps: - uses: actions/checkout@v4 - uses: ammaraskar/gcc-problem-matcher@master @@ -34,36 +36,42 @@ jobs: - name: Building ${{ matrix.build_option }} run: python tests/main.py --build-option=${{ matrix.build_option }} build --auto-clean - build-windows-GCC: - runs-on: windows-2022 - name: Build Windows GCC - steps: - - uses: actions/checkout@v4 - - uses: ammaraskar/gcc-problem-matcher@master - - name: Install prerequisites - run: scripts\install-prerequisites.bat - - name: Build - run: python tests/main.py build - env: - CC: gcc + build-windows: + strategy: + fail-fast: false + 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'] + compiler: [gcc, cl] - build-windows-MSVC: + name: Build ${{ matrix.build_option }} - ${{matrix.compiler }} - Windows runs-on: windows-2022 - name: Build Windows MSVC steps: - uses: actions/checkout@v4 - name: Install prerequisites run: scripts\install-prerequisites.bat - - uses: ilammy/msvc-dev-cmd@v1 + + - if: matrix.compiler == 'gcc' + uses: ammaraskar/gcc-problem-matcher@master + + - if: matrix.compiler == 'cl' + uses: ilammy/msvc-dev-cmd@v1 with: arch: x64 - - uses: ruby/setup-ruby@v1 + + - if: matrix.compiler == 'cl' + uses: ruby/setup-ruby@v1 with: ruby-version: 'mswin' + - name: Build - run: python tests/main.py build + run: python tests/main.py --build-option=${{ matrix.build_option }} build env: - CC: cl + CC: ${{ matrix.compiler }} build-esp32s3: runs-on: ubuntu-22.04 diff --git a/tests/main.py b/tests/main.py index 6b60c0fe8..9ee366d4f 100755 --- a/tests/main.py +++ b/tests/main.py @@ -21,7 +21,7 @@ from LVGLImage import LVGLImage, ColorFormat, CompressMethod # Key values must match variable names in CMakeLists.txt. build_only_options = { -# 'OPTIONS_NORMAL_8BIT': 'Normal config, 8 bit color depth', + 'OPTIONS_NORMAL_8BIT': 'Normal config, 8 bit color depth', 'OPTIONS_16BIT': 'Minimal config, 16 bit color depth', 'OPTIONS_24BIT': 'Normal config, 24 bit color depth', 'OPTIONS_FULL_32BIT': 'Full config, 32 bit color depth',