File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -104,6 +104,14 @@ jobs:
104104 env :
105105 CARGO_TARGET_DIR : target-cross
106106 run : cross build --release --target ${{ matrix.target }}
107+ - name : Set target directory
108+ if : matrix.target && runner.os != 'Windows'
109+ run : |
110+ if [ "${{ matrix.target }}" = "aarch64-unknown-linux-gnu" ]; then
111+ echo "TARGET_DIR=target-cross" >> $GITHUB_ENV
112+ else
113+ echo "TARGET_DIR=target" >> $GITHUB_ENV
114+ fi
107115 - name : Get version
108116 if : matrix.target
109117 id : version
@@ -115,11 +123,11 @@ jobs:
115123 echo "VERSION=dev" >> $GITHUB_OUTPUT
116124 fi
117125 - name : Copy binary (Unix)
118- if : matrix.target && runner.os != 'Windows' && matrix.target != 'aarch64-unknown-linux-gnu'
126+ if : matrix.target && runner.os != 'Windows'
119127 run : |
120128 mkdir artifacts
121129 for file in cargo-ndk cargo-ndk-env cargo-ndk-test cargo-ndk-runner; do
122- cp ${{ matrix.target == 'aarch64-unknown-linux-gnu' && "target-cross" || "target" }} /${{ matrix.target }}/release/$file artifacts/$file
130+ cp $TARGET_DIR /${{ matrix.target }}/release/$file artifacts/$file
123131 done
124132 - name : Copy binary (Windows)
125133 if : matrix.target && runner.os == 'Windows'
You can’t perform that action at this time.
0 commit comments