-
Notifications
You must be signed in to change notification settings - Fork 167
83 lines (70 loc) · 2.13 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
name: Rust
on: [push, pull_request, workflow_dispatch]
env:
CARGO_TERM_COLOR: always
DATABASE_URL: "sqlite://./dim_dev.db"
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- run: sudo apt-get update
- run: sudo apt-get install -y libva-dev libva-drm2 libva2 sqlite3 ffmpeg
- uses: actions/checkout@v2
# - name: Download UI artifacts
# uses: dawidd6/action-download-artifact@v2
# with:
# workflow: react.yml
# workflow_conclusion: success
# branch: master
# name: webui
# path: ui/build
# repo: ${{github.repository}}
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: cargo
- name: Download ffmpeg artifact
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: "Dusk-Labs/ffmpeg-static"
version: "tags/ffmpeg-all-0.0.1"
file: "ffmpeg"
token: ${{ secrets.GITHUB_TOKEN }}
- name: Download ffprobe artifact
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: "Dusk-Labs/ffmpeg-static"
version: "tags/ffmpeg-all-0.0.1"
file: "ffprobe"
token: ${{ secrets.GITHUB_TOKEN }}
- name: Create release dir
run: |
mkdir -p release/utils
cp ffmpeg release/utils/ffmpeg
cp ffprobe release/utils/ffprobe
chmod +x release/utils/ffmpeg
chmod +x release/utils/ffprobe
- name: Test Dim
uses: actions-rs/cargo@v1
with:
command: test
args: --tests
- name: Build Dim
uses: actions-rs/cargo@v1
with:
command: build
args: --verbose --release
- name: Copy dim binaries
run: |
cp target/release/dim release/dim
chmod +x release/dim
- name: Compress release dir
run: tar -zcvf release.tar.gz release
- name: Save artifacts
uses: actions/upload-artifact@v2
with:
name: release
path: release.tar.gz