fix #20
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: C:/vcpkg/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 | |
run: | | |
wget https://github.com/flaribbit/imgfind/releases/download/model/libheif.so -O .github/libheif.so | |
rustup target add aarch64-linux-android | |
- name: Build | |
run: | | |
export NDK_HOME=$ANDROID_NDK_HOME | |
export NDK_BIN=$NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin | |
export PATH="$NDK_BIN:$PATH" | |
ln -s $NDK_BIN/aarch64-linux-android21-clang $NDK_BIN/aarch64-linux-android-clang | |
ln -s $NDK_BIN/aarch64-linux-android21-clang++ $NDK_BIN/aarch64-linux-android-clang++ | |
ln -s $NDK_BIN/llvm-ar $NDK_BIN/aarch64-linux-android-ar | |
cargo build --release --all-features --target aarch64-linux-android | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: android-aarch64 | |
path: target/aarch64-linux-android/release/imgfind |