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 Jun 18, 2024
1 parent 940bdf4 commit fde00e8
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 1 deletion.
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: bash
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 fde00e8

Please sign in to comment.