-
Notifications
You must be signed in to change notification settings - Fork 3
66 lines (63 loc) · 1.87 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
name: Rust
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
CARGO_TERM_COLOR: always
jobs:
build-linux:
name: Linux GLIBC_2_15
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build linux
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: i686-unknown-linux-gnu
override: true
- uses: actions-rs/cargo@v1
with:
use-cross: true # cross uses glibc 2.15
command: build
args: --target i686-unknown-linux-gnu --release
- name: Upload Linux Release Asset
id: upload-linux-release
uses: ncipollo/release-action@v1
with:
artifacts: ./target/i686-unknown-linux-gnu/release/libsamp_precise_timers.so
replacesArtifacts: false
token: ${{ secrets.GITHUB_TOKEN }}
allowUpdates: true
draft: true
omitBody: true
tag: ${{ github.ref }}
commit: ${{ github.ref }}
build-windows:
runs-on: windows-latest
strategy:
matrix:
os: [windows-latest]
rust: [stable]
steps:
- uses: hecrj/setup-rust-action@v1
with:
rust-version: ${{ matrix.rust }}
- uses: actions/checkout@v2
- name: Build for Windows
run: rustup target add i686-pc-windows-msvc && cargo build --release --target i686-pc-windows-msvc
- name: Upload Windows Release Asset
id: upload-windows-release
uses: ncipollo/release-action@v1
with:
artifacts: .\target\i686-pc-windows-msvc\release\samp_precise_timers.dll
replacesArtifacts: false
token: ${{ secrets.GITHUB_TOKEN }}
allowUpdates: true
draft: true
omitBody: true
tag: ${{ github.ref }}
commit: ${{ github.ref }}