Skip to content

Commit

Permalink
Memento
Browse files Browse the repository at this point in the history
  • Loading branch information
buffalu committed Dec 2, 2023
1 parent f7045f0 commit ce42f24
Show file tree
Hide file tree
Showing 47 changed files with 7,960 additions and 871 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/target
/test-ledger
58 changes: 58 additions & 0 deletions .github/actions/lint/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Lint
description: 'Run linters on the repository'

runs:
using: composite
steps:
- uses: dsherret/rust-toolchain-file@v1

- name: setup rustc
run: |
rustup update stable
shell: bash

- name: Install Protobuf
run: |
export PROTOC_VERSION=21.12 && \
export PROTOC_ZIP=protoc-$PROTOC_VERSION-linux-x86_64.zip && \
curl -Ss -OL https://github.com/google/protobuf/releases/download/v$PROTOC_VERSION/$PROTOC_ZIP \
&& sudo unzip -o $PROTOC_ZIP -d /usr/local bin/protoc \
&& sudo unzip -o $PROTOC_ZIP -d /usr/local include/* \
&& rm -f $PROTOC_ZIP
shell: bash

- name: Install latest nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2023-10-05-x86_64-unknown-linux-gnu
components: rustfmt, clippy

- name: Setup rust lint cache
uses: actions/cache@v3
with:
path: |
~/.cargo/
target/
key: ${{ runner.os }}-cargo-lint-${{ hashFiles('**/Cargo.lock') }}

- name: Setup Rust tools
run: |
cargo +nightly-2023-10-05 install cargo-sort
cargo +nightly-2023-10-05 install cargo-udeps
shell: bash

- name: cargo sort
run: cargo +nightly-2023-10-05 sort --workspace --check
shell: bash

- name: cargo fmt
run: cargo +nightly-2023-10-05 fmt --all --check
shell: bash

- name: clippy
run: cargo +nightly-2023-10-05 clippy --all-features --all-targets --tests -- -D warnings
shell: bash

- name: cargo udeps
run: cargo +nightly-2023-10-05 udeps --all-features --all-targets --tests
shell: bash
18 changes: 18 additions & 0 deletions .github/workflows/master.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Merge to master
on:
push:
branches:
- master

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
lint_build:
runs-on: ubuntu-20.04-32c-128g
timeout-minutes: 45
steps:
- uses: actions/checkout@v3
- name: lint
uses: ./.github/actions/lint
16 changes: 16 additions & 0 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Pull Request
on:
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
lint_test_build:
runs-on: ubuntu-20.04-32c-128g
timeout-minutes: 45
steps:
- uses: actions/checkout@v3
- name: lint
uses: ./.github/actions/lint
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
/target
**/target
/.idea
/test-ledger
/ledger
.env
8 changes: 0 additions & 8 deletions .idea/.gitignore

This file was deleted.

8 changes: 0 additions & 8 deletions .idea/modules.xml

This file was deleted.

11 changes: 0 additions & 11 deletions .idea/replayer.iml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/vcs.xml

This file was deleted.

0 comments on commit ce42f24

Please sign in to comment.