Initial commit
This commit is contained in:
18
set-cross-compile.sh
Executable file
18
set-cross-compile.sh
Executable file
@@ -0,0 +1,18 @@
|
||||
set -e
|
||||
set -x
|
||||
|
||||
TARGET="$1"
|
||||
|
||||
# On macOS and Windows, we can cross-compile to all possible targets without
|
||||
# using cross.
|
||||
if uname -a | grep --quiet --extended-regexp -i "darwin|msys|windows"; then
|
||||
echo "needs-cross=false" >> $GITHUB_OUTPUT
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if echo "$TARGET" | grep --quiet --extended-regexp -i '(x86_64|586|686).+linux-(gnu|musl)'; then
|
||||
echo "needs-cross=false" >> $GITHUB_OUTPUT
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "needs-cross=true" >> $GITHUB_OUTPUT
|
||||
Reference in New Issue
Block a user