Skip to content

Commit dd70519

Browse files
committed
Get dependencies
1 parent 34ed135 commit dd70519

File tree

1 file changed

+32
-3
lines changed

1 file changed

+32
-3
lines changed

.github/workflows/deploy.yml

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ jobs:
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
@@ -19,7 +22,7 @@ jobs:
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
@@ -28,6 +31,9 @@ jobs:
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
@@ -42,7 +48,7 @@ jobs:
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
@@ -51,8 +57,21 @@ jobs:
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

Comments
 (0)