-
Notifications
You must be signed in to change notification settings - Fork 10
120 lines (118 loc) · 3.93 KB
/
build.yaml
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
name: build
on:
workflow_dispatch:
inputs:
version:
description: Build version
required: True
jobs:
build-ubuntu:
strategy:
matrix:
include:
- os: ubuntu-20.04
version: 20
feature: speech_dispatcher_0_9
- os: ubuntu-22.04
version: 22
feature: speech_dispatcher_0_11
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: apt update
run: sudo apt-get update
- name: install
run: sudo apt install wget clang libspeechd-dev pkg-config libssl-dev alsa librust-alsa-sys-dev
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.74.0
- name: cargo build
run: cargo build --release --features ${{ matrix.feature }}
- name: Create release directory
run: mkdir -p cacophony/data
- name: Copy executable
run: cp target/release/cacophony cacophony/cacophony
- name: Copy data/
run: cp -R data cacophony
- name: Download butler
run: wget -O butler.zip https://broth.itch.ovh/butler/linux-amd64/LATEST/archive/default
- name: Unzip butler
run: unzip butler.zip
- run: chmod +x butler
- name: butler login
env:
BUTLER_API_KEY: ${{ secrets.BUTLER_API_KEY }}
run: ./butler login
- name: butler push
env:
BUTLER_API_KEY: ${{ secrets.BUTLER_API_KEY }}
run: ./butler push cacophony subalterngames/cacophony:ubuntu${{ matrix.version }} --userversion=${{ inputs.version }}
build-macos:
strategy:
matrix:
include:
- os: macos-11
version: 11
- os: macos-12
version: 12
- os: macos-13
version: 13
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.74.0
- name: Install cargo bundle
run: cargo install cargo-bundle
- name: cargo build
run: cargo bundle --release
- name: Download butler
run: wget -O butler.zip https://broth.itch.ovh/butler/darwin-amd64/LATEST/archive/default
- name: Unzip butler
run: unzip butler.zip
- run: chmod +x butler
- name: butler login
env:
BUTLER_API_KEY: ${{ secrets.BUTLER_API_KEY }}
run: ./butler login
- name: butler push
env:
BUTLER_API_KEY: ${{ secrets.BUTLER_API_KEY }}
run: ./butler push target/release/bundle/osx/Cacophony.app subalterngames/cacophony:macos${{ matrix.version }} --userversion=${{ inputs.version }}
build-windows:
name: Windows
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.74.0
- name: cargo build
run: cargo build --release
- name: Download butler
run: Invoke-WebRequest -Uri https://broth.itch.ovh/butler/windows-amd64/LATEST/archive/default -OutFile butler.zip
shell: powershell
- name: Unzip butler
run: Expand-Archive -Path butler.zip -DestinationPath .
shell: powershell
- name: butler login
env:
BUTLER_API_KEY: ${{ secrets.BUTLER_API_KEY }}
run: ./butler.exe login
- name: Create release directory
run: New-Item -Path cacophony -ItemType directory
shell: powershell
- name: Copy cacophony.exe
run: Copy-Item target/release/cacophony.exe cacophony/cacophony.exe
shell: powershell
- name: Copy data/
run: Copy-Item -Recurse data cacophony
shell: powershell
- name: butler push
env:
BUTLER_API_KEY: ${{ secrets.BUTLER_API_KEY }}
run: ./butler.exe push cacophony subalterngames/cacophony:windows --userversion=${{ inputs.version }}