-
Notifications
You must be signed in to change notification settings - Fork 6
47 lines (43 loc) · 1.39 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
name: Build
on:
push:
branches: [ "master", "ci" ]
pull_request:
branches: [ "master", "ci" ]
env:
CARGO_TERM_COLOR: always
jobs:
build-win64:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: cache vcpkg
uses: actions/cache@v3
with:
key: vcpkg-win64
path: ${{ env.VCPKG_INSTALLATION_ROOT }}/installed
- name: setup vcpkg
run: vcpkg install libheif:x64-windows-static
- name: Build
run: |
$env:VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT
$env:RUSTFLAGS='-Ctarget-feature=+crt-static'
cargo build --release --all-features
- uses: actions/upload-artifact@v3
with:
name: win64
path: target/release/imgfind.exe
build-android:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: setup cargo-ndk
run: |
rustup target add aarch64-linux-android
- name: Build
run: |
export NDK_HOME=$ANDROID_NDK_PATH
export PKG_CONFIG_SYSROOT_DIR=$NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/sysroot
ln -s $NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android-clang $NDK_HOME/bin/aarch64-linux-android-clang
ln -s $NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar $NDK_HOME/bin/aarch64-linux-android-ar
cargo build --release --all-features --target aarch64-linux-android