Skip to content

Commit

Permalink
[CI]: Add premake5-windows-cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarod42 committed Jul 17, 2024
1 parent 352d09d commit 22fb76e
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 16 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/premake5-windows-cmake.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: premake5-windows-cmake

on:
workflow_dispatch:
push:
paths:
- 'projects/project-*/**'
- '.github/workflows/premake5-windows-cmake.yml'
- '.github/actions/install-premake5/action.yml'
- '!**/*.md'
- '!projects/**/unsupported_by_*'
- '!**/premake4.lua'
- 'projects/**/unsupported_by_cmake'
- 'projects/**/unsupported_by_cmake_windows'
- 'projects/**/unsupported_by_premake5_cmake'
- 'submodules/premake-cmake'

pull_request:
paths:
- 'projects/project-*/**'
- '.github/workflows/premake5-windows-cmake.yml'
- '.github/actions/install-premake5/action.yml'
- '!**/*.md'
- '!projects/**/unsupported_by_*'
- '!**/premake4.lua'
- 'projects/**/unsupported_by_cmake'
- 'projects/**/unsupported_by_cmake_windows'
- 'projects/**/unsupported_by_premake5_cmake'
- 'submodules/premake-cmake'

jobs:
windows:
runs-on: windows-latest

steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive

- name: install premake5
uses: ./.github/actions/install-premake5
with:
msdev: vs2022
repository: premake/premake-core

- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2

- name: cmake --version
run: cmake --version

- name: add premake cmake module
run: |
echo "require 'submodules/premake-cmake/cmake'" >> premake-system.lua
- name: test projects
run: PATH=$PATH:`pwd` python3 ./test_projects.py premake5 projects cmake --shell=posix
shell: bash
31 changes: 16 additions & 15 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Sample projects for integration testing [premake4/premake5](https://premake.gith

||gmake|gmake2|Codelite|Msvc vs2019|Msvc vs2022|xcode4|CodeBlocks|CMake|Ninja|qmake|
|:---|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
||![Premake5 ubuntu gmake badge][1]|![Premake5 ubuntu gmake2 badge][2]![Premake5 windows gmake2 badge][3]|![Premake5 ubuntu codelite badge][4]|![Premake5 windows msvc 2019 badge][5]|![Premake5 windows msvc 2022 badge][6]|![Premake5 mac_xcode4 badge][7]|![Premake5 ubuntu codeblocks badge][8]|![Premake5 ubuntu cmake badge][9]|![Premake5 ubuntu ninja badge][10]![Premake5 window ninja badge][11]|![Premake5 ubuntu qmake badge][12]|
||![Premake5 ubuntu gmake badge][1]|![Premake5 ubuntu gmake2 badge][2]![Premake5 windows gmake2 badge][3]|![Premake5 ubuntu codelite badge][4]|![Premake5 windows msvc 2019 badge][5]|![Premake5 windows msvc 2022 badge][6]|![Premake5 mac_xcode4 badge][7]|![Premake5 ubuntu codeblocks badge][8]|![Premake5 ubuntu cmake badge][9]![Premake5 ubuntu cmake badge][10]|![Premake5 ubuntu ninja badge][11]![Premake5 window ninja badge][12]|![Premake5 ubuntu qmake badge][13]|
|[`location`](https://premake.github.io/docs/location)|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:[^project_location]|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:grey_question:|
|[`targetdir`](https://premake.github.io/docs/targetdir)|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|
|[`targetname`](https://premake.github.io/docs/targetname)|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|
Expand Down Expand Up @@ -60,7 +60,7 @@ Sample projects for integration testing [premake4/premake5](https://premake.gith

||gmake|gmake2|Codelite|Msvc vs2019|Msvc vs2022|xcode4|CodeBlocks|CMake|Ninja|qmake[^qmake_premake_qt_incompatible]|
|:---|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
||![qt gmake badge][13]|![qt gmake2 badge][14]|![qt Codelite badge][15]|![qt msvc badge][16]|![qt msvc badge][17]|![qt xcode badge][18]|![qt codeblocks badge][19]|![qt cmake badge][20]|![qt ninja badge][21]|![qt qmake badge][22]|
||![qt gmake badge][20]|![qt gmake2 badge][21]|![qt Codelite badge][22]|![qt msvc badge][23]|![qt msvc badge][24]|![qt xcode badge][25]|![qt codeblocks badge][26]|![qt cmake badge][27]|![qt ninja badge][28]|![qt qmake badge][29]|
|basic|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|
|moc|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:[^codeblocks_fileconfig_per_config]|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|
|qrc|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:[^codeblocks_fileconfig_per_config]|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|
Expand All @@ -76,20 +76,21 @@ Sample projects for integration testing [premake4/premake5](https://premake.gith
[7]:https://github.com/Jarod42/premake-sample-projects/actions/workflows/premake5-mac-xcode4.yml/badge.svg
[8]:https://github.com/Jarod42/premake-sample-projects/actions/workflows/premake5-ubuntu-codeblocks.yml/badge.svg
[9]:https://github.com/Jarod42/premake-sample-projects/actions/workflows/premake5-ubuntu-cmake.yml/badge.svg
[10]:https://github.com/Jarod42/premake-sample-projects/actions/workflows/premake5-ubuntu-ninja.yml/badge.svg
[11]:https://github.com/Jarod42/premake-sample-projects/actions/workflows/premake5-windows-ninja.yml/badge.svg
[12]:https://github.com/Jarod42/premake-sample-projects/actions/workflows/premake5-ubuntu-qmake.yml/badge.svg
[10]:https://github.com/Jarod42/premake-sample-projects/actions/workflows/premake5-windows-cmake.yml/badge.svg
[11]:https://github.com/Jarod42/premake-sample-projects/actions/workflows/premake5-ubuntu-ninja.yml/badge.svg
[12]:https://github.com/Jarod42/premake-sample-projects/actions/workflows/premake5-windows-ninja.yml/badge.svg
[13]:https://github.com/Jarod42/premake-sample-projects/actions/workflows/premake5-ubuntu-qmake.yml/badge.svg

[13]:https://github.com/Jarod42/premake-sample-projects/actions/workflows/premake5-qt-ubuntu-gmake.yml/badge.svg
[14]:https://github.com/Jarod42/premake-sample-projects/actions/workflows/premake5-qt-ubuntu-gmake2.yml/badge.svg
[15]:https://github.com/Jarod42/premake-sample-projects/actions/workflows/premake5-qt-ubuntu-codelite.yml/badge.svg
[16]:https://github.com/Jarod42/premake-sample-projects/actions/workflows/premake5-qt-windows-msvc-2019.yml/badge.svg
[17]:https://github.com/Jarod42/premake-sample-projects/actions/workflows/premake5-qt-windows-msvc-2022.yml/badge.svg
[18]:https://github.com/Jarod42/premake-sample-projects/actions/workflows/premake5-qt-mac-xcode4.yml/badge.svg
[19]:https://github.com/Jarod42/premake-sample-projects/actions/workflows/premake5-qt-ubuntu-codeblocks.yml/badge.svg
[20]:https://github.com/Jarod42/premake-sample-projects/actions/workflows/premake5-qt-ubuntu-cmake.yml/badge.svg
[21]:https://github.com/Jarod42/premake-sample-projects/actions/workflows/premake5-qt-ubuntu-ninja.yml/badge.svg
[22]:https://github.com/Jarod42/premake-sample-projects/actions/workflows/premake5-qt-ubuntu-qmake.yml/badge.svg
[20]:https://github.com/Jarod42/premake-sample-projects/actions/workflows/premake5-qt-ubuntu-gmake.yml/badge.svg
[21]:https://github.com/Jarod42/premake-sample-projects/actions/workflows/premake5-qt-ubuntu-gmake2.yml/badge.svg
[22]:https://github.com/Jarod42/premake-sample-projects/actions/workflows/premake5-qt-ubuntu-codelite.yml/badge.svg
[23]:https://github.com/Jarod42/premake-sample-projects/actions/workflows/premake5-qt-windows-msvc-2019.yml/badge.svg
[24]:https://github.com/Jarod42/premake-sample-projects/actions/workflows/premake5-qt-windows-msvc-2022.yml/badge.svg
[25]:https://github.com/Jarod42/premake-sample-projects/actions/workflows/premake5-qt-mac-xcode4.yml/badge.svg
[26]:https://github.com/Jarod42/premake-sample-projects/actions/workflows/premake5-qt-ubuntu-codeblocks.yml/badge.svg
[27]:https://github.com/Jarod42/premake-sample-projects/actions/workflows/premake5-qt-ubuntu-cmake.yml/badge.svg
[28]:https://github.com/Jarod42/premake-sample-projects/actions/workflows/premake5-qt-ubuntu-ninja.yml/badge.svg
[29]:https://github.com/Jarod42/premake-sample-projects/actions/workflows/premake5-qt-ubuntu-qmake.yml/badge.svg

[^untested_by_ci]: Not tested by the CI even if projects uses them.
[^project_location]: project location != workspace/solution location unsupported though.
Expand Down
Empty file.
Empty file.
2 changes: 1 addition & 1 deletion test_projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def run_cmake():
if ret.returncode != 0:
print('CMake first stage fails', flush=True)
return ret.returncode
return subprocess.run(['cmake', '--build', '.', '--target', 'app']).returncode
return subprocess.run(['cmake', '--build', '.', '--target', 'app', '--config', 'Release']).returncode

def run_codeblocks():
# require X11/graphical terminal :-/
Expand Down

0 comments on commit 22fb76e

Please sign in to comment.