-
Notifications
You must be signed in to change notification settings - Fork 4
50 lines (44 loc) · 1.13 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
name: Build
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
env:
CARGO_TERM_COLOR: always
rust_min: '1.74.1'
jobs:
android-build:
name: android-build
runs-on: ubuntu-latest
needs:
- linux-build
steps:
- uses: actions/checkout@v4
- uses: nttld/setup-ndk@v1
id: setup-ndk
with:
ndk-version: r26c
add-to-path: false
local-cache: true
- name: Install ndk targets
run: rustup target add x86_64-linux-android
- uses: Swatinem/rust-cache@v2
- name: Install cargo-ndk
run: cargo install cargo-ndk
- name: Build for Android
run: cargo ndk -t x86_64-linux-android build
linux-build:
name: linux-build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust ${{ env.rust_min }}
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.rust_min }}
- uses: Swatinem/rust-cache@v2
- name: "check --workspace --all-features"
run: cargo check --workspace --all-features
env:
RUSTFLAGS: "" # remove -Dwarnings