File: check-cross-compile.sh

package info (click to toggle)
golang-github-jackpal-gateway 1.0.16-1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 276 kB
  • sloc: sh: 38; makefile: 2
file content (21 lines) | stat: -rwxr-xr-x 488 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env bash

set -euo pipefail

SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )

TOP_DIR=${SCRIPT_DIR}/..

cd ${TOP_DIR}

# Check that tests pass on local os / architecture.

go test ./...

# Check that the library builds on all supported OSs.
#
# Note that "plan9" is in this list to test gateway_unimplemented.go
for os in "darwin" "dragonfly" "freebsd" "netbsd" "openbsd" "plan9" "solaris" "windows"
do
    GOOS=${os} GOARCH=amd64 go build
done