Skip to content

Commit 6a3b02c

Browse files
authored
fix: use new cache, add rustlib path (#27234) (#27236)
1 parent 5e9d85c commit 6a3b02c

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

.circleci/config.yml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
keys:
2626
# We save the cache from this one, so don't restore a cache with old junk and then save new stuff alongside.
2727
# Start either with the exact right cache, or completely fresh.
28-
- influxdb-cache-v1-{{ checksum "go.mod" }}
28+
- influxdb-cache-v2-{{ checksum "go.mod" }}
2929
- run:
3030
name: Get InfluxDB Version
3131
command: |
@@ -87,13 +87,25 @@ jobs:
8787
;;
8888
esac
8989
90+
# rustlib
91+
if [[ "${GOOS}" == linux ]] ; then
92+
case "${GOARCH}" in
93+
amd64)
94+
rustlib="$(find_rustlib_path x86_64-unknown-linux-musl)"
95+
;;
96+
arm64)
97+
rustlib="$(find_rustlib_path aarch64-unknown-linux-musl)"
98+
;;
99+
esac
100+
fi
101+
90102
# linker flags
91103
case "${GOOS}" in
92104
darwin|windows)
93105
ldflags='-s -w'
94106
;;
95107
linux)
96-
ldflags='-s -w -linkmode=external -extld='"${CC}"' -extldflags "-fno-PIC -static-pie -Wl,-z,stack-size=8388608"'
108+
ldflags='-s -w -linkmode=external -extld='"${CC}"' -extldflags "-fno-PIC -static-pie -Wl,-z,stack-size=8388608 -L'"${rustlib}"' -Wl,-lunwind"'
97109
;;
98110
esac
99111
@@ -172,7 +184,7 @@ jobs:
172184
paths:
173185
- artifacts
174186
- save_cache:
175-
key: influxdb-cache-v1-{{ checksum "go.mod" }}
187+
key: influxdb-cache-v2-{{ checksum "go.mod" }}
176188
paths:
177189
- /go/pkg/mod
178190
- /root/.cargo
@@ -295,8 +307,8 @@ jobs:
295307
- checkout
296308
- restore_cache:
297309
keys:
298-
- influxdb-cache-v1-{{ checksum "go.mod" }}
299-
- influxdb-cache-v1
310+
- influxdb-cache-v2-{{ checksum "go.mod" }}
311+
- influxdb-cache-v2
300312
- when:
301313
condition: << parameters.race >>
302314
steps:

0 commit comments

Comments
 (0)