Merge pull request #5 from Jarod42/dependabot/github_actions/github-a… #78
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: premake5-qt-ubuntu-cmake | |
| on: | |
| workflow_dispatch: | |
| push: | |
| paths: | |
| - 'projects-qt/**' | |
| - '.github/workflows/premake5-qt-ubuntu-cmake.yml' | |
| - '.github/actions/install-premake5/action.yml' | |
| - '!**/*.md' | |
| - '!projects-qt/**/unsupported_by_*' | |
| - '!**/premake4.lua' | |
| - 'projects-qt/**/unsupported_by_cmake' | |
| - 'projects-qt/**/unsupported_by_premake5_cmake' | |
| - 'submodules/premake-cmake' | |
| - 'submodules/premake-qt' | |
| pull_request: | |
| paths: | |
| - 'projects-qt/**' | |
| - '.github/workflows/premake5-qt-ubuntu-cmake.yml' | |
| - '.github/actions/install-premake5/action.yml' | |
| - '!**/*.md' | |
| - '!projects-qt/**/unsupported_by_*' | |
| - '!**/premake4.lua' | |
| - 'projects-qt/**/unsupported_by_cmake' | |
| - 'projects-qt/**/unsupported_by_premake5_cmake' | |
| - 'submodules/premake-cmake' | |
| - 'submodules/premake-qt' | |
| jobs: | |
| linux: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| qt-version: ['5.15.0', '6.0.4', '6.1.0', '6.7.0'] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| with: | |
| submodules: recursive | |
| - name: install premake5 | |
| uses: ./.github/actions/install-premake5 | |
| with: | |
| repository: premake/premake-core | |
| - name: cmake --version | |
| run: cmake --version | |
| - name: add premake cmake module | |
| run: | | |
| echo "require 'submodules/premake-cmake/cmake'" >> premake-system.lua | |
| - 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 environment variable | |
| run: | | |
| echo QT_DIR=$QT_ROOT_DIR | |
| echo QT_DIR=$QT_ROOT_DIR >> $GITHUB_ENV | |
| #--qt-root=/home/runner/work/premake-sample-projects/Qt/5.15.0/gcc_64 | |
| - 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 | |
| xvfb-run -a python3 ./test_projects.py premake5 projects-qt cmake --scripts=`pwd` --qt-version=${{ matrix.qt-version }} |