Skip to content

Commit 3b3069e

Browse files
authored
fix: use new cache, add rustlib path (#27234) (#27235)
1 parent df00c94 commit 3b3069e

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
# TODO: Remove this!
@@ -88,13 +88,25 @@ jobs:
8888
;;
8989
esac
9090
91+
# rustlib
92+
if [[ "${GOOS}" == linux ]] ; then
93+
case "${GOARCH}" in
94+
amd64)
95+
rustlib="$(find_rustlib_path x86_64-unknown-linux-musl)"
96+
;;
97+
arm64)
98+
rustlib="$(find_rustlib_path aarch64-unknown-linux-musl)"
99+
;;
100+
esac
101+
fi
102+
91103
# linker flags
92104
case "${GOOS}" in
93105
darwin|windows)
94106
ldflags='-s -w'
95107
;;
96108
linux)
97-
ldflags='-s -w -linkmode=external -extld='"${CC}"' -extldflags "-fno-PIC -static-pie -Wl,-z,stack-size=8388608"'
109+
ldflags='-s -w -linkmode=external -extld='"${CC}"' -extldflags "-fno-PIC -static-pie -Wl,-z,stack-size=8388608 -L'"${rustlib}"' -Wl,-lunwind"'
98110
;;
99111
esac
100112
@@ -173,7 +185,7 @@ jobs:
173185
paths:
174186
- artifacts
175187
- save_cache:
176-
key: influxdb-cache-v1-{{ checksum "go.mod" }}
188+
key: influxdb-cache-v2-{{ checksum "go.mod" }}
177189
paths:
178190
- /go/pkg/mod
179191
- /root/.cargo
@@ -296,8 +308,8 @@ jobs:
296308
- checkout
297309
- restore_cache:
298310
keys:
299-
- influxdb-cache-v1-{{ checksum "go.mod" }}
300-
- influxdb-cache-v1
311+
- influxdb-cache-v2-{{ checksum "go.mod" }}
312+
- influxdb-cache-v2
301313
- when:
302314
condition: << parameters.race >>
303315
steps:

0 commit comments

Comments
 (0)