-
Notifications
You must be signed in to change notification settings - Fork 13
102 lines (92 loc) · 4.08 KB
/
cmake-release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
name: CMake-Release
on:
release:
types: [prereleased]
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
# The number of days to retain artifacts
RETENTION_DAYS: 30
jobs:
build-msvc:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Configure CMake MSVC
run: mkdir build && cd build && cmake .. -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build MSVC
run: |
cmake --build build --target GenerateEPKS
cmake --build build --config ${{env.BUILD_TYPE}}
- uses: actions/upload-artifact@v4
with:
name: edge-classic-msvc
path: |
autoload
docs
edge_base/*.epk
edge_fixes
soundfont
edge-classic.exe
*.dll
*.epk
CHANGELOG.md
retention-days: ${{env.RETENTION_DAYS}}
build-mingw:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Download w64devkit
run: invoke-webrequest https://github.com/skeeto/w64devkit/releases/download/v1.23.0/w64devkit-i686-1.23.0.zip -outfile ${{github.workspace}}\w64devkit.zip
- name: Extract w64devkit
run: expand-archive -path ${{github.workspace}}\w64devkit.zip -destinationpath ${{github.workspace}}
- name: Download SDL2-devel
run: invoke-webrequest https://github.com/libsdl-org/SDL/releases/download/release-2.30.6/SDL2-devel-2.30.6-mingw.zip -outfile ${{github.workspace}}\sdl2-devel.zip
- name: Extract SDL2-devel
run: expand-archive -path ${{github.workspace}}\sdl2-devel.zip -destinationpath ${{github.workspace}}
- name: Copy SDL2-devel contents to w64devkit
run: |
robocopy ${{github.workspace}}\SDL2-2.30.6\i686-w64-mingw32 ${{github.workspace}}\w64devkit\i686-w64-mingw32 /s ; if ($lastexitcode -lt 8) { $global:LASTEXITCODE = $null }
robocopy ${{github.workspace}}\SDL2-2.30.6\i686-w64-mingw32 ${{github.workspace}}\w64devkit /s ; if ($lastexitcode -lt 8) { $global:LASTEXITCODE = $null }
- name: Set environment variables and build
run: |
$env:Path = "${{github.workspace}}\w64devkit\bin;" + $env:Path
cmake -B build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_CXX_FLAGS="-isystem ${{github.workspace}}\w64devkit\include" -G "MinGW Makefiles"
cmake --build build --target GenerateEPKS
cmake --build build --config ${{env.BUILD_TYPE}}
strip ${{github.workspace}}\edge-classic.exe
- name: Copy SDL2 DLL
run: copy-item -path ${{github.workspace}}\SDL2-2.30.6\i686-w64-mingw32\bin\SDL2.dll -destination ${{github.workspace}}
- uses: actions/upload-artifact@v4
with:
name: edge-classic-mingw
path: |
autoload
docs
edge_base/*.epk
edge_fixes
soundfont
edge-classic.exe
*.dll
*.epk
CHANGELOG.md
retention-days: ${{env.RETENTION_DAYS}}
build-web-player:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: mymindstorm/setup-emsdk@v14
with:
version: latest
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_TOOLCHAIN_FILE="${EMSDK}/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake"
- name: Setup Preloads
run: git clone https://github.com/edge-classic/web-player-wads ${{github.workspace}}/web-player-wads && cp ${{github.workspace}}/web-player-wads/freedoom/freedoom2.wad ${{github.workspace}}/web/preload/ && cp ${{github.workspace}}/web-player-wads/blasphemer/blasphem.wad ${{github.workspace}}/web/preload/
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- uses: actions/upload-artifact@v4
with:
name: edge-classic-web-player
path: |
${{github.workspace}}/web/site
retention-days: ${{env.RETENTION_DAYS}}