Skip to content

Commit 5dba2ec

Browse files
jemyzhangshawn1m
authored andcommitted
Update travis to go 1.10.x, enable soft/hard-float for mips build (#80) (#86)
1 parent 05f1ac4 commit 5dba2ec

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

.travis.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
language: go
22
go:
3-
- 1.9.x
3+
- 1.10.x
44
addons:
55
apt:
66
packages:
@@ -22,7 +22,8 @@ deploy:
2222
- overture-linux-amd64.zip
2323
- overture-linux-arm.zip
2424
- overture-linux-arm64.zip
25-
- overture-linux-mips.zip
25+
- overture-linux-mips-softfloat.zip
26+
- overture-linux-mips-hardfloat.zip
2627
- overture-linux-mipsle.zip
2728
- overture-linux-mips64.zip
2829
- overture-linux-mips64le.zip

build.py

+7-5
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
["linux", "amd64"],
1111
["linux", "arm"],
1212
["linux", "arm64"],
13-
["linux", "mips"],
13+
["linux", "mips", "softfloat"],
14+
["linux", "mips", "hardfloat"],
1415
["linux", "mipsle"],
1516
["linux", "mips64"],
1617
["linux", "mips64le"],
@@ -34,17 +35,18 @@ def download_file():
3435

3536
def go_build_zip():
3637
subprocess.check_call("go get -v github.com/shawn1m/overture/main", shell=True)
37-
for o, a in GO_OS_ARCH_LIST:
38-
zip_name = "overture-" + o + "-" + a
38+
for o, a, *p in GO_OS_ARCH_LIST:
39+
zip_name = "overture-" + o + "-" + a + ("-" + (p[0] if p else "") if p else "")
3940
binary_name = zip_name + (".exe" if o == "windows" else "")
4041
version = subprocess.check_output("git describe --tags", shell=True).decode()
42+
mipsflag = (" GOMIPS=" + (p[0] if p else "") if p else "")
4143
try:
42-
subprocess.check_call("GOOS=" + o + " GOARCH=" + a + " CGO_ENABLED=0" + " go build -ldflags \"-s -w " +
44+
subprocess.check_call("GOOS=" + o + " GOARCH=" + a + mipsflag + " CGO_ENABLED=0" + " go build -ldflags \"-s -w " +
4345
"-X main.version=" + version + "\" -o " + binary_name + " main/main.go", shell=True)
4446
subprocess.check_call("zip " + zip_name + ".zip " + binary_name + " " + IP_NETWORK_SAMPLE_DICT["name"] + " " +
4547
DOMAIN_SAMPLE_DICT["name"] + " hosts_sample config.json", shell=True)
4648
except subprocess.CalledProcessError:
47-
print(o + " " + a + " failed.")
49+
print(o + " " + a + " " + (p[0] if p else "") + " failed.")
4850

4951

5052
def decode_domain_sample():

0 commit comments

Comments
 (0)