Skip to content

Commit 59d946e

Browse files
committed
Add windows workflow
1 parent e318be5 commit 59d946e

2 files changed

Lines changed: 254 additions & 0 deletions

File tree

‎.github/workflows/windows-x64.yml‎

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
name: Windows x64
2+
3+
on:
4+
push:
5+
branches: [ "**" ]
6+
pull_request:
7+
8+
jobs:
9+
build-debug:
10+
name: Build Debug
11+
runs-on: windows-latest
12+
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
with:
17+
path: repository
18+
submodules: recursive
19+
20+
- name: Clean submodules (Local)
21+
shell: pwsh
22+
run: |
23+
cd repository
24+
# Clean untracked files inside submodules
25+
git submodule foreach --recursive git reset --hard
26+
git submodule foreach --recursive git clean -fdx
27+
git submodule sync --recursive
28+
git submodule update --init --force --recursive
29+
30+
- name: Install packages
31+
run: |
32+
choco install -y cmake git zip unzip
33+
# You can install more packages if needed or set up your environment accordingly
34+
shell: cmd
35+
36+
- name: Install Premake5
37+
shell: pwsh
38+
run: |
39+
if (-Not (Test-Path premake-core)) {
40+
git clone --depth=1 https://github.com/premake/premake-core.git
41+
}
42+
cd premake-core
43+
# Build premake5 for Windows
44+
.\Bootstrap.bat vs2022
45+
# Move premake5 executable to repository root
46+
Move-Item .\bin\release\premake5.exe ..\repository\
47+
cd ..
48+
49+
- name: Initialize Premake
50+
shell: pwsh
51+
run: |
52+
cd repository
53+
.\premake5.exe vs2022
54+
env:
55+
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
56+
57+
- name: Build
58+
shell: pwsh
59+
run: |
60+
cd repository\build
61+
msbuild plugin_ljpatch64.sln /p:Configuration=Debug /p:Platform=x64
62+
cd ../..
63+
64+
- name: Upload Artifacts
65+
uses: actions/upload-artifact@v4
66+
with:
67+
name: debug_x64_windows
68+
path: repository\bin\x64\Debug\*
69+
if-no-files-found: warn
70+
71+
build-release:
72+
name: Build Release
73+
runs-on: windows-latest
74+
75+
steps:
76+
- name: Checkout repository
77+
uses: actions/checkout@v4
78+
with:
79+
path: repository
80+
submodules: recursive
81+
82+
- name: Clean submodules (Local)
83+
shell: pwsh
84+
run: |
85+
cd repository
86+
git submodule foreach --recursive git reset --hard
87+
git submodule foreach --recursive git clean -fdx
88+
git submodule sync --recursive
89+
git submodule update --init --force --recursive
90+
91+
- name: Install packages
92+
run: |
93+
choco install -y cmake git zip unzip
94+
shell: cmd
95+
96+
- name: Install Premake5
97+
shell: pwsh
98+
run: |
99+
if (-Not (Test-Path premake-core)) {
100+
git clone --depth=1 https://github.com/premake/premake-core.git
101+
}
102+
cd premake-core
103+
.\Bootstrap.bat vs2022
104+
Move-Item .\bin\release\premake5.exe ..\repository\
105+
cd ..
106+
107+
- name: Initialize Premake
108+
shell: pwsh
109+
run: |
110+
cd repository
111+
.\premake5.exe vs2022
112+
env:
113+
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
114+
115+
- name: Build Release
116+
shell: pwsh
117+
run: |
118+
cd repository\build
119+
msbuild plugin_ljpatch64.sln /p:Configuration=Release /p:Platform=x64
120+
cd ../..
121+
122+
- name: Upload Artifacts
123+
uses: actions/upload-artifact@v4
124+
with:
125+
name: release_x64_windows
126+
path: repository\bin\x64\Release\*
127+
if-no-files-found: warn

‎.github/workflows/windows-x86.yml‎

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
name: Windows x86
2+
3+
on:
4+
push:
5+
branches: [ "**" ]
6+
pull_request:
7+
8+
jobs:
9+
build-debug:
10+
name: Build Debug
11+
runs-on: windows-latest
12+
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
with:
17+
path: repository
18+
submodules: recursive
19+
20+
- name: Clean submodules (Local)
21+
shell: pwsh
22+
run: |
23+
cd repository
24+
# Clean untracked files inside submodules
25+
git submodule foreach --recursive git reset --hard
26+
git submodule foreach --recursive git clean -fdx
27+
git submodule sync --recursive
28+
git submodule update --init --force --recursive
29+
30+
- name: Install packages
31+
run: |
32+
choco install -y cmake git zip unzip
33+
# You can install more packages if needed or set up your environment accordingly
34+
shell: cmd
35+
36+
- name: Install Premake5
37+
shell: pwsh
38+
run: |
39+
if (-Not (Test-Path premake-core)) {
40+
git clone --depth=1 https://github.com/premake/premake-core.git
41+
}
42+
cd premake-core
43+
# Build premake5 for Windows
44+
.\Bootstrap.bat vs2022
45+
# Move premake5 executable to repository root
46+
Move-Item .\bin\release\premake5.exe ..\repository\
47+
cd ..
48+
49+
- name: Initialize Premake
50+
shell: pwsh
51+
run: |
52+
cd repository
53+
.\premake5.exe vs2022
54+
env:
55+
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
56+
57+
- name: Build
58+
shell: pwsh
59+
run: |
60+
cd repository\build
61+
msbuild plugin_ljpatch64.sln /p:Configuration=Debug /p:Platform=Win32
62+
cd ../..
63+
64+
- name: Upload Artifacts
65+
uses: actions/upload-artifact@v4
66+
with:
67+
name: debug_x86_windows
68+
path: repository\bin\x86\Debug\*
69+
if-no-files-found: warn
70+
71+
build-release:
72+
name: Build Release
73+
runs-on: windows-latest
74+
75+
steps:
76+
- name: Checkout repository
77+
uses: actions/checkout@v4
78+
with:
79+
path: repository
80+
submodules: recursive
81+
82+
- name: Clean submodules (Local)
83+
shell: pwsh
84+
run: |
85+
cd repository
86+
git submodule foreach --recursive git reset --hard
87+
git submodule foreach --recursive git clean -fdx
88+
git submodule sync --recursive
89+
git submodule update --init --force --recursive
90+
91+
- name: Install packages
92+
run: |
93+
choco install -y cmake git zip unzip
94+
shell: cmd
95+
96+
- name: Install Premake5
97+
shell: pwsh
98+
run: |
99+
if (-Not (Test-Path premake-core)) {
100+
git clone --depth=1 https://github.com/premake/premake-core.git
101+
}
102+
cd premake-core
103+
.\Bootstrap.bat vs2022
104+
Move-Item .\bin\release\premake5.exe ..\repository\
105+
cd ..
106+
107+
- name: Initialize Premake
108+
shell: pwsh
109+
run: |
110+
cd repository
111+
.\premake5.exe vs2022
112+
env:
113+
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
114+
115+
- name: Build Release
116+
shell: pwsh
117+
run: |
118+
cd repository\build
119+
msbuild plugin_ljpatch64.sln /p:Configuration=Release /p:Platform=Win32
120+
cd ../..
121+
122+
- name: Upload Artifacts
123+
uses: actions/upload-artifact@v4
124+
with:
125+
name: release_x86_windows
126+
path: repository\bin\x86\Release\*
127+
if-no-files-found: warn

0 commit comments

Comments
 (0)