Skip to content

Commit 20f5e87

Browse files
committed
Update Github Actions workflow
1 parent cda0a6a commit 20f5e87

1 file changed

Lines changed: 52 additions & 6 deletions

File tree

.github/workflows/build-on-release.yml

Lines changed: 52 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,31 @@ jobs:
1616
os:
1717
- ubuntu-20.04
1818
- windows-latest
19+
target_arch:
20+
- x86
21+
- x86_64
1922
include:
20-
- meta_branch: "1.11-dev"
21-
sm_branch: "1.11-dev"
23+
- meta_branch: "master"
24+
sm_branch: "master"
2225
spcomp_version: "1.11.x"
2326

2427
- os: ubuntu-20.04
28+
target_arch: x86
2529
os_short: linux
26-
package_ext: tar.gz
30+
31+
- os: ubuntu-20.04
32+
target_arch: x86_64
33+
os_short: linux64
2734

2835
- os: windows-latest
36+
target_arch: x86
2937
os_short: win
30-
package_ext: zip
38+
vs_dev_arch: x86
39+
40+
- os: windows-latest
41+
target_arch: x86_64
42+
os_short: win64
43+
vs_dev_arch: x64
3144

3245
steps:
3346
- name: Prepare env
@@ -54,7 +67,7 @@ jobs:
5467
run: |
5568
:: See https://github.com/microsoft/vswhere/wiki/Find-VC
5669
for /f "usebackq delims=*" %%i in (`vswhere -latest -property installationPath`) do (
57-
call "%%i"\Common7\Tools\vsdevcmd.bat -arch=x86 -host_arch=x64
70+
call "%%i"\Common7\Tools\vsdevcmd.bat -arch=${{ matrix.vs_dev_arch }} -host_arch=x64
5871
)
5972
6073
:: Loop over all environment variables and make them global.
@@ -110,8 +123,41 @@ jobs:
110123
run: |
111124
mkdir build
112125
cd build
113-
python3 ../configure.py --sm-path="${{ github.workspace }}/sourcemod" --mms-path="${{ github.workspace }}/mmsource" --symbol-files --enable-optimize
126+
python3 ../configure.py --sm-path="${{ github.workspace }}/sourcemod" --mms-path="${{ github.workspace }}/mmsource" --symbol-files --enable-optimize --targets ${{ matrix.target_arch }}
114127
ambuild
128+
- name: Upload Build Artifact
129+
id: upload-build-artifact
130+
uses: actions/upload-artifact@v4
131+
with:
132+
name: ${{ matrix.os_short }}-${{ matrix.target_arch }}
133+
path: src/build/package
134+
135+
combine_packages:
136+
name: Upload assets for for ${{ matrix.os_short }}
137+
needs: [build]
138+
runs-on: ${{ matrix.os }}
139+
140+
strategy:
141+
fail-fast: false
142+
matrix:
143+
os:
144+
- ubuntu-20.04
145+
- windows-latest
146+
include:
147+
- os: ubuntu-20.04
148+
os_short: linux
149+
package_ext: .tar.gz
150+
- os: windows-latest
151+
os_short: win
152+
package_ext: zip
153+
154+
steps:
155+
- name: Download Build Artifacts
156+
uses: actions/download-artifact@v4
157+
with:
158+
path: src/build/package
159+
pattern: ${{ matrix.os_short }}*
160+
merge-multiple: true
115161

116162
- name: Build Package (Windows)
117163
if: runner.os == 'Windows'

0 commit comments

Comments
 (0)