diff options
Diffstat (limited to 'ci/set-target.sh')
| -rwxr-xr-x | ci/set-target.sh | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/ci/set-target.sh b/ci/set-target.sh deleted file mode 100755 index f0dfbf0..0000000 --- a/ci/set-target.sh +++ /dev/null | |||
| @@ -1,40 +0,0 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | if [ "$#" -ne 2 ]; then | ||
| 4 | echo "Usage: $0 OS ARCHITECTURE" >&2 | ||
| 5 | exit 1 | ||
| 6 | fi | ||
| 7 | |||
| 8 | os=$1 | ||
| 9 | architecture=$2 | ||
| 10 | |||
| 11 | output() { | ||
| 12 | echo "Setting ACTIONS_RUST_TARGET=$1" | ||
| 13 | echo "ACTIONS_RUST_TARGET=$1" >> "$GITHUB_ENV" | ||
| 14 | exit 0 | ||
| 15 | } | ||
| 16 | |||
| 17 | if [ "$architecture" = "x64" ]; then | ||
| 18 | if [ "$os" = "ubuntu-latest" ]; then | ||
| 19 | output "x86_64-unknown-linux-gnu" | ||
| 20 | elif [ "$os" = "macos-latest" ]; then | ||
| 21 | output "x86_64-apple-darwin" | ||
| 22 | elif [ "$os" = "windows-latest" ]; then | ||
| 23 | output "x86_64-pc-windows-msvc" | ||
| 24 | else | ||
| 25 | echo "Unknown 64-bit OS: $os" | ||
| 26 | exit 1 | ||
| 27 | fi | ||
| 28 | elif [ "$architecture" = "x86" ]; then | ||
| 29 | if [ "$os" = "ubuntu-latest" ]; then | ||
| 30 | output "i686-unknown-linux-gnu" | ||
| 31 | elif [ "$os" = "windows-latest" ]; then | ||
| 32 | output "i686-pc-windows-msvc" | ||
| 33 | else | ||
| 34 | echo "Unknown 32-bit OS: $os" | ||
| 35 | exit 1 | ||
| 36 | fi | ||
| 37 | else | ||
| 38 | echo "Bad architecture: $architecture" | ||
| 39 | exit 1 | ||
| 40 | fi | ||
