Skip to content

Commit

Permalink
initial public commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Philipp15b committed Sep 15, 2023
0 parents commit 8a4a2e1
Show file tree
Hide file tree
Showing 241 changed files with 26,680 additions and 0 deletions.
1 change: 1 addition & 0 deletions .dockerignore
48 changes: 48 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Create and publish a Docker image

on: workflow_dispatch

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
build-and-push-image:
runs-on: [self-hosted, Linux]
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v3

# We have QEMU already set up in our self-hosted runner.
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: .
file: docker/Dockerfile
push: true
# platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
40 changes: 40 additions & 0 deletions .github/workflows/mdbook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: github pages

on:
push:
branches:
- master
pull_request:

jobs:
deploy:
runs-on: ubuntu-20.04
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v2

# Install mdbook and cache the result
- name: Install mdbook
uses: baptiste0928/cargo-install@v1
with:
crate: mdbook
version: "0.4.18"
- name: Install mdbook-graphviz
uses: baptiste0928/cargo-install@v1
with:
crate: mdbook-graphviz
version: "0.1.4"

- name: Setup Graphviz
uses: ts-graphviz/setup-graphviz@v1

- name: Build documentation
run: cd docs && mdbook build

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/master' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/book
33 changes: 33 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
on: [push, pull_request]

name: Rust

jobs:
test:
name: Test Suite
runs-on: [self-hosted, Linux]
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- run: cargo test --workspace

fmt:
name: Rustfmt
runs-on: [self-hosted, Linux]
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- run: rustup component add rustfmt
- run: cargo fmt --all -- --check

clippy:
name: Clippy
runs-on: [self-hosted, Linux]
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- run: cargo clippy --workspace -- -D warnings
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
target
.DS_Store
benchmark-results.csv

# .dockerignore is symlinked to the .gitignore, so this line is useful:
.git
7 changes: 7 additions & 0 deletions .trunk/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
*out
*logs
/actions
/notifications
/plugins
user_trunk.yaml
user.yaml
3 changes: 3 additions & 0 deletions .trunk/configs/.flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Autoformatter friendly flake8 config (all formatting rules disabled)
[flake8]
extend-ignore = D1, D2, E1, E2, E3, E501, W1, W2, W3, W5
2 changes: 2 additions & 0 deletions .trunk/configs/.isort.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[settings]
profile=black
10 changes: 10 additions & 0 deletions .trunk/configs/.markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Autoformatter friendly markdownlint config (all formatting rules disabled)
default: true
blank_lines: false
bullet: false
html: false
indentation: false
line_length: false
spaces: false
url: false
whitespace: false
1 change: 1 addition & 0 deletions .trunk/configs/.rustfmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
edition = "2021"
33 changes: 33 additions & 0 deletions .trunk/trunk.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
version: 0.1
cli:
version: 1.3.2
plugins:
sources:
- id: trunk
ref: v0.0.8
uri: https://github.com/trunk-io/plugins
lint:
enabled:
- markdownlint@0.33.0
- clippy@1.65.0
- prettier@2.8.3
- git-diff-check
- gitleaks@8.15.3
- taplo@0.7.0
- actionlint@1.6.23
- rustfmt@1.65.0
- isort@5.11.4
- flake8@6.0.0
- yapf@0.32.0
runtimes:
enabled:
- go@1.18.3
- node@18.12.1
- python@3.10.8
actions:
disabled:
- trunk-announce
- trunk-check-pre-push
- trunk-fmt-pre-commit
enabled:
- trunk-upgrade-available
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"cSpell.words": ["intern", "interner"],
"cSpell.enabled": false
}
Loading

0 comments on commit 8a4a2e1

Please sign in to comment.