-
Notifications
You must be signed in to change notification settings - Fork 0
174 lines (133 loc) · 4.43 KB
/
build-daemon.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
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
name: Daemon Build
on:
push:
branches: [ "main" ]
jobs:
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Build
run: cargo build --release
working-directory: daemon
- name: Rename binary
run: mv target/release/mysti-daemon.exe mysti-daemon-windows.exe
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: mysti-daemon-windows
path: ./mysti-daemon-windows.exe
build-ubuntu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install additional packages
run: sudo apt-get install -y libx11-dev xfonts-base xcb libx11-xcb-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxcb-shape0-dev libxcb-xfixes0-dev
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Build
run: cargo build --release
working-directory: daemon
- name: Rename binary
run: mv target/release/mysti-daemon mysti-daemon-ubuntu
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: mysti-daemon-ubuntu
path: ./mysti-daemon-ubuntu
build-fedora:
runs-on: ubuntu-latest
container:
image: fedora:latest
steps:
- uses: actions/checkout@v2
- name: Install additional packages
run: dnf install -y libX11-devel xorg-x11-fonts-misc xorg-x11-font-utils make automake gcc gcc-c++ kernel-devel
- name: Install Rust
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source $HOME/.cargo/env
- name: Build
run: source $HOME/.cargo/env && cargo build --release
working-directory: daemon
- name: Rename binary
run: find . -type f -name mysti-daemon -exec mv {} mysti-daemon-fedora \;
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: mysti-daemon-fedora
path: ./mysti-daemon-fedora
build-debian:
runs-on: ubuntu-latest
container:
image: debian:latest
steps:
- uses: actions/checkout@v2
- name: Install additional packages
run: |
apt-get update && apt-get install -y curl libx11-dev xfonts-base xfonts-utils make automake gcc g++ \
linux-headers-amd64 pkg-config openssl libssl-dev mlocate libxcb-render0 libxcb-render0-dev \
libxcb-shape0 libxcb-shape0-dev libxcb-xfixes0 libxcb-xfixes0-dev
- name: Install Rust
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source $HOME/.cargo/env
shell: bash
- name: Build
run: source $HOME/.cargo/env && cargo build --release
working-directory: daemon
shell: bash
- name: Rename binary
run: find . -type f -name mysti-daemon -exec mv {} mysti-daemon-debian \;
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: mysti-daemon-debian
path: ./mysti-daemon-debian
build-archlinux:
runs-on: ubuntu-latest
container:
image: archlinux:latest
steps:
- uses: actions/checkout@v2
- name: Install additional packages
run: pacman -Syu --noconfirm libx11 xorg-fonts-misc xorg-mkfontscale make automake gcc linux-headers pkg-config
- name: Install Rust
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source $HOME/.cargo/env
- name: Build
run: source $HOME/.cargo/env && cargo build --release
working-directory: daemon
- name: Rename binary
run: find . -type f -name mysti-daemon -exec mv {} mysti-daemon-archlinux \;
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: mysti-daemon-archlinux
path: ./mysti-daemon-archlinux
release:
needs: [build-windows, build-ubuntu, build-fedora, build-debian, build-archlinux]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download artifacts
uses: actions/download-artifact@v2
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
mysti-daemon-*/mysti-daemon-*
tag_name: latest
body: |
This is the latest release of the Mysti daemon.
token: ${{ secrets.GITHUB_TOKEN }}