-
Notifications
You must be signed in to change notification settings - Fork 8
76 lines (61 loc) · 2.07 KB
/
ci-nym-vpn-core-android.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
67
68
69
70
71
72
73
74
75
76
name: ci-nym-vpn-core-android
on:
# push:
pull_request:
paths:
- "nym-vpn-core/**"
- ".github/workflows/ci-nym-vpn-core-android.yml"
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
AGENT_ISSELFHOSTED: 1 # https://github.com/actions/setup-go/issues/432
jobs:
build:
runs-on: arc-ubuntu-22.04
steps:
- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y libdbus-1-dev libmnl-dev libnftnl-dev protobuf-compiler git curl gcc g++ make unzip
- name: Checkout repo
uses: actions/checkout@v4
- name: Install rust toolchain
uses: brndnmtthws/rust-action-rustup@v1
with:
toolchain: stable
components: rustfmt, clippy
targets: aarch64-linux-android
- name: Install cargo ndk
run: cargo install cargo-ndk
- name: Setup NDK
uses: nttld/setup-ndk@v1
id: setup-ndk
with:
ndk-version: r25c
add-to-path: false
- name: Set env
shell: bash
run: |
echo "ANDROID_NDK_HOME=${{ steps.setup-ndk.outputs.ndk-path }}" >> $GITHUB_ENV
echo "NDK_TOOLCHAIN_DIR=${{ steps.setup-ndk.outputs.ndk-path }}/toolchains/llvm/prebuilt/linux-x86_64/bin" >> $GITHUB_ENV
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: "stable"
- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
version: "21.12" # 3.21.12: the version on ubuntu 24.04. Don't change this!
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Build wireguard
run: ./wireguard/libwg/build-android.sh
- name: rustfmt check
working-directory: nym-vpn-core
run: |
cargo fmt --check
- name: Build
working-directory: nym-vpn-core
run: |
cargo ndk -t aarch64-linux-android -o ./build build -p nym-vpn-lib
- name: Clippy
working-directory: nym-vpn-core
run: |
cargo ndk -t aarch64-linux-android clippy -p nym-vpn-lib -- -Dwarning