-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (59 loc) · 1.72 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
name: Build
on: [push]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
build: [linux, macos, windows]
include:
- build: linux
os: ubuntu-latest
target: x86_64-unknown-linux-musl
binary: pyn
- build: macos
os: macos-latest
rust: stable
target: x86_64-apple-darwin
binary: pyn
- build: windows
os: windows-latest
target: x86_64-pc-windows-msvc
binary: pyn.exe
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Install latest rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
override: true
target: ${{ matrix.target }}
- name: Build
run: cargo build --release
- run: strip target/release/${{ matrix.binary }}
- name: Upload artifacts
uses: actions/upload-artifact@v1
with:
name: ${{ matrix.target }}-${{ matrix.binary }}
path: target/release/${{ matrix.binary }}
publish:
runs-on: ubuntu-latest
needs: build
steps:
- name: Download Linux Binary
uses: actions/download-artifact@v1
with:
name: x86_64-pc-windows-msvc-pyn.exe
path: binaries/x86_64-pc-windows-msvc
- name: Download Windows Binary
uses: actions/download-artifact@v1
with:
name: x86_64-unknown-linux-musl-pyn
path: binaries/x86_64-unknown-linux-musl
- name: Download Mac Binary
uses: actions/download-artifact@v1
with:
name: x86_64-apple-darwin-pyn
path: binaries/x86_64-apple-darwin