Skip to content

Commit f1ae56a

Browse files
committed
Better handling of database binaries
- Adds checksum files for database binaries, with MD5s for each platform - Adds this checksum file to the GitHub actions cache key, so that the cache is invalidated if the sums change, i.e., as new versions of the binaries are uploaded
1 parent d05a971 commit f1ae56a

File tree

5 files changed

+18
-14
lines changed

5 files changed

+18
-14
lines changed

.github/workflows/rust.yml

+8-8
Original file line numberDiff line numberDiff line change
@@ -93,19 +93,19 @@ jobs:
9393
9494
uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6
9595
with:
96-
key: ${{ runner.os }}-cockroach-binary-v2
96+
key: ${{ runner.os }}-cockroach-binary-${{ hashFiles('tools/cockroachdb_checksums') }}
9797
path: "cockroachdb"
98-
#- name: Configure GitHub cache for ClickHouse binaries
99-
#id: cache-clickhouse
98+
- name: Configure GitHub cache for ClickHouse binaries
99+
id: cache-clickhouse
100100
101-
#uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6
102-
#with:
103-
#key: ${{ runner.os }}-clickhouse-binary
104-
#path: "clickhouse"
101+
uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6
102+
with:
103+
key: ${{ runner.os }}-clickhouse-binary-${{ hashFiles('tools/clickhouse_checksums') }}
104+
path: "clickhouse"
105105
- name: Build
106106
run: cargo +${{ matrix.toolchain }} build --locked --all-targets --verbose
107107
- name: Download ClickHouse
108-
#if: steps.cache-clickhouse.outputs.cache-hit != 'true'
108+
if: steps.cache-clickhouse.outputs.cache-hit != 'true'
109109
run: ./tools/ci_download_clickhouse
110110
- name: Download CockroachDB binary
111111
if: steps.cache-cockroachdb.outputs.cache-hit != 'true'

tools/ci_download_clickhouse

+2-3
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,12 @@ set -o pipefail
1010
set -o xtrace
1111
set -o errexit
1212

13+
SOURCE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
1314
ARG0="$(basename ${BASH_SOURCE[0]})"
1415

1516
# If you change this, you must also update the md5sums below
1617
CIDL_VERSION="v21.7"
17-
CIDL_MD5_DARWIN="a3f7edbc3505aa0eec181d704ed68dd2"
18-
CIDL_MD5_LINUX="6e2445e0484d98fe2ee22c3ea46022ff"
19-
CIDL_MD5_ILLUMOS="ee6566514310f715abf0d13eecbafdf5"
18+
source "$SOURCE_DIR/clickhouse_checksums"
2019
CIDL_ASSEMBLE_DIR="./clickhouse"
2120

2221
# Download from manually-populated S3 bucket for now

tools/ci_download_cockroachdb

+2-3
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,12 @@ set -o pipefail
1010
set -o xtrace
1111
set -o errexit
1212

13+
SOURCE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
1314
ARG0="$(basename ${BASH_SOURCE[0]})"
1415

1516
# If you change this, you must also update the md5sums below
1617
CIDL_VERSION="v20.2.5"
17-
CIDL_MD5_DARWIN="4c4b84861c313884a4ef5fbbe57cb543"
18-
CIDL_MD5_LINUX="8fe4f47413e2c6570da0e661af716f9a"
19-
CIDL_MD5_ILLUMOS="2ee900af3bef860f627e4f8946dc6ba3"
18+
source "$SOURCE_DIR/cockroachdb_checksums"
2019

2120
CIDL_ASSEMBLE_DIR="./cockroachdb"
2221

tools/clickhouse_checksums

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
CIDL_MD5_DARWIN="a3f7edbc3505aa0eec181d704ed68dd2"
2+
CIDL_MD5_LINUX="6e2445e0484d98fe2ee22c3ea46022ff"
3+
CIDL_MD5_ILLUMOS="ee6566514310f715abf0d13eecbafdf5"

tools/cockroachdb_checksums

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
CIDL_MD5_DARWIN="4c4b84861c313884a4ef5fbbe57cb543"
2+
CIDL_MD5_LINUX="8fe4f47413e2c6570da0e661af716f9a"
3+
CIDL_MD5_ILLUMOS="2ee900af3bef860f627e4f8946dc6ba3"

0 commit comments

Comments
 (0)