-
Notifications
You must be signed in to change notification settings - Fork 8
58 lines (54 loc) · 1.55 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
name: BUILD
on:
push:
jobs:
build:
name: build
runs-on: ${{ matrix.os }}
strategy:
matrix:
build: [aarch64, aarch64-musl, amd64, amd64-musl]
include:
- build: aarch64
os: ubuntu-latest
rust: stable
cross: true
target: aarch64-unknown-linux-gnu
- build: aarch64-musl
os: ubuntu-latest
rust: stable
cross: true
target: aarch64-unknown-linux-musl
- build: amd64
os: ubuntu-latest
rust: stable
cross: false
target: x86_64-unknown-linux-gnu
- build: amd64-musl
os: ubuntu-latest
rust: stable
cross: true
target: x86_64-unknown-linux-musl
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: 'recursive'
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}
override: true
- uses: actions-rs/cargo@v1
with:
use-cross: ${{ matrix.cross }}
command: build
args: --release --target ${{ matrix.target }}
- run: mv ./target/release/dmlive ./dmlive-${{ matrix.build }} || mv "./target/${{ matrix.target }}/release/dmlive" ./dmlive-${{ matrix.build }}
- uses: ncipollo/release-action@v1
with:
allowUpdates: true
tag: "release"
artifacts: "./dmlive-${{ matrix.build }}"
token: ${{ secrets.GITHUB_TOKEN }}