Skip to content

Commit deaef43

Browse files
committed
Squash history for the release
1 parent ac26fce commit deaef43

310 files changed

Lines changed: 809 additions & 376 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/codecov.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# ref: https://docs.codecov.com/docs/codecovyml-reference
2+
coverage:
3+
# Hold ourselves to a high bar
4+
range: 85..100
5+
round: down
6+
precision: 1
7+
status:
8+
# ref: https://docs.codecov.com/docs/commit-status
9+
project:
10+
default:
11+
# Avoid false negatives
12+
threshold: 1%
13+
14+
# Test files aren't important for coverage
15+
ignore:
16+
- "tests"
17+
18+
# Make comments less noisy
19+
comment:
20+
layout: "files"
21+
require_changes: true

.github/dependabot.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: "**/*"
5+
schedule:
6+
interval: daily
7+
- package-ecosystem: cargo
8+
directory: "**/*"
9+
schedule:
10+
interval: daily
11+
ignore:
12+
- dependency-name: "*"
13+
# patch and minor updates don't matter for libraries as consumers of this library build
14+
# with their own lockfile, rather than the version specified in this library's lockfile
15+
# remove this ignore rule if your package has binaries to ensure that the binaries are
16+
# built with the exact set of dependencies and those are up to date.
17+
update-types:
18+
- "version-update:semver-patch"
19+
- "version-update:semver-minor"
Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
name: Build and release
2+
3+
on:
4+
# Run nightly at 2 AM UTC
5+
schedule:
6+
- cron: '0 2 * * *'
7+
push:
8+
tags:
9+
- "v*.*.*"
10+
# Allow manual runs from the Actions tab
11+
workflow_dispatch:
12+
# Run when a new release is created on GitHub
13+
release:
14+
types: [created]
15+
16+
env:
17+
REGISTRY_IMAGE: embucket/embucket
18+
19+
jobs:
20+
21+
# This job builds and pushes a multi-arch Docker image to GitHub Container Registry.
22+
build-docker:
23+
runs-on: ${{ matrix.runner }}
24+
strategy:
25+
fail-fast: true
26+
matrix:
27+
platform:
28+
- linux/amd64
29+
- linux/arm64
30+
include:
31+
- platform: linux/amd64
32+
runner: ubuntu-latest
33+
platform_pair: linux-amd64
34+
- platform: linux/arm64
35+
runner: ubuntu-24.04-arm
36+
platform_pair: linux-arm64
37+
name: Build and Push Docker Image
38+
steps:
39+
- name: Checkout code
40+
uses: actions/checkout@v5
41+
42+
- name: Prepare
43+
run: |
44+
echo "PLATFORM_PAIR=${{ matrix.platform_pair }}" >> $GITHUB_ENV
45+
46+
- name: Docker meta
47+
id: meta
48+
uses: docker/metadata-action@v5
49+
with:
50+
images: ${{ env.REGISTRY_IMAGE }}
51+
52+
- name: Set up QEMU for multi-arch builds
53+
uses: docker/setup-qemu-action@v3
54+
55+
- name: Set up Docker Buildx
56+
uses: docker/setup-buildx-action@v3
57+
58+
- name: Log in to GitHub Container Registry
59+
uses: docker/login-action@v3
60+
with:
61+
registry: docker.io
62+
username: ${{ vars.DOCKERHUB_USER }}
63+
password: ${{ secrets.DOCKERHUB_TOKEN }}
64+
65+
- name: Build and push Docker image
66+
uses: docker/build-push-action@v6
67+
id: build
68+
with:
69+
context: .
70+
file: ./Dockerfile
71+
platforms: ${{ matrix.platform }}
72+
labels: ${{ steps.meta.outputs.labels }}
73+
outputs: type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true
74+
cache-from: type=gha
75+
cache-to: type=gha,mode=max
76+
77+
- name: Export digest
78+
run: |
79+
mkdir -p ${{ runner.temp }}/digests
80+
digest="${{ steps.build.outputs.digest }}"
81+
touch "${{ runner.temp }}/digests/${digest#sha256:}"
82+
83+
- name: Upload digest
84+
uses: actions/upload-artifact@v5
85+
with:
86+
name: digests-${{ matrix.platform_pair }}
87+
path: ${{ runner.temp }}/digests/*
88+
if-no-files-found: error
89+
retention-days: 1
90+
91+
merge:
92+
runs-on: ubuntu-latest
93+
needs:
94+
- build-docker
95+
steps:
96+
- name: Download digests
97+
uses: actions/download-artifact@v6
98+
with:
99+
path: ${{ runner.temp }}/digests
100+
pattern: digests-*
101+
merge-multiple: true
102+
103+
- name: Login to Docker Hub
104+
uses: docker/login-action@v3
105+
with:
106+
username: ${{ vars.DOCKERHUB_USER }}
107+
password: ${{ secrets.DOCKERHUB_TOKEN }}
108+
109+
- name: Set up Docker Buildx
110+
uses: docker/setup-buildx-action@v3
111+
112+
- name: Docker meta
113+
id: meta
114+
uses: docker/metadata-action@v5
115+
with:
116+
images: ${{ env.REGISTRY_IMAGE }}
117+
tags: |
118+
type=ref,event=branch
119+
type=ref,event=pr
120+
type=semver,pattern={{version}}
121+
type=semver,pattern={{major}}.{{minor}}
122+
type=raw,value=latest,enable={{is_default_branch}}
123+
124+
- name: Create manifest list and push
125+
working-directory: ${{ runner.temp }}/digests
126+
run: |
127+
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
128+
$(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *)
129+
130+
- name: Inspect image
131+
run: |
132+
docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ steps.meta.outputs.version }}

.github/workflows/check.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# This workflow runs whenever a PR is opened or updated, or a commit is pushed to main. It runs
2+
# several checks:
3+
# - fmt: checks that the code is formatted according to rustfmt
4+
# - clippy: checks that the code does not contain any clippy warnings
5+
# - doc: checks that the code can be documented without errors
6+
# - hack: check combinations of feature flags
7+
# - msrv: check that the msrv specified in the crate is correct
8+
permissions:
9+
contents: read
10+
# This configuration allows maintainers of this repo to create a branch and pull request based on
11+
# the new branch. Restricting the push trigger to the main branch ensures that the PR only gets
12+
# built once.
13+
on:
14+
push:
15+
branches: [main]
16+
paths:
17+
- crates/**
18+
- Cargo.toml
19+
- Cargo.lock
20+
- Dockerfile
21+
pull_request:
22+
paths:
23+
- crates/**
24+
- Cargo.toml
25+
- Cargo.lock
26+
- Dockerfile
27+
# If new code is pushed to a PR branch, then cancel in progress workflows for that PR. Ensures that
28+
# we don't waste CI time, and returns results quicker https://github.com/jonhoo/rust-ci-conf/pull/5
29+
concurrency:
30+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
31+
cancel-in-progress: true
32+
name: check
33+
jobs:
34+
fmt:
35+
runs-on: ubuntu-latest
36+
name: stable / fmt
37+
steps:
38+
- uses: actions/checkout@v5
39+
with:
40+
submodules: true
41+
- name: Install stable
42+
uses: dtolnay/rust-toolchain@stable
43+
with:
44+
components: rustfmt
45+
- name: cargo fmt --check
46+
run: cargo fmt --check
47+
clippy:
48+
runs-on: ubuntu-latest
49+
name: ${{ matrix.toolchain }} / clippy
50+
permissions:
51+
contents: read
52+
checks: write
53+
strategy:
54+
fail-fast: false
55+
matrix:
56+
# Get early warning of new lints which are regularly introduced in beta channels.
57+
toolchain: [stable]
58+
steps:
59+
- uses: actions/checkout@v5
60+
with:
61+
submodules: true
62+
- name: Install ${{ matrix.toolchain }}
63+
uses: dtolnay/rust-toolchain@master
64+
with:
65+
toolchain: ${{ matrix.toolchain }}
66+
components: clippy
67+
- name: Install Dependencies
68+
run: |
69+
sudo apt install -y llvm-18 libclang-18-dev
70+
sudo ldconfig
71+
- name: Run clippy
72+
run: cargo clippy --all-targets --workspace

.github/workflows/docs-ci.yml

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
name: Docs CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- "docs/**"
8+
pull_request:
9+
branches: [main]
10+
paths:
11+
- "docs/**"
12+
13+
# Cancel in-progress runs for the same branch/PR to save resources
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
16+
cancel-in-progress: true
17+
18+
jobs:
19+
format:
20+
name: Format Check
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v5
24+
- name: Setup Node.js
25+
uses: actions/setup-node@v6
26+
with:
27+
node-version: "22"
28+
- name: Setup PNPM
29+
uses: pnpm/action-setup@v4
30+
with:
31+
version: "10.11.0"
32+
run_install: false
33+
- name: Get pnpm store directory
34+
id: pnpm-cache
35+
shell: bash
36+
run: |
37+
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
38+
- name: Setup pnpm cache
39+
uses: actions/cache@v4
40+
with:
41+
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
42+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/docs/pnpm-lock.yaml') }}
43+
restore-keys: |
44+
${{ runner.os }}-pnpm-store-
45+
- name: Install dependencies
46+
working-directory: ./docs
47+
run: pnpm install
48+
- name: Check formatting
49+
working-directory: ./docs
50+
run: pnpm prettier --check .
51+
52+
build:
53+
name: Validate Build
54+
runs-on: ubuntu-latest
55+
needs: [format]
56+
steps:
57+
- uses: actions/checkout@v5
58+
- name: Setup Node.js
59+
uses: actions/setup-node@v6
60+
with:
61+
node-version: "22"
62+
- name: Setup PNPM
63+
uses: pnpm/action-setup@v4
64+
with:
65+
version: "10.11.0"
66+
run_install: false
67+
- name: Get pnpm store directory
68+
id: pnpm-cache
69+
shell: bash
70+
run: |
71+
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
72+
- name: Setup pnpm cache
73+
uses: actions/cache@v4
74+
with:
75+
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
76+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/docs/pnpm-lock.yaml') }}
77+
restore-keys: |
78+
${{ runner.os }}-pnpm-store-
79+
- name: Install dependencies
80+
working-directory: ./docs
81+
run: pnpm install
82+
- name: Validate build
83+
working-directory: ./docs
84+
run: pnpm build:dry-run
85+
86+
vale-lint:
87+
name: Vale lint
88+
runs-on: ubuntu-latest
89+
steps:
90+
- uses: actions/checkout@v5
91+
- uses: errata-ai/vale-action@v2.1.1
92+
with:
93+
files: "docs/src/content/"

.github/workflows/tests.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# This is the main CI workflow that runs the test suite on all pushes to main and all pull requests.
2+
permissions:
3+
contents: read
4+
on:
5+
push:
6+
branches: [main]
7+
paths:
8+
- crates/**
9+
- Cargo.toml
10+
- Cargo.lock
11+
- Dockerfile
12+
pull_request:
13+
paths:
14+
- crates/**
15+
- Cargo.toml
16+
- Cargo.lock
17+
- Dockerfile
18+
concurrency:
19+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
20+
cancel-in-progress: true
21+
name: unit-tests
22+
jobs:
23+
required:
24+
runs-on: ubuntu-latest
25+
name: ubuntu / ${{ matrix.toolchain }}
26+
strategy:
27+
matrix:
28+
# run on stable and beta to ensure that tests won't break on the next version of the rust
29+
# toolchain
30+
toolchain: [stable]
31+
steps:
32+
- uses: actions/checkout@v5
33+
with:
34+
submodules: true
35+
- name: Install ${{ matrix.toolchain }}
36+
uses: dtolnay/rust-toolchain@stable
37+
with:
38+
toolchain: ${{ matrix.toolchain }}
39+
- uses: Swatinem/rust-cache@v2
40+
- name: Install Dependencies
41+
run: |
42+
sudo apt install -y llvm-18 libclang-18-dev
43+
sudo ldconfig
44+
- name: cargo test
45+
env:
46+
COLUMNS: "80"
47+
run: RUSTFLAGS="-C linker=clang -C link-arg=-fuse-ld=lld" cargo test --profile=ci --workspace --all-features --all-targets

0 commit comments

Comments
 (0)