ci(test): remove non-native builds and add native 32 and 64 bit builds instead
This commit is contained in:
88
.github/workflows/ccpp.yml
vendored
88
.github/workflows/ccpp.yml
vendored
@@ -60,7 +60,13 @@ jobs:
|
||||
|
||||
test-native:
|
||||
runs-on: ubuntu-22.04
|
||||
name: amd64 Executable Tests
|
||||
strategy:
|
||||
matrix:
|
||||
# A valid option parameter to the cmake file.
|
||||
# See BUILD_OPTIONS in tests/CMakeLists.txt.
|
||||
build_config: ['64bit build',
|
||||
'32bit build']
|
||||
name: Run tests with ${{ matrix.build_config }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: ammaraskar/gcc-problem-matcher@master
|
||||
@@ -71,6 +77,9 @@ jobs:
|
||||
# high-entropy ASLR in much newer kernels that GitHub runners are
|
||||
# using leading to random crashes: https://reviews.llvm.org/D148280
|
||||
run: sudo sysctl vm.mmap_rnd_bits=28
|
||||
- name: Set environment variables for 32-bit build
|
||||
if: matrix.build_config == '32bit build'
|
||||
run: echo "NON_AMD64_BUILD=1" >> $GITHUB_ENV
|
||||
- name: Run tests
|
||||
run: python tests/main.py --report --update-image test
|
||||
- name: Archive screenshot errors
|
||||
@@ -87,80 +96,3 @@ jobs:
|
||||
# with:
|
||||
# fail_ci_if_error: true
|
||||
# verbose: true
|
||||
test-cross:
|
||||
# The host should always be linux
|
||||
runs-on: ubuntu-22.04
|
||||
name: ${{ matrix.arch }} Executable Tests
|
||||
|
||||
# Run steps on a matrix of 3 arch/distro combinations
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- arch: aarch64
|
||||
distro: ubuntu22.04
|
||||
- arch: armv6
|
||||
distro: bullseye
|
||||
- arch: armv7
|
||||
distro: bullseye
|
||||
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.2
|
||||
name: Run tests
|
||||
id: build
|
||||
with:
|
||||
arch: ${{ matrix.arch }}
|
||||
distro: ${{ matrix.distro }}
|
||||
|
||||
# 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
|
||||
if [[ "${{ matrix.distro }}" == "ubuntu22.04" ]]; then
|
||||
apt-get install libjpeg-turbo8-dev -q -y
|
||||
else
|
||||
apt-get install libjpeg62-turbo-dev -q -y
|
||||
fi
|
||||
apt-get install build-essential ccache libgcc-10-dev python3 libpng-dev ruby-full gcovr cmake 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: |
|
||||
if [[ "${{ matrix.distro }}" == "ubuntu22.04" ]]; then
|
||||
# ASan in llvm 14 provided in ubuntu-22.04 is incompatible with
|
||||
# high-entropy ASLR configured in much newer kernels that GitHub
|
||||
# runners are using leading to random crashes:
|
||||
# https://github.com/actions/runner-images/issues/9491
|
||||
# can remove this once the issue is fixed.
|
||||
sysctl -w vm.mmap_rnd_bits=28
|
||||
fi
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user