+(global): windows travis build
This commit is contained in:
parent
8911a38f43
commit
ca418de16f
44
.travis.yml
44
.travis.yml
|
@ -7,14 +7,31 @@ go:
|
||||||
os:
|
os:
|
||||||
- linux
|
- linux
|
||||||
- osx
|
- osx
|
||||||
|
- windows
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
- nvm install node
|
- |-
|
||||||
- npm install -g npm
|
case $TRAVIS_OS_NAME in
|
||||||
- curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $(go env GOPATH)/bin v1.23.8
|
linux | osx)
|
||||||
|
nvm install node
|
||||||
|
npm install -g npm
|
||||||
|
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $(go env GOPATH)/bin v1.23.8
|
||||||
|
;;
|
||||||
|
windows)
|
||||||
|
choco install node
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- npm --prefix client ci
|
- |-
|
||||||
|
case $TRAVIS_OS_NAME in
|
||||||
|
linux | osx)
|
||||||
|
npm --prefix client ci
|
||||||
|
;;
|
||||||
|
windows)
|
||||||
|
npm --prefix client ci
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
directories:
|
directories:
|
||||||
|
@ -23,10 +40,23 @@ cache:
|
||||||
- $HOME/Library/Caches/go-build
|
- $HOME/Library/Caches/go-build
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- /bin/bash ci.sh
|
- |-
|
||||||
|
case $TRAVIS_OS_NAME in
|
||||||
|
linux | osx)
|
||||||
|
/bin/bash ci.sh
|
||||||
|
;;
|
||||||
|
windows)
|
||||||
|
go test -race -v -bench=. -coverprofile=coverage.txt -covermode=atomic ./...
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
after_success:
|
after_success:
|
||||||
- bash <(curl -s https://codecov.io/bash)
|
- |-
|
||||||
|
case $TRAVIS_OS_NAME in
|
||||||
|
linux)
|
||||||
|
bash <(curl -s https://codecov.io/bash)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
slack: performix:yXTihlSzsLFSZiqbXMNzvTSX
|
slack: performix:yXTihlSzsLFSZiqbXMNzvTSX
|
||||||
|
@ -60,6 +90,8 @@ matrix:
|
||||||
file_glob: true
|
file_glob: true
|
||||||
skip_cleanup: true
|
skip_cleanup: true
|
||||||
|
|
||||||
|
# Docker build configuration
|
||||||
|
- if: repo = AdguardTeam/AdGuardHome
|
||||||
- name: docker
|
- name: docker
|
||||||
if: type != pull_request AND (branch = master OR tag IS present) AND repo = AdguardTeam/AdGuardHome
|
if: type != pull_request AND (branch = master OR tag IS present) AND repo = AdguardTeam/AdGuardHome
|
||||||
go:
|
go:
|
||||||
|
|
|
@ -13,7 +13,7 @@ func SetRlimit(val uint) {
|
||||||
|
|
||||||
func HaveAdminRights() (bool, error) {
|
func HaveAdminRights() (bool, error) {
|
||||||
var token windows.Token
|
var token windows.Token
|
||||||
h, _ := windows.GetCurrentProcess()
|
h := windows.CurrentProcess()
|
||||||
err := windows.OpenProcessToken(h, windows.TOKEN_QUERY, &token)
|
err := windows.OpenProcessToken(h, windows.TOKEN_QUERY, &token)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return false, err
|
return false, err
|
||||||
|
|
Loading…
Reference in New Issue