Closed kareemmahlees closed 5 months ago
Hmm, this sounds more like a tauri issue. It's supposed to use the target flag to resolve the triple and not use the current platform's arch.
Will check it out tomorrow, thanks for the report :)
It's supposed to use the target flag to resolve the triple and not use the current platform's arch.
Is it ? Because then, there is no way for us to know what target flags are being passed to tauri in order to prepare/rename the sidecar with the corresponding triple, moreover the scripts mentioned here would be useless because they rely on the underlying arch.
I think it is more convenient for tauri to depend on the arch as a single source of truth dyt ?
Depending on the currently running arch makes no sense if you're trying to cross compile. And yes, the example scripts do not expect cross compilation.
For example if you use macos-latest, and for the sake of the argument let's assume macos-13 has been removed (which will happen at some point), you will compile on aarch64, but sidecars/apps compiled on aarch64 for aarch64 can not run on intel macs (the other way around works via rosetta).
You mean tauri should be able to ( for e.g. ) compile aarch64 and intel binaries from the same macos machine?
yes, and ignoring the sidecar issue, it is able to do that (cross-arch on all platforms, cross-platform only when targetting windows).
hmm, cool! Actually I think there is no issue here because the scripts ( as you have stated ) doesn't take into consideration cross-compilation specifically corss-arch complication and therefore doesn't rename the sidecar differently when using different targets. so I think I will modify the scripts a bit to accept an optional target argument.
Description
While migrating my application to Tauri V2, I also updated my release actions to the example mentioned here. Then I started to notice that the matrix with target
x86_64-apple-darwin
always fails to resolve the correct target triple ( it resolved to the same target triple as the first matrix ).Solution
By doing some research I found out that the target triple of the second matrix is of
macos-13
, andmacos-latest
resolves tomacos-14
which gives a completely different target triple.If this deserves a dedicated PR I am happy to help!