Repository navigation
74 lines (62 loc) · 2.04 KB
/
Copy pathpackage.yml
File metadata and controls
74 lines (62 loc) · 2.04 KB
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
name: Package
on:
push:
branches: ['master']
jobs:
package-windows:
name: Windows
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
lfs: true
- name: Install Vulkan SDK
uses: jakoch/install-vulkan-sdk-action@v1
with:
vulkan_version: 1.4.363.0
- uses: dtolnay/rust-toolchain@stable
- name: Build Server
run: cargo build --package server --release --locked
- name: Build Client
run: cargo build --package client --release --no-default-features --locked
- name: Package Artifacts
run: |
mkdir artifacts
Move-Item -Path assets/* -Destination artifacts/
Move-Item -Path target/release/*.exe -Destination artifacts/
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: windows
path: "artifacts/*"
package-linux:
name: Linux
# Oldest supported runner, for wide glibc compat
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
lfs: true
- name: Install dependencies
run: sudo apt update && sudo apt-get -y install libasound2-dev libvulkan-dev libfontconfig-dev
# No prebuilt shaderc, since the official binaries don't seem to be compatible with Ubuntu 20.04,
# and we haven't tested them on Ubuntu 22.04.
- uses: dtolnay/rust-toolchain@stable
- name: Build Server
run: cargo build --package server --release --locked
- name: Build Client
run: cargo build --package client --release --no-default-features --locked
- name: Strip
run: |
strip target/release/server target/release/client
- name: Package Artifacts
run: |
mkdir artifacts
mv assets/* artifacts/
mv target/release/server artifacts/
mv target/release/client artifacts/
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: linux
path: "artifacts/*"