From 383d2df580dab30c56e9589b4033b7e2f867bc1d Mon Sep 17 00:00:00 2001 From: David Knaack Date: Sat, 30 Jan 2021 12:50:38 +0100 Subject: build: add x86_64 freebsd build (#2233) --- .github/workflows/deploy.yml | 4 ++++ Cross.toml | 2 ++ install/install.sh | 6 +++++- 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 Cross.toml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 4bd754077..30c1cbcc5 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -82,6 +82,10 @@ jobs: os: windows-latest name: starship-aarch64-pc-windows-msvc.zip + - target: x86_64-unknown-freebsd + os: ubuntu-latest + name: starship-x86_64-unknown-freebsd.tar.gz + runs-on: ${{ matrix.os }} continue-on-error: true steps: diff --git a/Cross.toml b/Cross.toml new file mode 100644 index 000000000..7c6d08a44 --- /dev/null +++ b/Cross.toml @@ -0,0 +1,2 @@ +[target.x86_64-unknown-freebsd] +image = "docker.io/rustembedded/cross:x86_64-unknown-freebsd" diff --git a/install/install.sh b/install/install.sh index c5a3b83a8..891cf1082 100755 --- a/install/install.sh +++ b/install/install.sh @@ -37,7 +37,8 @@ SUPPORTED_TARGETS="x86_64-unknown-linux-gnu x86_64-unknown-linux-musl \ i686-unknown-linux-musl aarch64-unknown-linux-musl \ arm-unknown-linux-musleabihf x86_64-apple-darwin \ aarch64-apple-darwin x86_64-pc-windows-msvc \ - i686-pc-windows-msvc aarch64-pc-windows-msvc" + i686-pc-windows-msvc aarch64-pc-windows-msvc \ + x86_64-unknown-freebsd" info() { printf "%s\n" "${BOLD}${GREY}>${NO_COLOR} $*" @@ -172,6 +173,7 @@ install() { # - darwin # - linux # - linux_musl (Alpine) +# - freebsd detect_platform() { local platform platform="$(uname -s | tr '[:upper:]' '[:lower:]')" @@ -184,6 +186,7 @@ detect_platform() { # use the statically compiled musl bins on linux to avoid linking issues. linux) platform="unknown-linux-musl" ;; darwin) platform="apple-darwin" ;; + freebsd) platform="unknown-freebsd" ;; esac echo "${platform}" @@ -197,6 +200,7 @@ detect_arch() { arch="$(uname -m | tr '[:upper:]' '[:lower:]')" case "${arch}" in + amd64) arch="x86_64" ;; armv*) arch="arm" ;; arm64) arch="aarch64" ;; esac -- cgit v1.2.3