Skip to content

Commit 6698dba

Browse files
committed
update cache
1 parent 8a6418e commit 6698dba

3 files changed

Lines changed: 12 additions & 1 deletion

File tree

.github/workflows/build-release.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,14 @@ jobs:
3838
echo 'BUILD_TIME=$(date --iso-8601=seconds)' >> .release-env
3939
echo 'VERSION=${{ github.event.release.tag_name }}' >> .release-env
4040
echo 'GITHUB_TOKEN=${{ secrets.FLOW_CLI_RELEASE }}' >> .release-env
41+
# Create temp and cache directories in workspace; set container-visible paths
42+
mkdir -p ${GITHUB_WORKSPACE}/tmp
43+
mkdir -p ${GITHUB_WORKSPACE}/.cache/go-build
44+
mkdir -p ${GITHUB_WORKSPACE}/.cache/gomod
45+
echo "TMPDIR=/go/src/github.com/onflow/flow-cli/tmp" >> .release-env
46+
echo "GOTMPDIR=/go/src/github.com/onflow/flow-cli/tmp" >> .release-env
47+
echo "GOCACHE=/go/src/github.com/onflow/flow-cli/.cache/go-build" >> .release-env
48+
echo "GOMODCACHE=/go/src/github.com/onflow/flow-cli/.cache/gomod" >> .release-env
49+
echo "XDG_CACHE_HOME=/go/src/github.com/onflow/flow-cli/.cache" >> .release-env
4150
- name: Build and Release
4251
run: make release

.goreleaser.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ builds:
1717
env:
1818
- CGO_CFLAGS=-O2 -D__BLST_PORTABLE__ -std=gnu11
1919
- CGO_ENABLED=1
20+
- GOFLAGS=-p=1
2021
# Darwin
2122
- CC_darwin_amd64=o64-clang
2223
- CXX_darwin_amd64=o64-clang++
@@ -40,7 +41,6 @@ builds:
4041
- -mod=readonly
4142
ldflags:
4243
- -X github.com/onflow/flow-cli/build.semver={{ .Env.VERSION }} -X github.com/onflow/flow-cli/build.commit={{ .ShortCommit }} -X github.com/onflow/flow-cli/internal/command.MixpanelToken={{ .Env.MIXPANEL_PROJECT_TOKEN }} -X github.com/onflow/flow-cli/internal/accounts.accountToken={{ .Env.LILICO_TOKEN }}
43-
4444

4545
archives:
4646
- id: golang-cross

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ release:
105105
docker run \
106106
--rm \
107107
--env-file .release-env \
108+
-e GOFLAGS="-p=1" \
109+
-e GOMAXPROCS=1 \
108110
-e GORELEASER_PARALLEL=1 \
109111
-v /var/run/docker.sock:/var/run/docker.sock \
110112
-v `pwd`:/go/src/$(PACKAGE_NAME) \

0 commit comments

Comments
 (0)