Github Actions: many minor updates
+ Add Ubuntu-20.04 Github Actions runner + Use as many system libraries as possible on all platforms except Windows + Checkout the git repository into a directory named "source", so that it's possible to checkout more repositories in the future + Configure with install prefix set to a temporary path, it will be used for uploading binary artifacts in the future + Configure with -pkg-config instead of -feature-pkg-config; this was the traditional way and it works for cmake now + Split long lines using double quotes instead of backslashes, makes the yaml file more readable and does not leak backslashes into the command line + Adjust cache to work in multiple branches, provided that the environment variables at the top of the file are set correctly + Do not let homebrew waste time cleaning up + Print logfiles in case of failure + Typos and other minor fixes. Pick-to: 6.0 Change-Id: I1ac8afebbdbea50549a334c07b8b3117a823f0fe Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
parent
e4194b6f9e
commit
a0aaa4ae2e
56
.github/workflows/ninja-build.yml
vendored
56
.github/workflows/ninja-build.yml
vendored
@ -3,7 +3,7 @@
|
|||||||
# The goal of this workflow is to finish as fast as possible. Therefore some
|
# The goal of this workflow is to finish as fast as possible. Therefore some
|
||||||
# choices have been made:
|
# choices have been made:
|
||||||
# - no optimizations
|
# - no optimizations
|
||||||
# - link to system-provided libraries instead of bulding
|
# - link to system-provided libraries instead of building
|
||||||
# bundled 3rd party libraries
|
# bundled 3rd party libraries
|
||||||
# - ccache
|
# - ccache
|
||||||
|
|
||||||
@ -11,6 +11,10 @@ name: Smoke build
|
|||||||
|
|
||||||
on: push
|
on: push
|
||||||
|
|
||||||
|
env:
|
||||||
|
BRANCH: dev
|
||||||
|
BRANCH_REF: refs/heads/dev
|
||||||
|
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
shell: bash
|
shell: bash
|
||||||
@ -22,19 +26,28 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- name: ubuntu-18.04
|
- name: ubuntu-20.04
|
||||||
os: ubuntu-18.04
|
os: ubuntu-20.04
|
||||||
deps: libgl-dev libglu-dev libpcre2-dev libz-dev libfreetype6-dev libpng-dev libjpeg-dev libsqlite3-dev
|
# NOTE: system libmd4c is not detected
|
||||||
|
deps: libgl-dev libglu-dev 'libxcb*-dev' libx11-xcb-dev libxkbcommon-x11-dev libpcre2-dev libz-dev libfreetype6-dev libpng-dev libjpeg-dev libsqlite3-dev libharfbuzz-dev libb2-dev libdouble-conversion-dev libmd4c-dev
|
||||||
tools: ninja-build ccache
|
tools: ninja-build ccache
|
||||||
install_cmd: sudo apt-get -y install
|
install_cmd: sudo apt-get -y install
|
||||||
configure_flags: -system-sqlite -system-pcre -system-zlib -system-freetype -system-libpng -system-libjpeg
|
configure_flags: -xcb -system-sqlite -system-pcre -system-zlib -system-freetype -system-libpng -system-libjpeg -system-harfbuzz -system-libb2 -system-doubleconversion -system-libmd4c
|
||||||
|
- name: ubuntu-18.04
|
||||||
|
os: ubuntu-18.04
|
||||||
|
# NOTE: system libb2 is not detected because version < 0.98.1 lacks pkg-config module
|
||||||
|
# NOTE: system libharfbuzz is not detected because system has old version
|
||||||
|
deps: libgl-dev libglu-dev 'libxcb*-dev' libx11-xcb-dev libxkbcommon-x11-dev libpcre2-dev libz-dev libfreetype6-dev libpng-dev libjpeg-dev libsqlite3-dev libharfbuzz-dev libb2-dev libdouble-conversion-dev
|
||||||
|
tools: ninja-build ccache
|
||||||
|
install_cmd: sudo apt-get -y install
|
||||||
|
configure_flags: -xcb -system-sqlite -system-pcre -system-zlib -system-freetype -system-libpng -system-libjpeg -system-harfbuzz -system-libb2 -system-doubleconversion
|
||||||
- name: macos-10.15
|
- name: macos-10.15
|
||||||
os: macos-10.15
|
os: macos-10.15
|
||||||
deps: jpeg sqlite
|
deps: jpeg sqlite libpng pcre2 harfbuzz freetype libb2 double-conversion
|
||||||
tools: ninja ccache pkg-config
|
tools: ninja ccache pkg-config
|
||||||
install_cmd: brew install
|
install_cmd: HOMEBREW_NO_INSTALL_CLEANUP=1 brew install
|
||||||
# Specifically on macOS pkg_config has to be manually turned on otherwise libraries under /usr/local are not detected.
|
# Specifically on macOS pkg_config has to be manually turned on otherwise libraries under /usr/local are not detected.
|
||||||
configure_flags: -feature-pkg-config -system-sqlite -system-libjpeg
|
configure_flags: -pkg-config -system-sqlite -system-pcre -system-zlib -system-freetype -system-libpng -system-libjpeg -system-harfbuzz -system-libb2 -system-doubleconversion
|
||||||
- name: windows-2019
|
- name: windows-2019
|
||||||
os: windows-2019
|
os: windows-2019
|
||||||
install_cmd: choco install
|
install_cmd: choco install
|
||||||
@ -44,7 +57,7 @@ jobs:
|
|||||||
# ccache installed separately later in order to force version
|
# ccache installed separately later in order to force version
|
||||||
tools: ninja
|
tools: ninja
|
||||||
# We don't want the system headers / libraries from Strawberry Perl while compiling with MinGW 8.1.0
|
# We don't want the system headers / libraries from Strawberry Perl while compiling with MinGW 8.1.0
|
||||||
configure_flags: -qt-sqlite -qt-pcre -qt-zlib -qt-freetype -qt-libpng -qt-libjpeg -no-feature-sql-psql -no-feature-sql-mysql -no-feature-sql-odbc
|
configure_flags: -qt-sqlite -qt-pcre -qt-zlib -qt-freetype -qt-libpng -qt-libjpeg -qt-harfbuzz -no-feature-sql-psql -no-feature-sql-mysql -no-feature-sql-odbc
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
|
|
||||||
@ -53,6 +66,9 @@ jobs:
|
|||||||
- name: prepare Linux
|
- name: prepare Linux
|
||||||
if: runner.os == 'Linux'
|
if: runner.os == 'Linux'
|
||||||
run: sudo apt-get update
|
run: sudo apt-get update
|
||||||
|
- name: prepare macOS
|
||||||
|
if: runner.os == 'macOS'
|
||||||
|
run: echo noop
|
||||||
- name: prepare Windows
|
- name: prepare Windows
|
||||||
if: runner.os == 'Windows'
|
if: runner.os == 'Windows'
|
||||||
# Header pthread.h from postgres is included and creates issues.
|
# Header pthread.h from postgres is included and creates issues.
|
||||||
@ -62,6 +78,8 @@ jobs:
|
|||||||
choco install ccache --version 3.7.12 --yes --no-progress --not-silent --verbose --debug
|
choco install ccache --version 3.7.12 --yes --no-progress --not-silent --verbose --debug
|
||||||
|
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
path: source
|
||||||
|
|
||||||
- name: restore ccache
|
- name: restore ccache
|
||||||
id: ccache
|
id: ccache
|
||||||
@ -76,6 +94,7 @@ jobs:
|
|||||||
# and restore the most recent cache.
|
# and restore the most recent cache.
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
ccache-${{ matrix.os }}-${{ github.ref }}-
|
ccache-${{ matrix.os }}-${{ github.ref }}-
|
||||||
|
ccache-${{ matrix.os }}-${{ env.BRANCH_REF }}-
|
||||||
ccache-${{ matrix.os }}-refs/heads/dev-
|
ccache-${{ matrix.os }}-refs/heads/dev-
|
||||||
ccache-${{ matrix.os }}-
|
ccache-${{ matrix.os }}-
|
||||||
|
|
||||||
@ -105,10 +124,10 @@ jobs:
|
|||||||
run: mkdir build
|
run: mkdir build
|
||||||
- name: configure
|
- name: configure
|
||||||
working-directory: build
|
working-directory: build
|
||||||
run: ../configure -cmake -opensource -confirm-license -ccache -no-pch \
|
run: "../source/configure -cmake -opensource -confirm-license -ccache -no-pch
|
||||||
\ -debug -nomake tests -nomake examples \
|
-debug -nomake tests -nomake examples
|
||||||
\ -qt-harfbuzz \
|
-prefix '${{ runner.temp }}'/install_dir
|
||||||
\ ${{ matrix.configure_flags }}
|
${{ matrix.configure_flags }}"
|
||||||
- name: ninja
|
- name: ninja
|
||||||
working-directory: build
|
working-directory: build
|
||||||
run: ninja
|
run: ninja
|
||||||
@ -119,3 +138,14 @@ jobs:
|
|||||||
ccache -s
|
ccache -s
|
||||||
ccache -x 2>/dev/null || true
|
ccache -x 2>/dev/null || true
|
||||||
ccache -z
|
ccache -z
|
||||||
|
|
||||||
|
- name: print logfiles and other info in case of failure
|
||||||
|
if: ${{ failure() }}
|
||||||
|
run: |
|
||||||
|
echo ==== CMakeOutput.log ====
|
||||||
|
cat build/CMakeFiles/CMakeOutput.log
|
||||||
|
echo
|
||||||
|
echo ==== CMakeError.log ====
|
||||||
|
cat build/CMakeFiles/CMakeError.log
|
||||||
|
echo ==== CMakeCache.txt ====
|
||||||
|
cat build/CMakeCache.txt
|
||||||
|
Loading…
x
Reference in New Issue
Block a user