.travis.yml 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. language: go
  2. go:
  3. - "1.13"
  4. - master
  5. script:
  6. - go test -v ./cmd/nps/
  7. before_deploy:
  8. - wget https://github.com/upx/upx/releases/download/v3.95/upx-3.95-amd64_linux.tar.xz
  9. - tar -xvf upx-3.95-amd64_linux.tar.xz
  10. - cp upx-3.95-amd64_linux/upx ./
  11. - CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "-s -w -extldflags -static -extldflags -static" ./cmd/npc/npc.go
  12. - tar -czvf linux_amd64_client.tar.gz npc conf/npc.conf
  13. - CGO_ENABLED=0 GOOS=linux GOARCH=386 go build -ldflags "-s -w -extldflags -static -extldflags -static" ./cmd/npc/npc.go
  14. - tar -czvf linux_386_client.tar.gz npc conf/npc.conf
  15. - CGO_ENABLED=0 GOOS=freebsd GOARCH=386 go build -ldflags "-s -w -extldflags -static -extldflags -static" ./cmd/npc/npc.go
  16. - tar -czvf freebsd_386_client.tar.gz npc conf/npc.conf
  17. - CGO_ENABLED=0 GOOS=freebsd GOARCH=amd64 go build -ldflags "-s -w -extldflags -static -extldflags -static" ./cmd/npc/npc.go
  18. - tar -czvf freebsd_amd64_client.tar.gz npc conf/npc.conf
  19. - CGO_ENABLED=0 GOOS=freebsd GOARCH=arm go build -ldflags "-s -w -extldflags -static -extldflags -static" ./cmd/npc/npc.go
  20. - tar -czvf freebsd_arm_client.tar.gz npc conf/npc.conf
  21. - CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=7 go build -ldflags "-s -w -extldflags -static -extldflags -static" ./cmd/npc/npc.go
  22. - tar -czvf linux_arm7_client.tar.gz npc conf/npc.conf
  23. - CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=6 go build -ldflags "-s -w -extldflags -static -extldflags -static" ./cmd/npc/npc.go
  24. - tar -czvf linux_arm6_client.tar.gz npc conf/npc.conf
  25. -
  26. - CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=5 go build -ldflags "-s -w -extldflags -static -extldflags -static" ./cmd/npc/npc.go
  27. - tar -czvf linux_arm5_client.tar.gz npc conf/npc.conf
  28. - CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -ldflags "-s -w -extldflags -static -extldflags -static" ./cmd/npc/npc.go
  29. - tar -czvf linux_arm64_client.tar.gz npc conf/npc.conf
  30. - CGO_ENABLED=0 GOOS=linux GOARCH=mips64 go build -ldflags "-s -w -extldflags -static -extldflags -static" ./cmd/npc/npc.go
  31. - tar -czvf linux_mips64_client.tar.gz npc conf/npc.conf
  32. - CGO_ENABLED=0 GOOS=linux GOARCH=mips64le go build -ldflags "-s -w -extldflags -static -extldflags -static" ./cmd/npc/npc.go
  33. - tar -czvf linux_mips64le_client.tar.gz npc conf/npc.conf
  34. - CGO_ENABLED=0 GOOS=linux GOARCH=mipsle go build -ldflags "-s -w -extldflags -static -extldflags -static" ./cmd/npc/npc.go
  35. - tar -czvf linux_mipsle_client.tar.gz npc conf/npc.conf
  36. - CGO_ENABLED=0 GOOS=linux GOARCH=mips go build -ldflags "-s -w -extldflags -static -extldflags -static" ./cmd/npc/npc.go
  37. - tar -czvf linux_mips_client.tar.gz npc conf/npc.conf
  38. - CGO_ENABLED=0 GOOS=windows GOARCH=386 go build -ldflags "-s -w -extldflags -static -extldflags -static" ./cmd/npc/npc.go
  39. - tar -czvf win_386_client.tar.gz npc.exe conf/npc.conf
  40. - CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags "-s -w -extldflags -static -extldflags -static" ./cmd/npc/npc.go
  41. - tar -czvf win_amd64_client.tar.gz npc.exe conf/npc.conf
  42. - CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags "-s -w -extldflags -static -extldflags -static" ./cmd/npc/npc.go
  43. - tar -czvf macos_client.tar.gz npc conf/npc.conf
  44. - CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "-s -w -extldflags -static -extldflags -static" ./cmd/nps/nps.go
  45. - tar -czvf linux_amd64_server.tar.gz conf/nps.conf conf/tasks.json conf/clients.json conf/hosts.json conf/server.key conf/server.pem web/views web/static nps
  46. - CGO_ENABLED=0 GOOS=linux GOARCH=386 go build -ldflags "-s -w -extldflags -static -extldflags -static" ./cmd/nps/nps.go
  47. - tar -czvf linux_386_server.tar.gz conf/nps.conf conf/tasks.json conf/clients.json conf/hosts.json conf/server.key conf/server.pem web/views web/static nps
  48. - CGO_ENABLED=0 GOOS=linux GOARCH=arm go build -ldflags "-s -w -extldflags -static -extldflags -static" ./cmd/nps/nps.go
  49. - tar -czvf linux_arm_server.tar.gz conf/nps.conf conf/tasks.json conf/clients.json conf/hosts.json conf/server.key conf/server.pem web/views web/static nps
  50. - CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -ldflags "-s -w -extldflags -static -extldflags -static" ./cmd/nps/nps.go
  51. - tar -czvf linux_arm64_server.tar.gz conf/nps.conf conf/tasks.json conf/clients.json conf/hosts.json conf/server.key conf/server.pem web/views web/static nps
  52. - CGO_ENABLED=0 GOOS=freebsd GOARCH=arm go build -ldflags "-s -w -extldflags -static -extldflags -static" ./cmd/nps/nps.go
  53. - tar -czvf freebsd_arm_server.tar.gz conf/nps.conf conf/tasks.json conf/clients.json conf/hosts.json conf/server.key conf/server.pem web/views web/static nps
  54. - CGO_ENABLED=0 GOOS=freebsd GOARCH=386 go build -ldflags "-s -w -extldflags -static -extldflags -static" ./cmd/nps/nps.go
  55. - tar -czvf freebsd_386_server.tar.gz conf/nps.conf conf/tasks.json conf/clients.json conf/hosts.json conf/server.key conf/server.pem web/views web/static nps
  56. - CGO_ENABLED=0 GOOS=freebsd GOARCH=amd64 go build -ldflags "-s -w -extldflags -static -extldflags -static" ./cmd/nps/nps.go
  57. - tar -czvf freebsd_amd64_server.tar.gz conf/nps.conf conf/tasks.json conf/clients.json conf/hosts.json conf/server.key conf/server.pem web/views web/static nps
  58. - CGO_ENABLED=0 GOOS=linux GOARCH=mips go build -ldflags "-s -w -extldflags -static -extldflags -static" ./cmd/nps/nps.go
  59. - tar -czvf linux_mips_server.tar.gz conf/nps.conf conf/tasks.json conf/clients.json conf/hosts.json conf/server.key conf/server.pem web/views web/static nps
  60. - CGO_ENABLED=0 GOOS=linux GOARCH=mips64 go build -ldflags "-s -w -extldflags -static -extldflags -static" ./cmd/nps/nps.go
  61. - tar -czvf linux_mips64_server.tar.gz conf/nps.conf conf/tasks.json conf/clients.json conf/hosts.json conf/server.key conf/server.pem web/views web/static nps
  62. - CGO_ENABLED=0 GOOS=linux GOARCH=mips64le go build -ldflags "-s -w -extldflags -static -extldflags -static" ./cmd/nps/nps.go
  63. - tar -czvf linux_mips64le_server.tar.gz conf/nps.conf conf/tasks.json conf/clients.json conf/hosts.json conf/server.key conf/server.pem web/views web/static nps
  64. - CGO_ENABLED=0 GOOS=linux GOARCH=mipsle go build -ldflags "-s -w -extldflags -static -extldflags -static" ./cmd/nps/nps.go
  65. - tar -czvf linux_mipsle_server.tar.gz conf/nps.conf conf/tasks.json conf/clients.json conf/hosts.json conf/server.key conf/server.pem web/views web/static nps
  66. - CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags "-s -w -extldflags -static -extldflags -static" ./cmd/nps/nps.go
  67. - tar -czvf macos_server.tar.gz conf/nps.conf conf/tasks.json conf/clients.json conf/hosts.json conf/server.key conf/server.pem web/views web/static nps
  68. - CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags "-s -w -extldflags -static -extldflags -static" ./cmd/nps/nps.go
  69. - tar -czvf win_amd64_server.tar.gz conf/nps.conf conf/tasks.json conf/clients.json conf/hosts.json conf/server.key conf/server.pem web/views web/static nps.exe
  70. - CGO_ENABLED=0 GOOS=windows GOARCH=386 go build -ldflags "-s -w -extldflags -static -extldflags -static" ./cmd/nps/nps.go
  71. - tar -czvf win_386_server.tar.gz conf/nps.conf conf/tasks.json conf/clients.json conf/hosts.json conf/server.key conf/server.pem web/views web/static nps.exe
  72. deploy:
  73. provider: releases
  74. api_key:
  75. secure: ${TOKEN}
  76. skip_cleanup: true
  77. file:
  78. - freebsd_386_client.tar.gz
  79. - freebsd_386_server.tar.gz
  80. - freebsd_amd64_client.tar.gz
  81. - freebsd_amd64_server.tar.gz
  82. - freebsd_arm_client.tar.gz
  83. - freebsd_arm_server.tar.gz
  84. - linux_386_client.tar.gz
  85. - linux_386_server.tar.gz
  86. - linux_amd64_client.tar.gz
  87. - linux_amd64_server.tar.gz
  88. - linux_arm64_client.tar.gz
  89. - linux_arm64_server.tar.gz
  90. - linux_arm_client.tar.gz
  91. - linux_arm_server.tar.gz
  92. - linux_mips64le_client.tar.gz
  93. - linux_mips64le_server.tar.gz
  94. - linux_mips64_client.tar.gz
  95. - linux_mips64_server.tar.gz
  96. - linux_mipsle_client.tar.gz
  97. - linux_mipsle_server.tar.gz
  98. - linux_mips_client.tar.gz
  99. - linux_mips_server.tar.gz
  100. - macos_client.tar.gz
  101. - macos_server.tar.gz
  102. - win_386_client.tar.gz
  103. - win_386_server.tar.gz
  104. - win_amd64_client.tar.gz
  105. - win_amd64_server.tar.gz
  106. on:
  107. tags: true
  108. all_branches: true