From 6734b4681f817325c7f0065e615dab4392b02191 Mon Sep 17 00:00:00 2001 From: a-wing <1@233.email> Date: Sun, 19 May 2024 20:03:14 +0800 Subject: [PATCH] fix android --- .github/workflows/release.yml | 27 +++++---------------------- 1 file changed, 5 insertions(+), 22 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7c1ba807..0baf8d4e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,8 +16,8 @@ jobs: fail-fast: false matrix: job: + # https://doc.rust-lang.org/nightly/rustc/platform-support.html - { target: aarch64-apple-darwin , os: macos-13 } - - { target: aarch64-pc-windows-gnu , os: windows-2022 } - { target: aarch64-pc-windows-msvc , os: windows-2022 } - { target: aarch64-linux-android , os: ubuntu-22.04, use-cross: true } - { target: aarch64-unknown-linux-gnu , os: ubuntu-22.04, use-cross: true } @@ -35,7 +35,6 @@ jobs: env: VERSION: $GITHUB_REF_NAME BUILD_CMD: cargo - BUILD_NDK: "" EXE_SUFFIX: "" PKG_LIVE777_NAME: "" PKG_WHEPFROM_NAME: "" @@ -58,20 +57,6 @@ jobs: run: | echo "version is: ${{ env.VERSION }}" - - name: Install cargo-ndk - if: contains(matrix.job.target, 'android') - run: | - cargo install cargo-ndk - echo "BUILD_NDK=ndk -t arm64-v8a" >> $GITHUB_ENV - - - name: Install prerequisites - shell: bash - run: | - case ${{ matrix.job.target }} in - arm-unknown-linux-*) sudo apt-get -y update ; sudo apt-get -y install gcc-arm-linux-gnueabihf ;; - aarch64-unknown-linux-gnu) sudo apt-get -y update ; sudo apt-get -y install gcc-aarch64-linux-gnu ;; - esac - - name: Install Rust toolchain uses: dtolnay/rust-toolchain@stable with: @@ -79,9 +64,7 @@ jobs: - name: Install cross if: matrix.job.use-cross - uses: taiki-e/install-action@v2 - with: - tool: cross + run: cargo install cross --git https://github.com/cross-rs/cross - name: Overwrite build command env variable if: matrix.job.use-cross @@ -97,18 +80,18 @@ jobs: shell: bash run: | gcc --version || true + cross --version || true rustup -V rustup toolchain list rustup default cargo -V rustc -V + echo "BUILD_CMD: ${BUILD_CMD}" - name: Build shell: bash run: | - $BUILD_CMD $BUILD_NDK build --locked --release --target=${{ matrix.job.target }} - $BUILD_CMD $BUILD_NDK build --locked --package=whepfrom --release --target=${{ matrix.job.target }} - $BUILD_CMD $BUILD_NDK build --locked --package=whipinto --release --target=${{ matrix.job.target }} + $BUILD_CMD $BUILD_NDK build --locked --all --release --target=${{ matrix.job.target }} - name: Archive shell: bash