Skip to content

Commit b9c7bb7

Browse files
committed
Create bytes-base64 crate
0 parents  commit b9c7bb7

18 files changed

+922
-0
lines changed

.envrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
use nix
2+
watch_file flake.nix
3+
watch_file shell.nix
4+
watch_file flake.lock
5+
watch_file .envrc

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "daily"
7+
8+
- package-ecosystem: "cargo"
9+
directory: "/"
10+
schedule:
11+
interval: "daily"

.github/workflows/audit.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Security audit
2+
on:
3+
push:
4+
# For PR we only want to fail if dependencies were changed.
5+
paths:
6+
- "**/Cargo.toml"
7+
- "**/Cargo.lock"
8+
# Run the audit job once a day on main.
9+
schedule:
10+
- cron: "0 0 * * *"
11+
jobs:
12+
security_audit:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
# See https://github.com/marketplace/actions/rust-audit-check for docs
17+
- uses: actions-rs/audit-check@v1
18+
with:
19+
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/build.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- release-*
8+
pull_request:
9+
branches:
10+
- main
11+
- release-*
12+
workflow_dispatch:
13+
14+
jobs:
15+
build:
16+
runs-on: ubuntu-latest
17+
env:
18+
RUST_LOG: info
19+
steps:
20+
- uses: styfle/[email protected]
21+
name: Cancel Outdated Builds
22+
with:
23+
all_but_latest: true
24+
access_token: ${{ github.token }}
25+
26+
- uses: actions/checkout@v4
27+
name: Checkout Repository
28+
29+
- uses: dtolnay/rust-toolchain@stable
30+
31+
- uses: Swatinem/rust-cache@v2
32+
name: Enable Rust Caching
33+
34+
- name: Build
35+
run: cargo build --all-features --all-targets --release
36+
37+
- name: Generate Documentation
38+
run: |
39+
cargo doc --no-deps --lib --release --all-features
40+
echo '<meta http-equiv="refresh" content="0; url=hotshot_query_service">' > target/doc/index.html
41+
42+
- name: Deploy Documentation
43+
uses: peaceiris/actions-gh-pages@v3
44+
if: ${{ github.ref == 'refs/heads/main' }}
45+
with:
46+
github_token: ${{ secrets.GITHUB_TOKEN }}
47+
publish_dir: ./target/doc
48+
cname: tide-disco.docs.espressosys.com

.github/workflows/build_nix.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Nix
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- release-*
8+
pull_request:
9+
branches:
10+
- main
11+
- release-*
12+
schedule:
13+
- cron: '0 0 * * 1'
14+
workflow_dispatch:
15+
16+
jobs:
17+
nix:
18+
runs-on: ubuntu-latest
19+
timeout-minutes: 90
20+
steps:
21+
- name: Checkout Repository
22+
uses: actions/checkout@v4
23+
24+
- name: Install Nix
25+
uses: cachix/install-nix-action@v25
26+
27+
- uses: cachix/cachix-action@v12
28+
with:
29+
name: espresso-systems-private
30+
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
31+
32+
- name: Cache cargo
33+
uses: actions/[email protected]
34+
with:
35+
path: |
36+
~/.cargo-nix/registry/index
37+
~/.cargo-nix/registry/cache
38+
~/.cargo-nix/git
39+
target
40+
key: espresso-nix-v2-${{ hashFiles('Cargo.lock') }}
41+
42+
- name: "Sanity Check: nix environment loads"
43+
run: nix-shell --run "echo Success"
44+
45+
- name: "Sanity Check: nix environment builds all targets"
46+
run: nix-shell --run "cargo build --all-targets --all-features --release --workspace"

.github/workflows/combine-prs.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Combine PRs
2+
3+
on:
4+
schedule:
5+
- cron: "0 1 * * MON"
6+
workflow_dispatch: # allows to manually trigger the workflow
7+
8+
# The minimum permissions required to run this Action
9+
permissions:
10+
contents: write
11+
pull-requests: write
12+
checks: read
13+
14+
jobs:
15+
combine-prs:
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- name: combine-prs
20+
id: combine-prs
21+
uses: github/[email protected]
22+
with:
23+
github_token: ${{ secrets.ORG_GITHUB_PAT }}
24+
labels: "dependabot,combined-pr"

.github/workflows/docs.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- release-*
8+
pull_request:
9+
branches:
10+
- main
11+
- release-*
12+
workflow_dispatch:
13+
14+
jobs:
15+
docs:
16+
runs-on: ubuntu-latest
17+
env:
18+
RUST_LOG: info
19+
steps:
20+
- uses: styfle/[email protected]
21+
name: Cancel Outdated Builds
22+
with:
23+
all_but_latest: true
24+
access_token: ${{ github.token }}
25+
26+
- uses: actions/checkout@v4
27+
name: Checkout Repository
28+
29+
- uses: dtolnay/rust-toolchain@stable
30+
31+
- uses: Swatinem/rust-cache@v2
32+
name: Enable Rust Caching
33+
34+
- name: Generate Documentation
35+
run: |
36+
cargo doc --no-deps --lib --release --all-features
37+
echo '<meta http-equiv="refresh" content="0; url=base64_bytes">' > target/doc/index.html
38+
39+
- name: Deploy Documentation
40+
uses: peaceiris/actions-gh-pages@v3
41+
if: ${{ github.ref == 'refs/heads/main' }}
42+
with:
43+
github_token: ${{ secrets.GITHUB_TOKEN }}
44+
publish_dir: ./target/doc
45+
cname: base64-bytes.docs.espressosys.com

.github/workflows/lint.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Lint
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- release-*
8+
pull_request:
9+
branches:
10+
- main
11+
- release-*
12+
workflow_dispatch:
13+
14+
jobs:
15+
lint:
16+
runs-on: ubuntu-latest
17+
env:
18+
RUST_LOG: info
19+
steps:
20+
- uses: styfle/[email protected]
21+
name: Cancel Outdated Builds
22+
with:
23+
all_but_latest: true
24+
access_token: ${{ github.token }}
25+
26+
- uses: actions/checkout@v4
27+
name: Checkout Repository
28+
29+
- uses: dtolnay/rust-toolchain@stable
30+
31+
- uses: Swatinem/rust-cache@v2
32+
name: Enable Rust Caching
33+
34+
- name: Format Check
35+
run: cargo fmt -- --check
36+
37+
- uses: actions-rs/clippy-check@v1
38+
name: Clippy
39+
with:
40+
token: ${{ github.token }}
41+
args: --workspace --all-features --all-targets -- -D warnings

.github/workflows/test.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- release-*
8+
pull_request:
9+
branches:
10+
- main
11+
- release-*
12+
workflow_dispatch:
13+
14+
jobs:
15+
test:
16+
runs-on: ubuntu-latest
17+
env:
18+
RUST_LOG: info
19+
steps:
20+
- uses: styfle/[email protected]
21+
name: Cancel Outdated Builds
22+
with:
23+
all_but_latest: true
24+
access_token: ${{ github.token }}
25+
26+
- uses: actions/checkout@v4
27+
name: Checkout Repository
28+
29+
- uses: dtolnay/rust-toolchain@stable
30+
31+
- uses: Swatinem/rust-cache@v2
32+
name: Enable Rust Caching
33+
34+
- name: Build tests
35+
run: cargo test --workspace --release --all-features --no-run
36+
37+
- name: Test
38+
run: cargo test --workspace --release --all-features --verbose -- --test-threads 2
39+
timeout-minutes: 60

.github/workflows/update_nix.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: update-flake-lock
2+
3+
on:
4+
workflow_dispatch: # allows manual triggering
5+
schedule:
6+
- cron: '0 0 * * 0' # runs weekly on Sunday at 00:00
7+
8+
jobs:
9+
lockfile:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v4
14+
15+
- name: Install Nix
16+
uses: cachix/install-nix-action@v25
17+
18+
- uses: cachix/cachix-action@v14
19+
with:
20+
name: espresso-systems-private
21+
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
22+
23+
- name: Update flake.lock
24+
uses: DeterminateSystems/update-flake-lock@v21
25+
with:
26+
pr-title: "Weekly PR to bump flake.nix" # Title of PR to be created

0 commit comments

Comments
 (0)