Skip to content

Commit

Permalink
Set up GitHub action to update README when Cargo.toml changes (#31)
Browse files Browse the repository at this point in the history
* cargo fmt
cargo +nightly clippy --all --fix -Z unstable-options -- -A clippy::uninit_assumed_init
git action auto update README.md

* us -> µs

* build 2022-07-23

* Empty rustfmt.toml

* Streamline CI pipeline, remove clippy helper

Reduce dependencies and consolidate JS scripts for rebuilding the README

Co-authored-by: David Koloski <djkoloski@gmail.com>
  • Loading branch information
gcxfd and djkoloski committed Jul 23, 2022
1 parent f6352f9 commit 1b323c1
Show file tree
Hide file tree
Showing 37 changed files with 772 additions and 332 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: build

on:
workflow_dispatch:
push:
paths:
- 'Cargo.toml'
pull_request:
branches: [ master ]

jobs:
build:
name: build
strategy:
matrix:
# platform: [macos-latest,windows-latest,ubuntu-latest]
# platform: [windows-latest]
# platform: [macos-latest]
#python-version: [3.9]
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
submodules: true

- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
components: rust-src

- uses: Swatinem/rust-cache@v2

- name: build
shell: bash
run: |
wget "https://github.com/protocolbuffers/protobuf/releases/download/v21.3/protoc-21.3-linux-x86_64.zip" -O protoc.zip
unzip protoc.zip
chmod +x bin/protoc
mv bin/protoc /usr/local/bin
wget "https://github.com/google/flatbuffers/releases/download/v2.0.0/Linux.flatc.binary.clang++-9.zip" -O flatbuffers
unzip flatbuffers
chmod +x flatc
mv flatc /usr/local/bin
sudo apt-get install -y capnproto libprotobuf-dev
git config --global user.name github-actions
git config --global user.email github-actions@github.com
node update_benchmark.js
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
*.log
.date
Cargo.lock
/target
/.vscode
122 changes: 62 additions & 60 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,87 +2,89 @@
name = "rust_serialization_benchmark"
version = "0.1.0"
authors = ["David Koloski <djkoloski@gmail.com>"]
edition = "2018"
edition = "2021"
build = "build.rs"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

# Some features may require multiple dependencies to compile properly
# For example, benchmarking bincode requires two features: "serde" and "bincode"

[dependencies]
abomonation = { version = "0.7", optional = true }
abomonation_derive = { version = "0.5", optional = true }
abomonation = { version = "0.7.3", optional = true }
abomonation_derive = { version = "0.5.0", optional = true }
# "nightly" feature won't be required starting with rustc 1.55
alkahest = { version = "0.1", optional = true, features = ["derive", "nightly"] }
bebop = { version = "2.4", optional = true }
bincode = { version = "1.3", optional = true }
borsh = { version = "0.9", optional = true }
alkahest = { version = "0.1.5", optional = true, features = [
"derive",
"nightly"
] }
bebop = { version = "2.4.5", optional = true }
bincode = { version = "1.3.3", optional = true }
borsh = { version = "0.9.3", optional = true }
bson = { version = "2.0", git = "https://github.com/djkoloski/bson-rust", branch = "master", optional = true }
bytecheck = { version = "0.6", optional = true }
bytemuck = { version = "1.7", optional = true }
capnp = { version = "0.14", optional = true }
criterion = "0.3"
dlhn = { version = "0.1", optional = true }
flatbuffers = { version = "2.0", optional = true }
libflate = "1.0"
nachricht-serde = { version = "0.3", optional = true }
postcard = { version = "1.0", features = ["alloc"], optional = true }
prost = { version = "0.8", optional = true }
rand = "0.8"
rkyv = { version = "0.7", features = ["validation"], optional = true }
rmp-serde = { version = "0.15", optional = true }
ron = { version = "0.6", optional = true }
serde = { version = "1.0", features = ["derive"], optional = true }
bytecheck = { version = "0.6.8", optional = true }
bytemuck = { version = "1.10.0", optional = true }
capnp = { version = "0.14.8", optional = true }
criterion = "0.3.6"
dlhn = { version = "0.1.1", optional = true }
flatbuffers = { version = "2.1.2", optional = true }
libflate = "1.2.0"
nachricht-serde = { version = "0.4.0", optional = true }
postcard = { version = "1.0.1", features = ["alloc"], optional = true }
prost = { version = "0.10.4", optional = true }
rand = "0.8.5"
rkyv = { version = "0.7.39", features = ["validation"], optional = true }
rmp-serde = { version = "1.1.0", optional = true }
ron = { version = "0.7.1", optional = true }
serde = { version = "1.0.140", features = ["derive"], optional = true }
serde_bare = { version = "0.5.0", optional = true }
serde_cbor = { version = "0.11", optional = true }
serde_json = { version = "1.0", optional = true }
simd-json = { version = "0.4", optional = true }
speedy = { version = "0.8", optional = true }
zstd = "0.9"
serde_cbor = { version = "0.11.2", optional = true }
serde_json = { version = "1.0.82", optional = true }
simd-json = { version = "0.6.0", optional = true }
speedy = { version = "0.8.2", optional = true }
zstd = "0.11.2"

[features]
default = [
"abomonation",
"abomonation_derive",
"alkahest",
# "bebop",
"bincode",
"borsh",
"bson",
"bytecheck",
"bytemuck",
"capnp",
"dlhn",
"flatbuffers",
"nachricht-serde",
"postcard",
"prost",
"rkyv",
"rmp-serde",
"ron",
"serde",
"serde_bare",
"serde_cbor",
"serde_json",
"simd-json",
"speedy",
"abomonation",
"abomonation_derive",
"alkahest",
# "bebop",
"bincode",
"borsh",
"bson",
"bytecheck",
"bytemuck",
"capnp",
"dlhn",
"flatbuffers",
"nachricht-serde",
"postcard",
"prost",
"rkyv",
"rmp-serde",
"ron",
"serde",
"serde_bare",
"serde_cbor",
"serde_json",
"simd-json",
"speedy",
]

[dev-dependencies]
rand_pcg = "0.3"
rand_pcg = "0.3.1"

[build-dependencies]
bebop-tools = "2.4"
capnp = "0.14"
capnpc = "0.14"
flatc-rust = "0.2"
prost-build = "0.8"
bebop-tools = "2.4.5"
capnp = "0.14.8"
capnpc = "0.14.9"
flatc-rust = "0.2.0"
prost-build = "0.10.4"

[[bench]]
name = "bench"
harness = false

[profile.bench]
lto = true
# Uncomment this to profile
# [profile.bench]
# debug = true
Loading

0 comments on commit 1b323c1

Please sign in to comment.