-
Notifications
You must be signed in to change notification settings - Fork 6
64 lines (52 loc) · 1.74 KB
/
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
name: Build
on:
push:
branches:
- "*"
jobs:
setup-and-build-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Install Rust
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source $HOME/.cargo/env
- name: Build macOS Binary
run: |
rustup target add x86_64-apple-darwin
cd utilities/earendil-gui
cargo build --release --target x86_64-apple-darwin --target-dir ./target
- name: Zip macOS Binary
run: |
zip -j earendil-macos.zip ./utilities/earendil-gui/target/x86_64-apple-darwin/release/earendil-gui
- name: Upload macOS Artifact
uses: actions/upload-artifact@v2
with:
name: earendil-macos
path: earendil-macos.zip
setup-and-build-windows:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Dependencies for Windows Build
run: |
sudo apt-get update
sudo apt-get install -y musl-tools
- name: Install Rust
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
- name: Install Cross
run: cargo install cross
- name: Build Windows Binary with Cross
run: |
cd utilities/earendil-gui
cross build --target x86_64-pc-windows-gnu --release --target-dir ./target
- name: Zip Windows Binary
run: |
zip -j earendil-windows.zip ./utilities/earendil-gui/target/x86_64-pc-windows-gnu/release/earendil-gui.exe
- name: Upload Windows Artifact
uses: actions/upload-artifact@v2
with:
name: earendil-windows
path: earendil-windows.zip