更新ubuntu构建说明 #67
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: ci-build | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup ndk | |
run: | | |
ndk_url=$(wget -qO- https://github.com/android/ndk/releases/latest | grep -e 'https://dl.google.com/android/repository/android-ndk-.*-linux.zip' | sed -n 's/.*<a href="\([^"]*\)".*/\1/p') | |
wget -O ndk.zip $ndk_url -nv | |
mkdir ~/ndk_temp | |
unzip ndk.zip -d ~/ndk_temp 2>&1 > /dev/null | |
mv ~/ndk_temp/*/* ~/ndk_temp | |
- name: Setup rust toolchains | |
run: | | |
rustup default nightly | |
rustup target add aarch64-linux-android armv7-linux-androideabi x86_64-linux-android i686-linux-android | |
- name: Install cargo ndk | |
run: cargo install cargo-ndk | |
- name: Other deps | |
run: | | |
sudo apt update | |
sudo apt install gcc-multilib git-lfs | |
git lfs pull | |
- name: Build | |
run: | | |
export ANDROID_NDK_HOME=$(realpath ~/ndk_temp) | |
export ANDROID_NDK_ROOT=$ANDROID_NDK_HOME | |
chmod +x ./build.sh | |
./build.sh --release -v | |
- name: Upload | |
uses: actions/[email protected] | |
with: | |
name: fas-rs(ci-build) | |
path: output/.temp |