From 755cba1e5ff140e4b730c943f40d7e13fba416aa Mon Sep 17 00:00:00 2001 From: MohammadReza Date: Fri, 30 Jul 2021 19:01:46 +0430 Subject: [PATCH 01/17] linux and windows machine configuration --- .appveyor.yml | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 .appveyor.yml diff --git a/.appveyor.yml b/.appveyor.yml new file mode 100644 index 0000000000..6d897eea08 --- /dev/null +++ b/.appveyor.yml @@ -0,0 +1,59 @@ +version: "{build}" + +platform: + - Any CPU + +stack: node 10.16.3 + +for: +- + # Develop | Windows + branches: + only: + - develop + + image: + - ubuntu1804 + - Visual Studio 2019 + + init: + - cmd: choco install make + + install: + - cmd: set GOPATH=c:\gopath + - cmd: echo %PATH% + - cmd: echo %GOPATH% + - cmd: set PATH=%GOPATH%\bin;c:\go\bin;%PATH% + - cmd: go version + - cmd: go env + - go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.40.1 + - make dep + - sh: ci_scripts/create-ip-aliases.sh + - make install-deps-ui + + before_build: + - make check + - make lint-ui + + build_script: + - make build + - make build-ui +- + # Master | Ubuntu 18.04 LTS + branches: + only: + - master + + image: + - ubuntu1804 + + install: + - make dep + - ci_scripts/create-ip-aliases.sh + + build_script: + - make build + + on_success: + - go install github.com/goreleaser/goreleaser@latest + - make github-release From 71986db0acbc15b5242fc9d435e480c936e7aa65 Mon Sep 17 00:00:00 2001 From: MohammadReza Date: Fri, 30 Jul 2021 19:07:19 +0430 Subject: [PATCH 02/17] remove develop branch condition --- .appveyor.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 6d897eea08..30b81c7558 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -7,11 +7,7 @@ stack: node 10.16.3 for: - - # Develop | Windows - branches: - only: - - develop - + # non-Master | Windows image: - ubuntu1804 - Visual Studio 2019 From d26babe51618b5fc648199152eb142714f858f42 Mon Sep 17 00:00:00 2001 From: MohammadReza Date: Fri, 30 Jul 2021 19:08:42 +0430 Subject: [PATCH 03/17] change a comment --- .appveyor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 30b81c7558..d60525e809 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -7,7 +7,7 @@ stack: node 10.16.3 for: - - # non-Master | Windows + # non-Master | Ubuntu 18.04 & Windows image: - ubuntu1804 - Visual Studio 2019 @@ -35,7 +35,7 @@ for: - make build - make build-ui - - # Master | Ubuntu 18.04 LTS + # Master for Release | Ubuntu 18.04 LTS branches: only: - master From 8ee71929685e41f8141c9a5289f1021894f513a0 Mon Sep 17 00:00:00 2001 From: MohammadReza Date: Sat, 31 Jul 2021 01:06:03 +0430 Subject: [PATCH 04/17] clean appveyor.yml file --- .appveyor.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index d60525e809..51a600cbea 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -17,11 +17,7 @@ for: install: - cmd: set GOPATH=c:\gopath - - cmd: echo %PATH% - - cmd: echo %GOPATH% - cmd: set PATH=%GOPATH%\bin;c:\go\bin;%PATH% - - cmd: go version - - cmd: go env - go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.40.1 - make dep - sh: ci_scripts/create-ip-aliases.sh From f36ba685dba9e0cda52b7f918737c8ff1b768697 Mon Sep 17 00:00:00 2001 From: MohammadReza Palide Date: Wed, 4 Aug 2021 08:14:40 +0430 Subject: [PATCH 05/17] complete .appveyor.yml script --- .appveyor.yml | 136 +++++++++++++++++++++++++++++++++++--------------- 1 file changed, 96 insertions(+), 40 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 51a600cbea..ba618b205d 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,51 +1,107 @@ version: "{build}" -platform: - - Any CPU - stack: node 10.16.3 + +environment: + matrix: + - job_name: linux-amd64 + appveyor_build_worker_image: ubuntu1804 + GOARCH: amd64 + - job_name: linux-arm + appveyor_build_worker_image: ubuntu1804 + GOARCH: arm + - job_name: linux-arm64 + appveyor_build_worker_image: ubuntu1804 + GOARCH: arm64 + - job_name: linux-386 + appveyor_build_worker_image: ubuntu1804 + GOARCH: 386 + - job_name: darwin-amd64 + appveyor_build_worker_image: macos + GOARCH: amd64 + - job_name: windows-amd64 + appveyor_build_worker_image: Visual Studio 2019 + GOARCH: amd64 for: -- - # non-Master | Ubuntu 18.04 & Windows - image: - - ubuntu1804 - - Visual Studio 2019 + - # Linux + matrix: + only: + - job_name: linux-arm + - job_name: linux-arm64 + - job_name: linux-amd64 + - job_name: linux-386 + + install: + - go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.40.1 + - make dep + - sh: ci_scripts/create-ip-aliases.sh + - make install-deps-ui - init: - - cmd: choco install make + before_build: + - make check + - make lint-ui - install: - - cmd: set GOPATH=c:\gopath - - cmd: set PATH=%GOPATH%\bin;c:\go\bin;%PATH% - - go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.40.1 - - make dep - - sh: ci_scripts/create-ip-aliases.sh - - make install-deps-ui + build_script: + - make build + - make build-ui + + after_build: + - sh: tar -cvzf skywire-$APPVEYOR_REPO_TAG_NAME-$APPVEYOR_JOB_NAME.tar.gz ./apps/* ./skywire-visor ./skywire-cli ./setup-node + + artifacts: + - path: skywire-$(APPVEYOR_REPO_TAG_NAME)-$(APPVEYOR_JOB_NAME).tar.gz + name: deploy + + deploy: + - provider: GitHub + release: $(APPVEYOR_REPO_TAG_NAME) + auth_token: + secure: +dDZyatyLWT+Z7155rSYe6riwBiyqpRQrha0IyXsvjojZRoQAS5L6UpBlNeBFBsM + draft: true + artifact: deploy + on: + APPVEYOR_REPO_TAG: true + - # Windows and MacOS + matrix: + only: + - job_name: darwin-amd64 + - job_name: windows-amd64 + + environment: + matrix: + - GOARCH: amd64 + + install: + - sh: curl -OL "https://golang.org/dl/go1.16.6.darwin-amd64.tar.gz" && sudo tar -C /usr/local -xzf go1.16.6.darwin-amd64.tar.gz && export GOPATH=$HOME/go && export GOROOT=/usr/local/go && export PATH=$GOROOT/bin:$GOPATH/bin:$PATH + - sh: ci_scripts/create-ip-aliases.sh + - cmd: choco install make + - go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.40.1 + - make dep + - make install-deps-ui - before_build: - - make check - - make lint-ui - - build_script: - - make build - - make build-ui -- - # Master for Release | Ubuntu 18.04 LTS - branches: - only: - - master + before_build: + - make check + - make lint-ui - image: - - ubuntu1804 + build_script: + - make build + - make build-ui - install: - - make dep - - ci_scripts/create-ip-aliases.sh + after_build: + - sh: tar -cvzf skywire-$APPVEYOR_REPO_TAG_NAME-$APPVEYOR_JOB_NAME.tar.gz ./apps/* ./skywire-visor ./skywire-cli ./setup-node + + artifacts: + - path: skywire-$(APPVEYOR_REPO_TAG_NAME)-$(APPVEYOR_JOB_NAME).tar.gz + name: deploy + + deploy: + - provider: GitHub + release: $(APPVEYOR_REPO_TAG_NAME) + auth_token: + secure: +dDZyatyLWT+Z7155rSYe6riwBiyqpRQrha0IyXsvjojZRoQAS5L6UpBlNeBFBsM + draft: true + artifact: deploy + on: + APPVEYOR_REPO_TAG: true - build_script: - - make build - - on_success: - - go install github.com/goreleaser/goreleaser@latest - - make github-release From a92670da5d9e960ebda914a1d29980b86ed3c40e Mon Sep 17 00:00:00 2001 From: MohammadReza Palide Date: Wed, 4 Aug 2021 08:34:19 +0430 Subject: [PATCH 06/17] change golangci-lint from v1.40.1 to v1.41.1 --- .appveyor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index ba618b205d..ba57bac235 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -33,7 +33,7 @@ for: - job_name: linux-386 install: - - go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.40.1 + - go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.41.1 - make dep - sh: ci_scripts/create-ip-aliases.sh - make install-deps-ui @@ -76,7 +76,7 @@ for: - sh: curl -OL "https://golang.org/dl/go1.16.6.darwin-amd64.tar.gz" && sudo tar -C /usr/local -xzf go1.16.6.darwin-amd64.tar.gz && export GOPATH=$HOME/go && export GOROOT=/usr/local/go && export PATH=$GOROOT/bin:$GOPATH/bin:$PATH - sh: ci_scripts/create-ip-aliases.sh - cmd: choco install make - - go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.40.1 + - go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.41.1 - make dep - make install-deps-ui From 7f936be5f2492377176e01c4d830fed0c00fda9c Mon Sep 17 00:00:00 2001 From: MohammadReza Palide Date: Wed, 4 Aug 2021 09:46:52 +0430 Subject: [PATCH 07/17] remove checking for arm, arm64 and 386 goarchs --- .appveyor.yml | 77 +++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 62 insertions(+), 15 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index ba57bac235..b5a10379c6 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -4,6 +4,17 @@ stack: node 10.16.3 environment: matrix: + # For regular push, pr and etc. + - job_name: linux-amd64-push + appveyor_build_worker_image: ubuntu1804 + GOARCH: amd64 + - job_name: darwin-amd64-push + appveyor_build_worker_image: macos + GOARCH: amd64 + - job_name: windows-amd64-push + appveyor_build_worker_image: Visual Studio 2019 + GOARCH: amd64 + # For release, by pushing tag - job_name: linux-amd64 appveyor_build_worker_image: ubuntu1804 GOARCH: amd64 @@ -22,18 +33,16 @@ environment: - job_name: windows-amd64 appveyor_build_worker_image: Visual Studio 2019 GOARCH: amd64 - + for: - # Linux + skip_tags: true matrix: only: - - job_name: linux-arm - - job_name: linux-arm64 - - job_name: linux-amd64 - - job_name: linux-386 + - job_name: linux-amd64-push install: - - go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.41.1 + - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.41.1 - make dep - sh: ci_scripts/create-ip-aliases.sh - make install-deps-ui @@ -46,6 +55,50 @@ for: - make build - make build-ui + - # Windows and MacOS + skip_tags: true + matrix: + only: + - job_name: darwin-amd64-push + - job_name: windows-amd64-push + + environment: + matrix: + - GOARCH: amd64 + + install: + - sh: curl -OL "https://golang.org/dl/go1.16.6.darwin-amd64.tar.gz" && sudo tar -C /usr/local -xzf go1.16.6.darwin-amd64.tar.gz && export GOPATH=$HOME/go && export GOROOT=/usr/local/go && export PATH=$GOROOT/bin:$GOPATH/bin:$PATH + - sh: ci_scripts/create-ip-aliases.sh + - cmd: choco install make + - go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.41.1 + - make dep + - make install-deps-ui + + before_build: + - make check + - make lint-ui + + build_script: + - make build + - make build-ui + + - # Linux (Release) + skip_non_tags: true + matrix: + only: + - job_name: linux-arm + - job_name: linux-arm64 + - job_name: linux-amd64 + - job_name: linux-386 + + install: + - make dep + - sh: ci_scripts/create-ip-aliases.sh + - export GOARM=7 + + build_script: + - make build + after_build: - sh: tar -cvzf skywire-$APPVEYOR_REPO_TAG_NAME-$APPVEYOR_JOB_NAME.tar.gz ./apps/* ./skywire-visor ./skywire-cli ./setup-node @@ -62,7 +115,9 @@ for: artifact: deploy on: APPVEYOR_REPO_TAG: true - - # Windows and MacOS + + - # Windows and MacOS (Release) + skip_non_tags: true matrix: only: - job_name: darwin-amd64 @@ -76,17 +131,10 @@ for: - sh: curl -OL "https://golang.org/dl/go1.16.6.darwin-amd64.tar.gz" && sudo tar -C /usr/local -xzf go1.16.6.darwin-amd64.tar.gz && export GOPATH=$HOME/go && export GOROOT=/usr/local/go && export PATH=$GOROOT/bin:$GOPATH/bin:$PATH - sh: ci_scripts/create-ip-aliases.sh - cmd: choco install make - - go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.41.1 - make dep - - make install-deps-ui - - before_build: - - make check - - make lint-ui build_script: - make build - - make build-ui after_build: - sh: tar -cvzf skywire-$APPVEYOR_REPO_TAG_NAME-$APPVEYOR_JOB_NAME.tar.gz ./apps/* ./skywire-visor ./skywire-cli ./setup-node @@ -104,4 +152,3 @@ for: artifact: deploy on: APPVEYOR_REPO_TAG: true - From 2a9aab519bcb543fcac68dc134ff514bc77e1223 Mon Sep 17 00:00:00 2001 From: MohammadReza Palide Date: Wed, 4 Aug 2021 11:29:10 +0430 Subject: [PATCH 08/17] clean .appveyor.yml file --- .appveyor.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index b5a10379c6..0280527924 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -5,13 +5,13 @@ stack: node 10.16.3 environment: matrix: # For regular push, pr and etc. - - job_name: linux-amd64-push + - job_name: Linux appveyor_build_worker_image: ubuntu1804 GOARCH: amd64 - - job_name: darwin-amd64-push + - job_name: MacOS appveyor_build_worker_image: macos GOARCH: amd64 - - job_name: windows-amd64-push + - job_name: Windows appveyor_build_worker_image: Visual Studio 2019 GOARCH: amd64 # For release, by pushing tag @@ -39,7 +39,7 @@ for: skip_tags: true matrix: only: - - job_name: linux-amd64-push + - job_name: Linux install: - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.41.1 @@ -59,8 +59,8 @@ for: skip_tags: true matrix: only: - - job_name: darwin-amd64-push - - job_name: windows-amd64-push + - job_name: MacOS + - job_name: Windows environment: matrix: @@ -110,7 +110,7 @@ for: - provider: GitHub release: $(APPVEYOR_REPO_TAG_NAME) auth_token: - secure: +dDZyatyLWT+Z7155rSYe6riwBiyqpRQrha0IyXsvjojZRoQAS5L6UpBlNeBFBsM + secure: draft: true artifact: deploy on: @@ -147,7 +147,7 @@ for: - provider: GitHub release: $(APPVEYOR_REPO_TAG_NAME) auth_token: - secure: +dDZyatyLWT+Z7155rSYe6riwBiyqpRQrha0IyXsvjojZRoQAS5L6UpBlNeBFBsM + secure: draft: true artifact: deploy on: From c3584f11c4f9497384d11a7bd72ecebf35628e54 Mon Sep 17 00:00:00 2001 From: MohammadReza Palide Date: Thu, 5 Aug 2021 13:04:39 +0430 Subject: [PATCH 09/17] add secure code (github token) --- .appveyor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 0280527924..cab12fa7aa 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -110,7 +110,7 @@ for: - provider: GitHub release: $(APPVEYOR_REPO_TAG_NAME) auth_token: - secure: + secure: ZrbNBE2wSfGvHzEq5GqEAUmNy7myDIl7KK05CKlZdQfieV7XdIAPXpkdHNEyZbvT draft: true artifact: deploy on: @@ -147,7 +147,7 @@ for: - provider: GitHub release: $(APPVEYOR_REPO_TAG_NAME) auth_token: - secure: + secure: ZrbNBE2wSfGvHzEq5GqEAUmNy7myDIl7KK05CKlZdQfieV7XdIAPXpkdHNEyZbvT draft: true artifact: deploy on: From ab4f79fdfb956907f5d046ee412d08f710f7e667 Mon Sep 17 00:00:00 2001 From: MohammadReza Date: Wed, 11 Aug 2021 21:02:59 +0430 Subject: [PATCH 10/17] push a commit for test appveyor --- .appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index cab12fa7aa..50027c9e49 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -4,7 +4,7 @@ stack: node 10.16.3 environment: matrix: - # For regular push, pr and etc. + # For regular jobs, such as push, pr and etc. - job_name: Linux appveyor_build_worker_image: ubuntu1804 GOARCH: amd64 From 34ef6347b4e31677a22521f65af47f2b78be3d89 Mon Sep 17 00:00:00 2001 From: MohammadReza Palide Date: Wed, 25 Aug 2021 01:15:46 +0430 Subject: [PATCH 11/17] change version of golangci-lint from 1.41.1 to 1.42.0 --- .appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index 50027c9e49..c6f9aa65bc 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -42,7 +42,7 @@ for: - job_name: Linux install: - - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.41.1 + - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.42.0 - make dep - sh: ci_scripts/create-ip-aliases.sh - make install-deps-ui From b7e76a31e478f14d2abce7a0aff3a82a2db41f82 Mon Sep 17 00:00:00 2001 From: MohammadReza Palide Date: Wed, 25 Aug 2021 15:17:52 +0430 Subject: [PATCH 12/17] fix golangci-lint error on Windows image --- .appveyor.yml | 6 ++++-- Makefile | 5 +++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index c6f9aa65bc..06303bfff1 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -70,12 +70,14 @@ for: - sh: curl -OL "https://golang.org/dl/go1.16.6.darwin-amd64.tar.gz" && sudo tar -C /usr/local -xzf go1.16.6.darwin-amd64.tar.gz && export GOPATH=$HOME/go && export GOROOT=/usr/local/go && export PATH=$GOROOT/bin:$GOPATH/bin:$PATH - sh: ci_scripts/create-ip-aliases.sh - cmd: choco install make - - go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.41.1 + - go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.42.0 - make dep - make install-deps-ui before_build: - - make check + - cmd: set GO111MODULE=on + - cmd: make check-windows-appveyor + - sh: make check - make lint-ui build_script: diff --git a/Makefile b/Makefile index fa0396c8b3..8c27d030cc 100644 --- a/Makefile +++ b/Makefile @@ -43,6 +43,8 @@ BUILD_OPTS_DEPLOY?="-ldflags=$(BUILDINFO) -w -s" check: lint test ## Run linters and tests +check-windows-appveyor: lint-windows-appveyor test ## Run linters and tests on appveyor windows image + build: host-apps bin ## Install dependencies, build apps and binaries. `go build` with ${OPTS} build-static: host-apps-static bin-static ## Build apps and binaries. `go build` with ${OPTS} @@ -73,6 +75,9 @@ lint: ## Run linters. Use make install-linters first ${OPTS} golangci-lint run -c .golangci.yml ./... # The govet version in golangci-lint is out of date and has spurious warnings, run it separately +lint-windows-appveyor: + C:\Users\appveyor\go\bin\golangci-lint run -c .golangci.yml ./... + lint-extra: ## Run linters with extra checks. ${OPTS} golangci-lint run --no-config --enable-all ./... # The govet version in golangci-lint is out of date and has spurious warnings, run it separately From 86db0f9b1dd225bdaa0605afea02d9e3ccedc9bb Mon Sep 17 00:00:00 2001 From: MohammadReza Palide Date: Wed, 25 Aug 2021 15:52:42 +0430 Subject: [PATCH 13/17] disable windows build --- .appveyor.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 06303bfff1..f8dca04971 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -11,9 +11,9 @@ environment: - job_name: MacOS appveyor_build_worker_image: macos GOARCH: amd64 - - job_name: Windows - appveyor_build_worker_image: Visual Studio 2019 - GOARCH: amd64 + # - job_name: Windows + # appveyor_build_worker_image: Visual Studio 2019 + # GOARCH: amd64 # For release, by pushing tag - job_name: linux-amd64 appveyor_build_worker_image: ubuntu1804 @@ -30,9 +30,9 @@ environment: - job_name: darwin-amd64 appveyor_build_worker_image: macos GOARCH: amd64 - - job_name: windows-amd64 - appveyor_build_worker_image: Visual Studio 2019 - GOARCH: amd64 + # - job_name: windows-amd64 + # appveyor_build_worker_image: Visual Studio 2019 + # GOARCH: amd64 for: - # Linux @@ -60,7 +60,7 @@ for: matrix: only: - job_name: MacOS - - job_name: Windows + # - job_name: Windows environment: matrix: @@ -123,7 +123,7 @@ for: matrix: only: - job_name: darwin-amd64 - - job_name: windows-amd64 + # - job_name: windows-amd64 environment: matrix: From 92aea4e5d7821f6038f79bc46fbfd4865d57b17c Mon Sep 17 00:00:00 2001 From: MohammadReza Palide Date: Wed, 25 Aug 2021 16:35:32 +0430 Subject: [PATCH 14/17] final test of appveyor --- .appveyor.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.appveyor.yml b/.appveyor.yml index f8dca04971..39dfec2290 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -14,6 +14,7 @@ environment: # - job_name: Windows # appveyor_build_worker_image: Visual Studio 2019 # GOARCH: amd64 + # For release, by pushing tag - job_name: linux-amd64 appveyor_build_worker_image: ubuntu1804 From d919a7b289709f7cc0af3033382e0caf8b56c06c Mon Sep 17 00:00:00 2001 From: MohammadReza Palide Date: Fri, 27 Aug 2021 12:39:24 +0430 Subject: [PATCH 15/17] fix Uptime testcase that accept more than 1.0 second as passed --- pkg/visor/rpc_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/visor/rpc_test.go b/pkg/visor/rpc_test.go index e064b4ed4b..a170d16b31 100644 --- a/pkg/visor/rpc_test.go +++ b/pkg/visor/rpc_test.go @@ -1,7 +1,6 @@ package visor import ( - "fmt" "net/http" "testing" "time" @@ -103,7 +102,7 @@ func TestUptime(t *testing.T) { err := rpc.Uptime(nil, &res) require.NoError(t, err) - assert.Contains(t, fmt.Sprintf("%f", res), "1.0") + assert.GreaterOrEqual(t, res, 1.0) } // TODO(evanlinjin): These should be moved to /pkg/app/launcher From 0fb9362c85fb0a8e17f22dbe0addcc919504242a Mon Sep 17 00:00:00 2001 From: MohammadReza Palide Date: Wed, 1 Sep 2021 13:46:43 +0430 Subject: [PATCH 16/17] remove manual installation go and use macos image updated go --- .appveyor.yml | 113 ++++++++++++++++++++++++-------------------------- 1 file changed, 55 insertions(+), 58 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 39dfec2290..825d032b89 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -36,11 +36,12 @@ environment: # GOARCH: amd64 for: - - # Linux + - # Linux and MacOS skip_tags: true matrix: only: - job_name: Linux + - job_name: MacOS install: - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.42.0 @@ -56,36 +57,32 @@ for: - make build - make build-ui - - # Windows and MacOS - skip_tags: true - matrix: - only: - - job_name: MacOS - # - job_name: Windows + # - # Windows + # skip_tags: true + # matrix: + # only: + # - job_name: Windows - environment: - matrix: - - GOARCH: amd64 + # environment: + # matrix: + # - GOARCH: amd64 - install: - - sh: curl -OL "https://golang.org/dl/go1.16.6.darwin-amd64.tar.gz" && sudo tar -C /usr/local -xzf go1.16.6.darwin-amd64.tar.gz && export GOPATH=$HOME/go && export GOROOT=/usr/local/go && export PATH=$GOROOT/bin:$GOPATH/bin:$PATH - - sh: ci_scripts/create-ip-aliases.sh - - cmd: choco install make - - go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.42.0 - - make dep - - make install-deps-ui + # install: + # - choco install make + # - go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.42.0 + # - make dep + # - make install-deps-ui - before_build: - - cmd: set GO111MODULE=on - - cmd: make check-windows-appveyor - - sh: make check - - make lint-ui + # before_build: + # - set GO111MODULE=on + # - make check-windows-appveyor + # - make lint-ui - build_script: - - make build - - make build-ui + # build_script: + # - make build + # - make build-ui - - # Linux (Release) + - # Linux and MacOS (Release) skip_non_tags: true matrix: only: @@ -93,17 +90,18 @@ for: - job_name: linux-arm64 - job_name: linux-amd64 - job_name: linux-386 + - job_name: darwin-amd64 install: - make dep - - sh: ci_scripts/create-ip-aliases.sh + - ci_scripts/create-ip-aliases.sh - export GOARM=7 build_script: - make build after_build: - - sh: tar -cvzf skywire-$APPVEYOR_REPO_TAG_NAME-$APPVEYOR_JOB_NAME.tar.gz ./apps/* ./skywire-visor ./skywire-cli ./setup-node + - tar -cvzf skywire-$APPVEYOR_REPO_TAG_NAME-$APPVEYOR_JOB_NAME.tar.gz ./apps/* ./skywire-visor ./skywire-cli ./setup-node artifacts: - path: skywire-$(APPVEYOR_REPO_TAG_NAME)-$(APPVEYOR_JOB_NAME).tar.gz @@ -119,39 +117,38 @@ for: on: APPVEYOR_REPO_TAG: true - - # Windows and MacOS (Release) - skip_non_tags: true - matrix: - only: - - job_name: darwin-amd64 - # - job_name: windows-amd64 + # - # Windows (Release) + # skip_non_tags: true + # matrix: + # only: + # - job_name: windows-amd64 - environment: - matrix: - - GOARCH: amd64 + # environment: + # matrix: + # - GOARCH: amd64 - install: - - sh: curl -OL "https://golang.org/dl/go1.16.6.darwin-amd64.tar.gz" && sudo tar -C /usr/local -xzf go1.16.6.darwin-amd64.tar.gz && export GOPATH=$HOME/go && export GOROOT=/usr/local/go && export PATH=$GOROOT/bin:$GOPATH/bin:$PATH - - sh: ci_scripts/create-ip-aliases.sh - - cmd: choco install make - - make dep + # install: + # - sh: curl -OL "https://golang.org/dl/go1.16.6.darwin-amd64.tar.gz" && sudo tar -C /usr/local -xzf go1.16.6.darwin-amd64.tar.gz && export GOPATH=$HOME/go && export GOROOT=/usr/local/go && export PATH=$GOROOT/bin:$GOPATH/bin:$PATH + # - sh: ci_scripts/create-ip-aliases.sh + # - cmd: choco install make + # - make dep - build_script: - - make build + # build_script: + # - make build - after_build: - - sh: tar -cvzf skywire-$APPVEYOR_REPO_TAG_NAME-$APPVEYOR_JOB_NAME.tar.gz ./apps/* ./skywire-visor ./skywire-cli ./setup-node + # after_build: + # - sh: tar -cvzf skywire-$APPVEYOR_REPO_TAG_NAME-$APPVEYOR_JOB_NAME.tar.gz ./apps/* ./skywire-visor ./skywire-cli ./setup-node - artifacts: - - path: skywire-$(APPVEYOR_REPO_TAG_NAME)-$(APPVEYOR_JOB_NAME).tar.gz - name: deploy + # artifacts: + # - path: skywire-$(APPVEYOR_REPO_TAG_NAME)-$(APPVEYOR_JOB_NAME).tar.gz + # name: deploy - deploy: - - provider: GitHub - release: $(APPVEYOR_REPO_TAG_NAME) - auth_token: - secure: ZrbNBE2wSfGvHzEq5GqEAUmNy7myDIl7KK05CKlZdQfieV7XdIAPXpkdHNEyZbvT - draft: true - artifact: deploy - on: - APPVEYOR_REPO_TAG: true + # deploy: + # - provider: GitHub + # release: $(APPVEYOR_REPO_TAG_NAME) + # auth_token: + # secure: ZrbNBE2wSfGvHzEq5GqEAUmNy7myDIl7KK05CKlZdQfieV7XdIAPXpkdHNEyZbvT + # draft: true + # artifact: deploy + # on: + # APPVEYOR_REPO_TAG: true From 9b7260176897d5eeee3c6554c2d56a4894b77e93 Mon Sep 17 00:00:00 2001 From: MohammadReza Palide Date: Tue, 7 Sep 2021 22:52:12 +0430 Subject: [PATCH 17/17] enable windows build/deploy --- .appveyor.yml | 108 +++++++++++++++++++++++++------------------------- 1 file changed, 53 insertions(+), 55 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 825d032b89..218e9b3ff7 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -11,9 +11,9 @@ environment: - job_name: MacOS appveyor_build_worker_image: macos GOARCH: amd64 - # - job_name: Windows - # appveyor_build_worker_image: Visual Studio 2019 - # GOARCH: amd64 + - job_name: Windows + appveyor_build_worker_image: Visual Studio 2019 + GOARCH: amd64 # For release, by pushing tag - job_name: linux-amd64 @@ -31,9 +31,9 @@ environment: - job_name: darwin-amd64 appveyor_build_worker_image: macos GOARCH: amd64 - # - job_name: windows-amd64 - # appveyor_build_worker_image: Visual Studio 2019 - # GOARCH: amd64 + - job_name: windows-amd64 + appveyor_build_worker_image: Visual Studio 2019 + GOARCH: amd64 for: - # Linux and MacOS @@ -57,30 +57,30 @@ for: - make build - make build-ui - # - # Windows - # skip_tags: true - # matrix: - # only: - # - job_name: Windows + - # Windows + skip_tags: true + matrix: + only: + - job_name: Windows - # environment: - # matrix: - # - GOARCH: amd64 + environment: + matrix: + - GOARCH: amd64 - # install: - # - choco install make - # - go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.42.0 - # - make dep - # - make install-deps-ui + install: + - choco install make + - go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.42.0 + - make dep + - make install-deps-ui - # before_build: - # - set GO111MODULE=on - # - make check-windows-appveyor - # - make lint-ui + before_build: + - set GO111MODULE=on + - make check-windows-appveyor + - make lint-ui - # build_script: - # - make build - # - make build-ui + build_script: + - make build + - make build-ui - # Linux and MacOS (Release) skip_non_tags: true @@ -117,38 +117,36 @@ for: on: APPVEYOR_REPO_TAG: true - # - # Windows (Release) - # skip_non_tags: true - # matrix: - # only: - # - job_name: windows-amd64 + - # Windows (Release) + skip_non_tags: true + matrix: + only: + - job_name: windows-amd64 - # environment: - # matrix: - # - GOARCH: amd64 + environment: + matrix: + - GOARCH: amd64 - # install: - # - sh: curl -OL "https://golang.org/dl/go1.16.6.darwin-amd64.tar.gz" && sudo tar -C /usr/local -xzf go1.16.6.darwin-amd64.tar.gz && export GOPATH=$HOME/go && export GOROOT=/usr/local/go && export PATH=$GOROOT/bin:$GOPATH/bin:$PATH - # - sh: ci_scripts/create-ip-aliases.sh - # - cmd: choco install make - # - make dep + install: + - cmd: choco install make + - make dep - # build_script: - # - make build + build_script: + - make build - # after_build: - # - sh: tar -cvzf skywire-$APPVEYOR_REPO_TAG_NAME-$APPVEYOR_JOB_NAME.tar.gz ./apps/* ./skywire-visor ./skywire-cli ./setup-node + after_build: + - sh: tar -cvzf skywire-$APPVEYOR_REPO_TAG_NAME-$APPVEYOR_JOB_NAME.tar.gz ./apps/* ./skywire-visor ./skywire-cli ./setup-node - # artifacts: - # - path: skywire-$(APPVEYOR_REPO_TAG_NAME)-$(APPVEYOR_JOB_NAME).tar.gz - # name: deploy + artifacts: + - path: skywire-$(APPVEYOR_REPO_TAG_NAME)-$(APPVEYOR_JOB_NAME).tar.gz + name: deploy - # deploy: - # - provider: GitHub - # release: $(APPVEYOR_REPO_TAG_NAME) - # auth_token: - # secure: ZrbNBE2wSfGvHzEq5GqEAUmNy7myDIl7KK05CKlZdQfieV7XdIAPXpkdHNEyZbvT - # draft: true - # artifact: deploy - # on: - # APPVEYOR_REPO_TAG: true + deploy: + - provider: GitHub + release: $(APPVEYOR_REPO_TAG_NAME) + auth_token: + secure: ZrbNBE2wSfGvHzEq5GqEAUmNy7myDIl7KK05CKlZdQfieV7XdIAPXpkdHNEyZbvT + draft: true + artifact: deploy + on: + APPVEYOR_REPO_TAG: true