Skip to content

Simplify Qt version handling. #5

Simplify Qt version handling.

Simplify Qt version handling. #5

name: premake5-qt-ubuntu-gmake
on:
workflow_dispatch:
push:
paths:
- 'projects-qt/project-*/**'
- '.github/workflows/premake5-qt-ubuntu-gmake.yml'
- '.github/actions/install-premake5/action.yml'
- '!**/*.md'
- '!projects-qt/**/unsupported_by_*'
- '!**/premake4.lua'
- 'projects-qt/**/unsupported_by_gmake'
- 'projects-qt/**/unsupported_by_premake5_gmake'
- 'submodules/premake-qt'
pull_request:
paths:
- 'projects-qt/project-*/**'
- '.github/workflows/premake5-qt-ubuntu-gmake.yml'
- '.github/actions/install-premake5/action.yml'
- '!**/*.md'
- '!projects-qt/**/unsupported_by_*'
- '!**/premake4.lua'
- 'projects-qt/**/unsupported_by_gmake'
- 'projects-qt/**/unsupported_by_premake5_gmake'
- 'submodules/premake-qt'
jobs:
linux:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
qt-version: ['5.15.0', '6.0.4']
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: install premake5
uses: ./.github/actions/install-premake5
with:
repository: premake/premake-core
- name: make --version
run: make --version
- name: Installing Qt${{matrix.qt-version}} ubuntu
uses: jurplel/install-qt-action@v4
with:
version: ${{matrix.qt-version}}
cache: true
cache-key-prefix: 'qt-action@v4-Qt${{matrix.qt-version}}_ubuntu'
- name: set path
run: |
echo PATH=$PATH:`pwd`
echo PATH=$PATH:`pwd` >> $GITHUB_ENV
echo QT_DIR=$QT_ROOT_DIR
echo QT_DIR=$QT_ROOT_DIR >> $GITHUB_ENV
- name: install libxkbcommon-x11-0 # display dependency
run: sudo apt-get install libxkbcommon-x11-0
- name: test projects
timeout-minutes: 5 # tends to not stop properly in case of failure
run: | # fake X-server as Qt widget requires displays :/
# Cannot use environment variable ($QT_ROOT_DIR ) in command line, so use environment variable (QT_DIR) or its hardcoded value
#--qt-root=/home/runner/work/premake-sample-projects/Qt/5.15.0/gcc_64
xvfb-run -a python3 ./test_projects.py premake5 projects-qt gmake --qt-version=${{ matrix.qt-version }}