-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
20 changed files
with
8,278 additions
and
10 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 @@ | ||
tests/data/db/create/txs/latest/** filter=lfs diff=lfs merge=lfs -text |
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,38 @@ | ||
name: install-flatbuffers | ||
description: Install flatbuffers | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Cache flatbuffers installation | ||
id: cache-flatbuffers-installation | ||
uses: actions/cache@v3 | ||
env: | ||
cache-name: cache-install-flatbuffers | ||
with: | ||
path: ~/.local/share/flatbuffers | ||
key: ${{ runner.os }}-build-${{ env.cache-name }} | ||
restore-keys: | | ||
${{ runner.os }}-build- | ||
${{ runner.os }}- | ||
- if: ${{ steps. cache-flatbuffers-installation.outputs.cache-hit != 'true' }} | ||
name: Install flatbuffers | ||
shell: bash | ||
run: | | ||
mkdir -p utils/var | ||
cd utils/var | ||
git clone https://github.com/google/flatbuffers.git | ||
cd flatbuffers | ||
git checkout v22.12.06 | ||
cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=$HOME/.local/share/flatbuffers | ||
make | ||
./flattests | ||
sudo make install | ||
export PATH=$PATH:$HOME/.local/share/flatbuffers/bin | ||
flatc --version | ||
- name: Make flatc available in PATH | ||
shell: bash | ||
run: | | ||
echo "$HOME/.local/share/flatbuffers/bin" >> $GITHUB_PATH |
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 |
---|---|---|
|
@@ -22,8 +22,13 @@ jobs: | |
override: true | ||
components: rustfmt | ||
|
||
- name: Install flatbuffers | ||
uses: ./.github/actions/install-flatbuffers | ||
|
||
- name: Check format | ||
run: | | ||
flatc -o target/flatbuffers --rust src/world.fbs | ||
rustfmt target/flatbuffers/world_generated.rs | ||
cargo fmt -- --check | ||
Linting: | ||
|
@@ -41,6 +46,9 @@ jobs: | |
override: true | ||
components: clippy | ||
|
||
- name: Install flatbuffers | ||
uses: ./.github/actions/install-flatbuffers | ||
|
||
# - uses: Swatinem/[email protected] | ||
# Enable caching of the 'librocksdb-sys' crate by additionally caching the | ||
# 'librocksdb-sys' src directory which is managed by cargo | ||
|
@@ -86,6 +94,9 @@ jobs: | |
toolchain: stable | ||
override: true | ||
|
||
- name: Install flatbuffers | ||
uses: ./.github/actions/install-flatbuffers | ||
|
||
# - uses: Swatinem/[email protected] | ||
# Enable caching of the 'librocksdb-sys' crate by additionally caching the | ||
# 'librocksdb-sys' src directory which is managed by cargo | ||
|
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 |
---|---|---|
|
@@ -7,9 +7,6 @@ | |
|
||
*.lock | ||
|
||
## Flatbuffers | ||
|
||
# Added by cargo | ||
# | ||
# already existing elements were commented out | ||
|
||
#/target | ||
utils/var |
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,13 @@ | ||
// The custom build script, needed as we use flatbuffers. | ||
|
||
use std::path::Path; | ||
|
||
fn main() { | ||
println!("cargo:rerun-if-changed=src/world.fbs"); | ||
flatc_rust::run(flatc_rust::Args { | ||
inputs: &[Path::new("src/world.fbs")], | ||
out_dir: Path::new("target/flatbuffers/"), | ||
..Default::default() | ||
}) | ||
.expect("flatc"); | ||
} |
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.