-
Notifications
You must be signed in to change notification settings - Fork 0
133 lines (128 loc) · 3.87 KB
/
win-build.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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
name: Build on Windows
on:
push:
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Download FFmpeg binaries
uses: robinraju/release-downloader@v1.10
with:
repository: BtbN/FFmpeg-Builds
latest: true
fileName: ffmpeg-n7*-win64-lgpl-shared*.zip
out-file-path: ffmpeg-binary
extract: true
- name: Download sdl2
uses: robinraju/release-downloader@v1.10
with:
repository: libsdl-org/SDL
latest: true
fileName: '*win*x64*.zip'
out-file-path: sdl2-binary
extract: true
- name: Download sdl2-mixer
uses: robinraju/release-downloader@v1.10
with:
repository: libsdl-org/SDL_mixer
latest: true
fileName: '*win*x64*.zip'
out-file-path: sdl2-mixer-binary
extract: true
- name: Download sdl2-ttf
uses: robinraju/release-downloader@v1.10
with:
repository: libsdl-org/SDL_ttf
latest: true
fileName: '*win*x64*.zip'
out-file-path: sdl2-ttf-binary
extract: true
- name: Download sdl2-image
uses: robinraju/release-downloader@v1.10
with:
repository: libsdl-org/SDL_image
latest: true
fileName: '*win*x64*.zip'
out-file-path: sdl2-image-binary
extract: true
- name: Download sdl2 dev files
uses: robinraju/release-downloader@v1.10
with:
repository: libsdl-org/SDL
latest: true
fileName: '*devel*VC*.zip'
out-file-path: sdl2-dev
extract: true
- name: Download sdl2-mixer
uses: robinraju/release-downloader@v1.10
with:
repository: libsdl-org/SDL_mixer
latest: true
fileName: '*devel*VC*.zip'
out-file-path: sdl2-mixer-dev
extract: true
- name: Download sdl2-ttf
uses: robinraju/release-downloader@v1.10
with:
repository: libsdl-org/SDL_ttf
latest: true
fileName: '*devel*VC*.zip'
out-file-path: sdl2-ttf-dev
extract: true
- name: Download sdl2-image
uses: robinraju/release-downloader@v1.10
with:
repository: libsdl-org/SDL_image
latest: true
fileName: '*devel*VC*.zip'
out-file-path: sdl2-image-dev
extract: true
- name: Copy sdl2 library files
run: |
mkdir sdl2-libs
copy sdl2-binary/*.dll sdl2-libs
copy sdl2-mixer-binary/*.dll sdl2-libs
copy sdl2-mixer-binary/optional/*.dll sdl2-libs
copy sdl2-image-binary/*.dll sdl2-libs
copy sdl2-image-binary/optional/*.dll sdl2-libs
copy sdl2-ttf-binary/*.dll sdl2-libs
Get-ChildItem -Recurse sdl2-libs
- name: Copy sdl2 development files
run: |
mkdir sdl2-dev-libs
cd sdl2-dev/SDL2*
copy lib/x64/*.dll sdl2-libs
copy lib/x64/*.lib sdl2-libs
cd ../../sdl2-mixer-dev/SDL2*
copy lib/x64/*.dll sdl2-libs
copy lib/x64/optional/*.dll sdl2-libs
copy lib/x64/*.lib sdl2-libs
copy lib/x64/optional/*.lib sdl2-libs
cd ../../sdl2-image-dev/SDL2*
copy lib/x64/*.dll sdl2-libs
copy lib/x64/optional/*.dll sdl2-libs
copy lib/x64/*.lib sdl2-libs
copy lib/x64/optional/*.lib sdl2-libs
cd ../../sdl2-ttf-dev/SDL2*
copy lib/x64/*.dll sdl2-libs
copy lib/x64/*.lib sdl2-libs
cd ../..
Get-ChildItem -Recurse sdl2-dev-libs
- name: Build
run: |
$env:Path += ";" + $pwd + "\sdl2-dev-libs"
cd ffmpeg-binary\*
$env:FFMPEG_DIR = $pwd
cd ..\..\
cargo build --verbose
cargo build --release --verbose
- name: Upload compiled binaries
uses: actions/upload-artifact@v4
with:
name: windows-release-binary
path: ./target