Skip to content

Add windows workflow #1

Add windows workflow

Add windows workflow #1

Workflow file for this run

name: Windows x86
on:
push:
branches: [ "**" ]
pull_request:
jobs:
build-debug:
name: Build Debug
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
path: repository
submodules: recursive
- name: Clean submodules (Local)
shell: pwsh
run: |
cd repository
# Clean untracked files inside submodules
git submodule foreach --recursive git reset --hard
git submodule foreach --recursive git clean -fdx
git submodule sync --recursive
git submodule update --init --force --recursive
- name: Install packages
run: |
choco install -y cmake git zip unzip
# You can install more packages if needed or set up your environment accordingly
shell: cmd
- name: Install Premake5
shell: pwsh
run: |
if (-Not (Test-Path premake-core)) {
git clone --depth=1 https://github.com/premake/premake-core.git
}
cd premake-core
# Build premake5 for Windows
.\Bootstrap.bat vs2022
# Move premake5 executable to repository root
Move-Item .\bin\release\premake5.exe ..\repository\
cd ..
- name: Initialize Premake
shell: pwsh
run: |
cd repository
.\premake5.exe vs2022
env:
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
- name: Build
shell: pwsh
run: |
cd repository\build
msbuild plugin_ljpatch64.sln /p:Configuration=Debug /p:Platform=Win32
cd ../..
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: debug_x86_windows
path: repository\bin\x86\Debug\*
if-no-files-found: warn
build-release:
name: Build Release
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
path: repository
submodules: recursive
- name: Clean submodules (Local)
shell: pwsh
run: |
cd repository
git submodule foreach --recursive git reset --hard
git submodule foreach --recursive git clean -fdx
git submodule sync --recursive
git submodule update --init --force --recursive
- name: Install packages
run: |
choco install -y cmake git zip unzip
shell: cmd
- name: Install Premake5
shell: pwsh
run: |
if (-Not (Test-Path premake-core)) {
git clone --depth=1 https://github.com/premake/premake-core.git
}
cd premake-core
.\Bootstrap.bat vs2022
Move-Item .\bin\release\premake5.exe ..\repository\
cd ..
- name: Initialize Premake
shell: pwsh
run: |
cd repository
.\premake5.exe vs2022
env:
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
- name: Build Release
shell: pwsh
run: |
cd repository\build
msbuild plugin_ljpatch64.sln /p:Configuration=Release /p:Platform=Win32
cd ../..
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: release_x86_windows
path: repository\bin\x86\Release\*
if-no-files-found: warn