Skip to content

Commit

Permalink
CI: use /tmp for $GOCACHE
Browse files Browse the repository at this point in the history
Point the compiler's build cache at /tmp.  This generally requires more
memory, but it's faster, and the build cache would be discarded anyway.

Signed-off-by: Nalin Dahyabhai <[email protected]>
  • Loading branch information
nalind committed Dec 4, 2024
1 parent 9cf7ba7 commit f7b1a39
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ env:
DEST_BRANCH: "main"
GOPATH: "/var/tmp/go"
GOSRC: "${GOPATH}/src/github.com/containers/buildah"
GOCACHE: "/tmp/go-build"
# Overrides default location (/tmp/cirrus) for repo clone
CIRRUS_WORKING_DIR: "${GOSRC}"
# Shell used to execute all script commands
Expand Down Expand Up @@ -146,7 +147,7 @@ cross_build_task:
script:
- go version
- make -j cross CGO_ENABLED=0
- df -hT /tmp
- du -sh `go env GOCACHE`
binary_artifacts:
path: ./bin/*

Expand All @@ -169,6 +170,7 @@ unit_task:
setup_script: '${SCRIPT_BASE}/setup.sh |& ${_TIMESTAMP}'
build_script: '${SCRIPT_BASE}/build.sh |& ${_TIMESTAMP}'
unit_test_script: '${SCRIPT_BASE}/test.sh unit |& ${_TIMESTAMP}'
du_script: du -sh `go env GOCACHE`

binary_artifacts:
path: ./bin/*
Expand All @@ -193,6 +195,7 @@ conformance_task:

setup_script: '${SCRIPT_BASE}/setup.sh conformance |& ${_TIMESTAMP}'
conformance_test_script: '${SCRIPT_BASE}/test.sh conformance |& ${_TIMESTAMP}'
du_script: du -sh `go env GOCACHE`


integration_task:
Expand Down Expand Up @@ -237,6 +240,7 @@ integration_task:
setup_script: '${SCRIPT_BASE}/setup.sh |& ${_TIMESTAMP}'
build_script: '${SCRIPT_BASE}/build.sh |& ${_TIMESTAMP}'
integration_test_script: '${SCRIPT_BASE}/test.sh integration |& ${_TIMESTAMP}'
du_script: du -sh `go env GOCACHE`

binary_artifacts:
path: ./bin/*
Expand Down Expand Up @@ -283,6 +287,7 @@ integration_rootless_task:
setup_script: '${SCRIPT_BASE}/setup.sh |& ${_TIMESTAMP}'
build_script: '${SCRIPT_BASE}/build.sh |& ${_TIMESTAMP}'
integration_test_script: '${SCRIPT_BASE}/test.sh integration |& ${_TIMESTAMP}'
du_script: du -sh `go env GOCACHE`

binary_artifacts:
path: ./bin/*
Expand Down

0 comments on commit f7b1a39

Please sign in to comment.