-
Notifications
You must be signed in to change notification settings - Fork 3
61 lines (50 loc) · 1.28 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
name: Build
on:
push:
branches: ["main"]
paths:
- "Cargo.toml"
- "Cargo.lock"
- "src/**"
- ".github/workflows/build.yml"
pull_request:
branches: ["main"]
paths:
- "Cargo.toml"
- "Cargo.lock"
- "src/**"
- ".github/workflows/build.yml"
env:
CARGO_TERM_COLOR: always
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
- uses: Swatinem/rust-cache@v2
- name: Install linux build deps
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt install libxi-dev
sudo apt install libxtst-dev
- name: Build
run: cargo build --release
- name: Upload artifact (win)
uses: actions/upload-artifact@v4
if: matrix.os == 'windows-latest'
with:
name: dfint_hook.dll
path: ./target/release/dfint_hook.dll
- name: Upload artifact (linux)
uses: actions/upload-artifact@v4
if: matrix.os == 'ubuntu-latest'
with:
name: libdfint_hook.so
path: ./target/release/libdfint_hook.so