修复pgo_ci构建 #239
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@v4 | |
- 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 | |
rustup component add rust-src | |
- 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: Debug Build | |
run: | | |
export ANDROID_NDK_HOME=$(realpath ~/ndk_temp) | |
export ANDROID_NDK_ROOT=$ANDROID_NDK_HOME | |
python3 ./make.py build --debug --nightly | |
- name: Upload debug-ci | |
uses: actions/upload-artifact@v4 | |
with: | |
name: fas-rs(debug-ci) | |
compression-level: 9 | |
path: output/.temp/debug | |
- name: Release Build (with pgo-record) | |
run: | | |
export ANDROID_NDK_HOME=$(realpath ~/ndk_temp) | |
export ANDROID_NDK_ROOT=$ANDROID_NDK_HOME | |
python3 ./make.py build --release --pgo-record | |
- name: Upload release-ci (with pgo-record) | |
uses: actions/upload-artifact@v4 | |
with: | |
name: fas-rs(release-ci-with-pgo-record) | |
compression-level: 9 | |
path: output/.temp/release | |
- name: Release Build (with pgo-opt) | |
run: | | |
export ANDROID_NDK_HOME=$(realpath ~/ndk_temp) | |
export ANDROID_NDK_ROOT=$ANDROID_NDK_HOME | |
python3 ./make.py build --release --nightly --pgo-opt | |
- name: Upload release-ci (with pgo-opt) | |
uses: actions/upload-artifact@v4 | |
with: | |
name: fas-rs(release-ci-with-pgo-opt) | |
compression-level: 9 | |
path: output/.temp/release | |
- name: Release Build | |
run: | | |
export ANDROID_NDK_HOME=$(realpath ~/ndk_temp) | |
export ANDROID_NDK_ROOT=$ANDROID_NDK_HOME | |
python3 ./make.py build --release --nightly | |
- name: Upload release-ci | |
uses: actions/upload-artifact@v4 | |
with: | |
name: fas-rs(release-ci) | |
compression-level: 9 | |
path: output/.temp/release |