Skip to content

Commit d1cf2cf

Browse files
committed
Fixed: Targets without host tools like armv7-linux-androideabi can now be built.
1 parent 2701e17 commit d1cf2cf

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

.github/workflows/test-build-workflow.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,23 @@ jobs:
7676
crate-name: "prs-rs-cli"
7777
upload-artifacts: false
7878

79+
test-build-without-native-host-tools:
80+
runs-on: ubuntu-latest
81+
steps:
82+
- name: Checkout Test Repository
83+
uses: actions/checkout@v4
84+
with:
85+
repository: Sewer56/prs-rs
86+
ref: 149060527e685360687d7332742ac016b39af8a7
87+
- name: Test Android Armv7 Build
88+
uses: Reloaded-Project/devops-rust-lightweight-binary@v1-test
89+
with:
90+
rust-project-path: tools/cli
91+
crate-name: prs-rs-cli
92+
target: armv7-linux-androideabi
93+
use-cross: true
94+
upload-artifacts: false
95+
7996
test-library-build:
8097
strategy:
8198
matrix:

action.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,10 @@ runs:
176176
run: |
177177
rustup target add ${{ inputs.target }}
178178
rustup component add rust-src --toolchain nightly
179-
rustup toolchain install nightly-${{ inputs.target }} --force-non-host
179+
if [ "${{ inputs.use-cross }}" != "true" ]; then
180+
# Install native toolchain to build with, otherwise it's provided by cross.
181+
rustup toolchain install nightly-${{ inputs.target }} --force-non-host
182+
fi
180183
181184
# Install cross-rs if needed
182185
if [ "${{ inputs.use-cross }}" == "true" ]; then

0 commit comments

Comments
 (0)