refactor!: Replace premake5 with CMake. (#551)

Co-authored-by: tupoy-ya <tupoy-ya@users.noreply.github.com>
This commit is contained in:
tupoy-ya
2022-11-08 21:08:58 +00:00
committed by GitHub
parent 146c2b8ce8
commit 1087146e56
340 changed files with 19298 additions and 19449 deletions

View File

@ -11,32 +11,27 @@ jobs:
with:
submodules: recursive
- name: Setup premake
uses: abel0b/setup-premake@v2
with:
version: "5.0.0-beta1"
- name: Check CMake version
run: cmake --version
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.1
- name: Generate premake5 project
run: premake5 vs2019
shell: bash
- name: Generate CMake project
run: cmake -S. -Bbuild -G "Visual Studio 17 2022" -DCMAKE_CONFIGURATION_TYPES=Release
- name: Build 64bit release DLL
run: |
msbuild /p:Configuration=Release /p:Platform=x64 BigBaseV2.sln -m /warnaserror
run: cmake --build build --config Release --target ALL_BUILD
- name: Check if DLL got built
run: if (-Not (Test-Path -path "bin/Release/BigBaseV2.dll")) {throw 1}
run: if (-Not (Test-Path -path "build/Release/YimMenu.dll")) {throw 1}
- name: Rename DLL to YimMenu-dev-{GITHUB_SHA}.dll
run: ren BigBaseV2.dll YimMenu-dev-${{github.sha}}.dll
working-directory: bin/Release/
run: ren YimMenu.dll YimMenu-dev-${{github.sha}}.dll
working-directory: build/Release/
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: binary
path: |
bin/Release/YimMenu-dev-*.dll
path: build/Release/YimMenu-dev-*.dll