-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added README.md + github ci workflows
- Loading branch information
Showing
4 changed files
with
89 additions
and
1 deletion.
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,70 @@ | ||
--- | ||
name: Release worfklow | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
# This is needed if we are using github enterprise. | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
id-token: write | ||
|
||
on: | ||
push: | ||
workflow_dispatch: | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
release: | ||
strategy: | ||
matrix: | ||
os: [ubuntu-22.04] | ||
runs-on: [self-hosted, "${{ matrix.os }}", baremetal] | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set cargo | ||
uses: dtolnay/[email protected] | ||
|
||
- name: Clear rust cache | ||
run: | | ||
cargo cache -r all | ||
- name: Set build cargo cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/.cargo/bin/ | ||
~/.cargo/registry/index/ | ||
~/.cargo/registry/cache/ | ||
~/.cargo/git/db/ | ||
fumarole/${{ matrix.os }} | ||
key: ${{ matrix.os }}_fumarole_${{ hashFiles('**/Cargo.lock') }} | ||
restore-keys: | | ||
${{ matrix.os }}_fumarole | ||
- name: Cargo fmt | ||
if: startsWith(github.ref, 'refs/tags/') != true | ||
run: cargo +nightly fmt --all -- --check | ||
|
||
- name: Cargo clippy | ||
if: startsWith(github.ref, 'refs/tags/') != true | ||
run: cargo clippy --workspace --all-targets --tests | ||
|
||
- name: Cargo deny check advisories | ||
if: startsWith(github.ref, 'refs/tags/') != true | ||
uses: EmbarkStudios/cargo-deny-action@v1 | ||
with: | ||
command: check advisories | ||
|
||
- name: Cargo check the entire project | ||
if: startsWith(github.ref, 'refs/tags/') != true | ||
run: cargo check --all-targets --tests --all-features | ||
|
||
- name: Set PROTOC environment variable in order to build | ||
run: echo "PROTOC=/usr/bin/protoc" >> $GITHUB_ENV |
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 |
---|---|---|
@@ -1 +1,13 @@ | ||
# rust-etcd-utils | ||
|
||
|
||
Utility library for common ETCD management in Rust, it covers: | ||
|
||
1. Automatic lease management. | ||
2. Automatic lock lifecycle managemented: auto-revoke and auto-keep-alive. | ||
3. Builtin retry logic for every public function to make robust in-production application. | ||
|
||
|
||
## How to test | ||
|
||
Uses `compose.yaml` to launch and instance of `etcd` with port-fowarding over the port 2379, so `localhost:2379` redirects to `etcd` instance inside docker. |
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,5 @@ | ||
[toolchain] | ||
channel = "1.79.0" | ||
components = ["clippy", "rustfmt"] | ||
targets = [] | ||
profile = "minimal" |
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