-
Notifications
You must be signed in to change notification settings - Fork 182
53 lines (44 loc) · 1.38 KB
/
Copy pathbuild-rust.yml
File metadata and controls
53 lines (44 loc) · 1.38 KB
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
name: Build Rust Natives
on:
push:
branches:
- main
paths:
- 'sable_rapier/src/main/rust/**'
- '.github/workflows/build-rust.yml'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup Java
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 21
cache: gradle
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v6
- name: Cache cargo
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/sable_rapier/build/cargo
key: ${{ runner.os }}-node-${{ hashFiles('sable_rapier/src/main/rust/**/Cargo.lock') }}
- name: Run Gradle Task
run: ./gradlew sable_rapier:buildImages sable_rapier:buildRustNatives
- name: Take ownership of the workspace
run: sudo chown -R $USER:$USER .
- name: Commit and Push Changes
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add .
git commit -m "Automated build rust natives" || echo "No changes to commit"
git push