Commit 9c6aa527 authored by Sarthak  Bhardwaj's avatar Sarthak Bhardwaj
Browse files

Added regression test CI

parent 5e32a034
Pipeline #358373 failed with stages
in 1 minute and 49 seconds
stages:
- build
- test
# FIXME: Use --werror once warnings are fixed.
variables:
......@@ -23,6 +24,12 @@ variables:
image: 'registry.freedesktop.org/freetype/docker-images/debian:latest'
stage: 'build'
.test linux common:
# See
# https://gitlab.freedesktop.org/freetype/docker-images/container_registry/20896
image: 'registry.freedesktop.org/freetype/docker-images/debian:latest'
stage: 'test'
.build windows meson:
extends: '.build windows common'
variables:
......@@ -141,3 +148,85 @@ linux cmake libs:
-D FT_WITH_ZLIB=ON
cmake --build build --target install
# Linux test jobs
linux autotools test:
extends: '.test linux common'
script:
# Go to parent of current directory, to clone regressiontest and freetype-demos parallel to the repo
- cd ..
# Sometimes the cache works, sometimes not, so check if directories exist and remove them
- rm -rf regressiontest
- rm -rf freetype-demos
- git clone https://gitlab.freedesktop.org/thesarthakbhardwaj/regressiontest.git
- git clone https://gitlab.freedesktop.org/thesarthakbhardwaj/freetype-demos.git
# [TODO]: Merge regtest into master and remove this line
- cd regressiontest && git checkout regtest
- cd ..
# [TODO]: Fix ft-demos master and remove this line
- cd freetype-demos && git checkout devel
- cd ../freetype
# Check if upstream remote already exists, add it if it doesn't
- 'git remote -v | grep -w upstream || git remote add upstream https://gitlab.freedesktop.org/freetype/freetype.git'
- git remote set-url upstream https://gitlab.freedesktop.org/freetype/freetype.git
# Check out master branch to build base version of FreeType for comparison
- git fetch upstream master
- git checkout -B base --track upstream/master
- git reset --hard upstream/master
# Build FreeType
- git clean -fdx
- './autogen.sh > /dev/null 2>&1'
- './configure --disable-shared > /dev/null 2>&1'
- 'make -j$(nproc) > /dev/null 2>&1'
# Build Demos
- cd ../freetype-demos
- 'make -j$(nproc) > /dev/null 2>&1'
- 'make install > /dev/null 2>&1'
# Generate baseline files
- echo "Generating base files"
- cd ../regressiontest
- ./gen_base.sh
# Check out the last branch (for which the CI is running) and build FreeType
- cd ../freetype
- 'git checkout -'
# Build FreeType
- 'git clean -fdx > /dev/null 2>&1'
- './autogen.sh > /dev/null 2>&1'
- './configure --disable-shared > /dev/null 2>&1'
- 'make -j$(nproc) > /dev/null 2>&1'
# Build Demos
- cd ../freetype-demos
- 'git clean -fdx > /dev/null 2>&1'
- 'make -j$(nproc) > /dev/null 2>&1'
- 'make install > /dev/null 2>&1'
# Run tests
- echo "Running regression tests"
- cd ../regressiontest
- ./regression.sh
# Fail the job if regressions found
- >
if [ -f "report.tar.gz" ]; then
echo "Regressions Found"
mv report/ ../freetype
exit 1
else
echo "No regressions found"
fi
artifacts:
paths:
- report/
when: on_failure
expire_in: 1 week
......@@ -1035,7 +1035,7 @@ typedef ptrdiff_t FT_PtrDist;
/* each bisection predictably reduces deviation exactly 4-fold. */
/* Even 32-bit deviation would vanish after 16 bisections. */
draw = 1;
while ( dx > ONE_PIXEL / 4 )
while ( dx > ONE_PIXEL / 3 )
{
dx >>= 2;
draw <<= 1;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment