-
Notifications
You must be signed in to change notification settings - Fork 1
58 lines (49 loc) · 1.58 KB
/
compile-ffi.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: Compile FFI
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
include:
- os: ubuntu-latest
rust_target: x86_64-unknown-linux-gnu
- os: macos-latest
rust_target: x86_64-apple-darwin
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
target: ${{ matrix.rust_target }}
override: true
- name: Compile FFI Bindings
run: make ffi
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-artifacts
path: include
- name: Commit and push if changed
id: commit
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git pull
git add include
git commit -m "Update artifacts" -a || echo "No changes to commit"
git push