-
Notifications
You must be signed in to change notification settings - Fork 31
71 lines (68 loc) · 2.09 KB
/
test-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
name: TestBuilds
on:
push:
branches:
- build
jobs:
build-with-vcpkg:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Set env
shell: bash
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Install rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
target: x86_64-pc-windows-msvc
override: true
- name: Build pak
shell: bash
run: ./build-pak.sh
- name: Setup cargo-vcpkg
run: cargo install cargo-vcpkg
- name: Build
run: |
pushd rusted-ruins
cargo vcpkg build
popd
cargo rustc --release --features sdl2-static-link -p rusted-ruins -- -Clink-args="/SUBSYSTEM:WINDOWS /ENTRY:mainCRTStartup"
- name: Package
shell: bash
run: |
mkdir rusted-ruins-windows
mv assets rusted-ruins-windows/
cp target/release/rusted-ruins.exe rusted-ruins-windows/
7z a rusted-ruins_${RELEASE_VERSION}_windows.zip rusted-ruins-windows/
- name: Upload
uses: actions/upload-artifact@v2
with:
name: windows-binary
path: "*.zip"
build-deb:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
target: x86_64-unknown-linux-gnu
override: true
- name: Install dev packages
run: sudo apt-get -y update && sudo apt-get -yq --no-install-suggests --no-install-recommends install libsdl2-dev libsdl2-ttf-dev libsdl2-image-dev libsdl2-mixer-dev libgtk-3-dev
- name: Build pak
shell: bash
run: ./build-pak.sh
- name: Setup cargo-deb
run: cargo install cargo-deb
- name: Build
run: cargo deb -p rusted-ruins -- --features deb
- name: Upload
uses: actions/upload-artifact@v2
with:
name: deb-package
path: target/debian/*.deb