From 0248531be6fdd671f0ab6d1fb172d0abe2495a46 Mon Sep 17 00:00:00 2001 From: william nathanael dn <256955543+aarchiev@users.noreply.github.com> Date: Mon, 26 Jan 2026 22:46:38 +0800 Subject: [PATCH 1/7] Modify release workflow for branch trigger and artifact upload Updated release workflow to trigger on specific branch and upload artifacts instead of creating a release. --- .github/workflows/release.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 526f2fa..e60247a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,8 +5,9 @@ permissions: on: push: - tags: - - "v*" + branches: + - "ci/9-test-android-ndk-linking" + workflow_dispatch: jobs: publish: @@ -107,7 +108,6 @@ jobs: TARGET="${{ matrix.target }}" if [[ "$TARGET" == *"android"* ]]; then export ANDROID_NDK_HOME=$ANDROID_HOME/ndk/25.2.9519653 - cargo ndk -t $TARGET -p 24 build --release else BUILD_CMD=${{ matrix.use_cross && 'cross' || 'cargo' }} @@ -123,8 +123,9 @@ jobs: fi mv "$BIN_PATH" "${{ matrix.asset_name }}" - - name: Release - uses: softprops/action-gh-release@v2 + - name: Upload Artifact + uses: actions/upload-artifact@v4 with: - files: ${{ matrix.asset_name }} - fail_on_unmatched_files: true + name: binary-${{ matrix.asset_name }} + path: ${{ matrix.asset_name }} + retention-days: 1 From 61356d8bebbc0c0b5005ea39d3e5505015d48b48 Mon Sep 17 00:00:00 2001 From: william nathanael dn <256955543+aarchiev@users.noreply.github.com> Date: Mon, 26 Jan 2026 22:50:54 +0800 Subject: [PATCH 2/7] Disable fail-fast in release workflow --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e60247a..23c97eb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,6 +14,7 @@ jobs: name: Build for ${{ matrix.asset_name }} runs-on: ${{ matrix.os }} strategy: + fail-fast: false matrix: include: - os: ubuntu-latest From f376fff3fc8af33bfed79034e766d7f7e3dcd8f6 Mon Sep 17 00:00:00 2001 From: william nathanael dn <256955543+aarchiev@users.noreply.github.com> Date: Mon, 26 Jan 2026 22:59:25 +0800 Subject: [PATCH 3/7] Modify workflow name to indicate testing phase --- .github/workflows/release.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 23c97eb..143a3a7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,4 @@ -name: Cross-Platform Release +name: Cross-Platform Release (TESTING) permissions: contents: write @@ -108,7 +108,6 @@ jobs: run: | TARGET="${{ matrix.target }}" if [[ "$TARGET" == *"android"* ]]; then - export ANDROID_NDK_HOME=$ANDROID_HOME/ndk/25.2.9519653 cargo ndk -t $TARGET -p 24 build --release else BUILD_CMD=${{ matrix.use_cross && 'cross' || 'cargo' }} From 9b5eeccecdeb72577e9c24c7ffd057f92b97cf66 Mon Sep 17 00:00:00 2001 From: william nathanael dn <256955543+aarchiev@users.noreply.github.com> Date: Mon, 26 Jan 2026 23:06:30 +0800 Subject: [PATCH 4/7] Modify Android build settings for stability and simplification Updated Android build configuration to use cross compilation for stability and simplified the build command by removing manual NDK installation. --- .github/workflows/release.yml | 29 ++++++++++------------------- 1 file changed, 10 insertions(+), 19 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 143a3a7..2c3f919 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -57,16 +57,18 @@ jobs: binary_name: rstf asset_name: rstf-macos-arm64 use_cross: false + # --- ANDROID FIXED --- + # Kita kembalikan ke 'use_cross: true' karena lebih stabil untuk CI - os: ubuntu-latest target: aarch64-linux-android binary_name: rstf asset_name: rstf-android-arm64 - use_cross: false + use_cross: true - os: ubuntu-latest target: x86_64-linux-android binary_name: rstf asset_name: rstf-android-amd64 - use_cross: false + use_cross: true steps: - name: Checkout code @@ -86,16 +88,7 @@ jobs: if: contains(matrix.target, 'musl') run: sudo apt-get update && sudo apt-get install -y musl-tools - - name: Install Android NDK - if: contains(matrix.target, 'android') - uses: android-actions/setup-android@v3 - with: - packages: 'ndk;25.2.9519653' - - - name: Install cargo-ndk - if: contains(matrix.target, 'android') - run: cargo install cargo-ndk - + # Setup Cross jika diperlukan (Termasuk untuk Android sekarang) - name: Setup Cross if: matrix.use_cross run: | @@ -103,16 +96,13 @@ jobs: cargo install cross --git https://github.com/cross-rs/cross fi + # Build Command yang Disederhanakan + # Tidak perlu install NDK manual, 'cross' akan menanganinya via Docker - name: Build shell: bash run: | - TARGET="${{ matrix.target }}" - if [[ "$TARGET" == *"android"* ]]; then - cargo ndk -t $TARGET -p 24 build --release - else - BUILD_CMD=${{ matrix.use_cross && 'cross' || 'cargo' }} - $BUILD_CMD build --release --target $TARGET - fi + BUILD_CMD=${{ matrix.use_cross && 'cross' || 'cargo' }} + $BUILD_CMD build --release --target ${{ matrix.target }} - name: Post-process binary shell: bash @@ -129,3 +119,4 @@ jobs: name: binary-${{ matrix.asset_name }} path: ${{ matrix.asset_name }} retention-days: 1 + From ee840f47384a1a53762c53e1c9ea199f06dd3c81 Mon Sep 17 00:00:00 2001 From: william nathanael dn <256955543+aarchiev@users.noreply.github.com> Date: Mon, 26 Jan 2026 23:08:23 +0800 Subject: [PATCH 5/7] Simplify comments in release workflow Removed unnecessary comments and streamlined the release workflow for clarity. --- .github/workflows/release.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2c3f919..3869dac 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -57,8 +57,6 @@ jobs: binary_name: rstf asset_name: rstf-macos-arm64 use_cross: false - # --- ANDROID FIXED --- - # Kita kembalikan ke 'use_cross: true' karena lebih stabil untuk CI - os: ubuntu-latest target: aarch64-linux-android binary_name: rstf @@ -88,7 +86,6 @@ jobs: if: contains(matrix.target, 'musl') run: sudo apt-get update && sudo apt-get install -y musl-tools - # Setup Cross jika diperlukan (Termasuk untuk Android sekarang) - name: Setup Cross if: matrix.use_cross run: | @@ -96,8 +93,6 @@ jobs: cargo install cross --git https://github.com/cross-rs/cross fi - # Build Command yang Disederhanakan - # Tidak perlu install NDK manual, 'cross' akan menanganinya via Docker - name: Build shell: bash run: | From c4a73f395120a8715bf99ebb3b19d66527a38dc5 Mon Sep 17 00:00:00 2001 From: william nathanael dn <256955543+aarchiev@users.noreply.github.com> Date: Mon, 26 Jan 2026 23:13:51 +0800 Subject: [PATCH 6/7] Restore cross compilation for Android in release.yml Re-enable cross compilation for Android to enhance CI stability and simplify the build process. --- .github/workflows/release.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3869dac..40b5272 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -57,6 +57,8 @@ jobs: binary_name: rstf asset_name: rstf-macos-arm64 use_cross: false + # --- ANDROID FIXED --- + # Kita kembalikan ke 'use_cross: true' karena lebih stabil untuk CI - os: ubuntu-latest target: aarch64-linux-android binary_name: rstf @@ -86,6 +88,7 @@ jobs: if: contains(matrix.target, 'musl') run: sudo apt-get update && sudo apt-get install -y musl-tools + # Setup Cross jika diperlukan (Termasuk untuk Android sekarang) - name: Setup Cross if: matrix.use_cross run: | @@ -93,6 +96,8 @@ jobs: cargo install cross --git https://github.com/cross-rs/cross fi + # Build Command yang Disederhanakan + # Tidak perlu install NDK manual, 'cross' akan menanganinya via Docker - name: Build shell: bash run: | @@ -114,4 +119,3 @@ jobs: name: binary-${{ matrix.asset_name }} path: ${{ matrix.asset_name }} retention-days: 1 - From ebbd4dadfeafa4f98af22ac3bb7cebcde4c1df87 Mon Sep 17 00:00:00 2001 From: william nathanael dn <256955543+aarchiev@users.noreply.github.com> Date: Mon, 26 Jan 2026 23:21:00 +0800 Subject: [PATCH 7/7] Refactor release.yml cross-compilation setup and simplified build command instructions. --- .github/workflows/release.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 40b5272..0c59524 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -57,8 +57,6 @@ jobs: binary_name: rstf asset_name: rstf-macos-arm64 use_cross: false - # --- ANDROID FIXED --- - # Kita kembalikan ke 'use_cross: true' karena lebih stabil untuk CI - os: ubuntu-latest target: aarch64-linux-android binary_name: rstf @@ -88,7 +86,6 @@ jobs: if: contains(matrix.target, 'musl') run: sudo apt-get update && sudo apt-get install -y musl-tools - # Setup Cross jika diperlukan (Termasuk untuk Android sekarang) - name: Setup Cross if: matrix.use_cross run: | @@ -96,8 +93,6 @@ jobs: cargo install cross --git https://github.com/cross-rs/cross fi - # Build Command yang Disederhanakan - # Tidak perlu install NDK manual, 'cross' akan menanganinya via Docker - name: Build shell: bash run: |