55 name : Build Linux x86_64
66 runs-on : ubuntu-latest
77 steps :
8+ - name : Install packages
9+ run : |
10+ sudo apt install -y libasound1-dev libsdl2-dev
811 - name : Checkout
912 uses : actions/checkout@v2
1013 - name : Set Rust toolchain
1922 - name : Strip binary
2023 run : |
2124 strip target/release/rust-deploy-test
22- - name : Upload artifact
25+ - name : Upload binary
2326 uses : actions/upload-artifact@v1
2427 with :
2528 name : linux64.bin
2831 name : Build macOS x86_64
2932 runs-on : macos-latest
3033 steps :
34+ - name : Install packages
35+ run : |
36+ brew install sdl2
3137 - name : Checkout
3238 uses : actions/checkout@v2
3339 - name : Set Rust toolchain
4248 - name : Strip binary
4349 run : |
4450 strip target/release/rust-deploy-test
45- - name : Upload artifact
51+ - name : Upload binary
4652 uses : actions/upload-artifact@v1
4753 with :
4854 name : macos.bin
5157 name : Build Windows x64
5258 runs-on : windows-latest
5359 steps :
60+ - name : Get SDL2
61+ run : |
62+ mkdir temp
63+ wget -O temp/SDL2.zip https://www.libsdl.org/release/SDL2-2.0.14-win32-x64.zip
64+ cd temp
65+ unzip SDL2.zip
66+ cd ..
67+ cp temp/SDL2*/lib/x64/SDL2.{lib,dll} .
68+ rm -rf temp
69+ shell : bash
5470 - name : Checkout
5571 uses : actions/checkout@v2
72+ - name : Copy SDL2 to project root
73+ run : |
74+ cp ..\SDL2* .\
5675 - name : Set Rust toolchain
5776 uses : actions-rs/toolchain@v1
5877 with :
@@ -62,11 +81,16 @@ jobs:
6281 with :
6382 command : build
6483 args : --release
65- - name : Upload artifact
84+ - name : Upload binary
6685 uses : actions/upload-artifact@v1
6786 with :
6887 name : windows.bin
6988 path : target/release/rust-deploy-test.exe
89+ - name : Upload SDL2
90+ uses : actions/upload-artifact@v1
91+ with :
92+ name : SDL2.dll
93+ path : SDL2.dll
7094 release :
7195 name : Make release
7296 needs : [build_linux, build_mac, build_win]
@@ -91,6 +115,11 @@ jobs:
91115 with :
92116 name : windows.bin
93117 path : dist_windows
118+ - name : Get SDL dll
119+ uses : actions/download-artifact@v1
120+ with :
121+ name : SDL2.dll
122+ path : dist_windows
94123 - name : Prepare archives
95124 run : |
96125 cp -r repo/assets dist_linux
0 commit comments