diff options
| author | Florian Bruhin <me@the-compiler.org> | 2021-01-26 23:30:47 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-26 22:30:47 +0000 |
| commit | a8844843a6751ae77697a731abffc50402cf008e (patch) | |
| tree | 852b34239e4c66e62a12c8bb93a1843ebfe042d2 /ci | |
| parent | 4487c16c8e72c24d62da589a7bf7c1e3666013a6 (diff) | |
ci: Also build/publish 32-bit wheels (#26)
Closes #25
Diffstat (limited to 'ci')
| -rwxr-xr-x | ci/set-target.sh | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/ci/set-target.sh b/ci/set-target.sh new file mode 100755 index 0000000..f0dfbf0 --- /dev/null +++ b/ci/set-target.sh | |||
| @@ -0,0 +1,40 @@ | |||
| 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 | ||
