Skip to content

Commit

Permalink
CI: make windows build faster (#4443)
Browse files Browse the repository at this point in the history
* use Go module caching (in setup-go@v3) and libsodium build caching
* rename workflow
* upgrade to 1.17.13
  • Loading branch information
cce authored Aug 24, 2022
1 parent 87867c9 commit e6bd9a3
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 12 deletions.
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ commands:
shell: bash.exe
command: |
choco install -y msys2 pacman make wget --force
choco install -y golang --version=1.17.9 --force
choco install -y golang --version=1.17.13 --force
choco install -y python3 --version=3.7.3 --force
export msys2='cmd //C RefreshEnv.cmd '
export msys2+='& set MSYS=winsymlinks:nativestrict '
Expand All @@ -228,7 +228,7 @@ commands:
- restore_libsodium
- restore_cache:
keys:
- 'go-mod-1.17.9-v4-{{ arch }}-{{ checksum "go.mod" }}-{{ checksum "go.sum" }}'
- 'go-mod-1.17.13-v4-{{ arch }}-{{ checksum "go.mod" }}-{{ checksum "go.sum" }}'
- restore_cache:
keys:
- 'go-cache-v4-{{ arch }}-{{ .Branch }}-{{ .Revision }}'
Expand All @@ -246,7 +246,7 @@ commands:
scripts/travis/build.sh --make_debug
- cache_libsodium
- save_cache:
key: 'go-mod-1.17.9-v4-{{ arch }}-{{ checksum "go.mod" }}-{{ checksum "go.sum" }}'
key: 'go-mod-1.17.13-v4-{{ arch }}-{{ checksum "go.mod" }}-{{ checksum "go.sum" }}'
paths:
- << parameters.build_dir >>/go/pkg/mod
- save_cache:
Expand Down
18 changes: 12 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: "Build workflow"
name: "Build Windows"
on:
pull_request:
jobs:
build-test-windows:
build-windows:
runs-on: windows-2022
defaults:
run:
Expand All @@ -14,14 +14,20 @@ jobs:
update: true
path-type: inherit
- name: Check out code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install golang
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: '1.17.9'
- name: Build Test
go-version: "1.17.13"
- name: Restore libsodium from cache
id: cache-libsodium
uses: actions/cache@v3
with:
path: crypto/libs
key: libsodium-fork-v2-${{ runner.os }}-${{ hashFiles('crypto/libsodium-fork/**') }}
- name: Build
run: |
export ALGORAND_DEADLOCK=enable
export SKIP_GO_INSTALLATION=True
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reviewdog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
- name: Install specific golang
uses: actions/setup-go@v2
with:
go-version: '1.17.9'
go-version: '1.17.13'
- name: Create folders for golangci-lint
run: mkdir -p cicdtmp/golangci-lint
- name: Check if custom golangci-lint is already built
Expand Down
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ else
export GOPATH := $(shell go env GOPATH)
GOPATH1 := $(firstword $(subst :, ,$(GOPATH)))
endif
export GOPROXY := direct
SRCPATH := $(shell pwd)
ARCH := $(shell ./scripts/archtype.sh)
OS_TYPE := $(shell ./scripts/ostype.sh)
Expand Down
2 changes: 1 addition & 1 deletion scripts/get_golang_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# Our build task-runner `mule` will refer to this script and will automatically
# build a new image whenever the version number has been changed.

BUILD=1.17.9
BUILD=1.17.13
MIN=1.17
GO_MOD_SUPPORT=1.17

Expand Down

0 comments on commit e6bd9a3

Please sign in to comment.