-
Notifications
You must be signed in to change notification settings - Fork 64
96 lines (86 loc) · 2.88 KB
/
rust.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
name: Rust
on: [push, pull_request]
env:
MACOSX_DEPLOYMENT_TARGET: 10.12
jobs:
build_ubuntu:
runs-on: ubuntu-latest
steps:
- id: Build
uses: ./.github/actions/ubuntu.yml
- name: ls
run: ls -l app.zip
build_windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: Swatinem/rust-cache@v1
- uses: actions-rs/cargo@v1
with:
command: build
args: --release
- uses: actions/upload-artifact@v2
with:
name: windows-artifact
path: target/release/neothesia.exe
build_macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: Swatinem/rust-cache@v1
- uses: actions-rs/cargo@v1
with:
command: build
args: --release
- name: copy binary
run: cp target/release/neothesia .github/app/Neothesia.app/Contents/MacOS
- name: zip binary
run: cd .github/app/ && zip -r app.zip Neothesia.app && cd ../..
- uses: actions/upload-artifact@v2
with:
name: macos-artifact
path: .github/app/app.zip
build_ubuntu_recorder:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install alsa
run: sudo apt update && sudo apt install libasound2-dev libgtk-3-dev libavcodec-dev libavformat-dev libswscale-dev
- uses: Swatinem/rust-cache@v1
- uses: actions-rs/cargo@v1
with:
command: build
args: --release -p neothesia-cli
- name: Chmod +x
run: chmod +x target/release/neothesia-cli
- name: zip binary
run: zip -rj app.zip target/release/neothesia-cli
- uses: actions/upload-artifact@v2
with:
name: ubuntu-recorder-artifact
path: app.zip
build_windows_recorder:
runs-on: windows-latest
env:
FFMPEG_DOWNLOAD_URL: https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-full-shared.7z
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
$VCINSTALLDIR = $(& "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath)
Add-Content $env:GITHUB_ENV "LIBCLANG_PATH=${VCINSTALLDIR}\VC\Tools\LLVM\x64\bin`n"
Invoke-WebRequest "${env:FFMPEG_DOWNLOAD_URL}" -OutFile ffmpeg-release-full-shared.7z
7z x ffmpeg-release-full-shared.7z
mkdir ffmpeg
mv ffmpeg-*/* ffmpeg/
Add-Content $env:GITHUB_ENV "FFMPEG_DIR=${pwd}\ffmpeg`n"
Add-Content $env:GITHUB_PATH "${pwd}\ffmpeg\bin`n"
- uses: Swatinem/rust-cache@v1
- uses: actions-rs/cargo@v1
with:
command: build
args: --release -p neothesia-cli
- uses: actions/upload-artifact@v2
with:
name: windows-recorder-artifact
path: target/release/neothesia-cli.exe