-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into alex/sims2_main
* main: docs(client/debug): correct `debug raw-bytes` command example (#21671) build: don't reinstall golangci-lint if already installed (#21662) refactor(server/v2): kill viper from server components (#21663) chore: sync changelog with latest releases (#21658) refactor: remove viper as a direct dependency (#21635) ci: centralized job for rocksdb libaries cache (#21657) fix: remove stray fmt.Println (#21661)
- Loading branch information
Showing
52 changed files
with
294 additions
and
282 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env bash | ||
set -Eeuo pipefail | ||
|
||
sudo apt update && sudo apt-get install -y libsnappy-dev zlib1g-dev libbz2-dev liblz4-dev libzstd-dev build-essential |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: Cache rocksdb libraries | ||
on: | ||
push: | ||
paths: | ||
- build.mk | ||
schedule: | ||
- cron: "*/15 * * * *" # Every 15 minutes | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
|
||
check-cache-rocksdb: | ||
name: Check existing cache | ||
runs-on: ubuntu-latest | ||
outputs: | ||
cache-hit: ${{ steps.cache-rocksdb.outputs.cache-hit }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Get rocksdb version | ||
run: ./.github/scripts/get-rocksdb-version.sh | ||
|
||
- name: Fix permissions for cache | ||
run: sudo chown $(whoami) /usr/local/lib /usr/local/include | ||
|
||
- name: Restore rocksdb libraries cache | ||
id: cache-rocksdb | ||
uses: actions/cache/restore@v4 | ||
with: | ||
path: | | ||
/usr/local/lib/librocksdb.* | ||
/usr/local/include/rocksdb | ||
key: ${{ runner.os }}-rocksdb-${{ env.ROCKSDB_VERSION }}-amd64 | ||
|
||
|
||
save-cache-rocksdb: | ||
name: Build rocksdb libraries and save cache | ||
runs-on: ubuntu-latest | ||
needs: check-cache-rocksdb | ||
if: needs.check-cache-rocksdb.outputs.cache-hit != 'true' | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Get rocksdb version | ||
run: ./.github/scripts/get-rocksdb-version.sh | ||
|
||
- name: Install rocksdb deps | ||
run: ./.github/scripts/install-rocksdb-deps.sh | ||
- name: Install rocksdb | ||
run: ./.github/scripts/install-rocksdb.sh | ||
|
||
- name: Saves rocksdb libraries cache | ||
uses: actions/cache/save@v4 | ||
with: | ||
path: | | ||
/usr/local/lib/librocksdb.* | ||
/usr/local/include/rocksdb | ||
key: ${{ runner.os }}-rocksdb-${{ env.ROCKSDB_VERSION }}-amd64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package server | ||
|
||
// DynamicConfig defines an interface for configuration that can be dynamically | ||
// fetched at runtime by an arbitrary key. | ||
type DynamicConfig interface { | ||
Get(string) any | ||
GetString(string) string | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.