Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/generic-extraction-row-id-update…
Browse files Browse the repository at this point in the history
…' into generic-extraction-integration-test
  • Loading branch information
silathdiir committed Nov 7, 2024
2 parents a2c4cfc + 82cc17c commit d7607cf
Show file tree
Hide file tree
Showing 125 changed files with 1,370 additions and 1,477 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Generate cargo docs

# Only generate docs on main
on:
push:
branches: [ "main" ]

jobs:
docs:
name: Docs
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Rust
uses: dtolnay/rust-toolchain@stable

- name: Configure cache
uses: Swatinem/rust-cache@v2

- name: Setup pages
id: pages
uses: actions/configure-pages@v4

- name: Clean docs folder
run: cargo clean --doc

- name: Build docs
run: cargo doc --no-deps

- name: Remove lock file
run: rm target/doc/.lock

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: target/doc

deploy:
name: Deploy
runs-on: ubuntu-latest
needs: docs
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
63 changes: 34 additions & 29 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,42 +8,47 @@ on:
name: Check, Test, and Format

jobs:
fmt:
runs-on: ['memory:8GB']
base:
name: build base
runs-on: ['hostname:hetzner-dedicated-6']
outputs:
RUNNER: ${{ steps.get-label.outputs.runner_name }}
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install devenv
- name: Get Runner Label
id: get-label
run: |
if [ -e /nix/var/nix/profiles/default/bin/nix-env ]
then
/nix/var/nix/profiles/default/bin/nix-env -if https://github.com/cachix/devenv/tarball/latest
if [[ "${{ runner.name }}" == *"@hetzner-dedicated-6" ]]; then
echo "runner_name=hostname:hetzner-dedicated-6" >> $GITHUB_OUTPUT
else
nix-env -if https://github.com/cachix/devenv/tarball/latest
echo "runner_name=nix-128g" >> $GITHUB_OUTPUT
fi
echo "$HOME/.nix-profile/bin" >> $GITHUB_PATH
- name: Run cargo test
shell: devenv shell bash -- -e {0}
run: cargo fmt --all -- --check #
- name: Cleanup docker build cache
run: |
docker system prune --force
docker builder prune --all --force
- name: Checkout code
uses: actions/checkout@v4

check:
name: Check
runs-on: ['memory:8GB']
- name: Build base
env:
DOCKER_BUILDKIT: 1
run: |
docker build --tag base --file docker/base/Dockerfile . --platform linux/amd64 --build-arg INSTRUCTION_SET="x86-64-v3"
clippy-fmt-check:
needs: base
runs-on: ${{needs.base.outputs.RUNNER}}
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install devenv

- name: clippy
run: |
if [ -e /nix/var/nix/profiles/default/bin/nix-env ]
then
/nix/var/nix/profiles/default/bin/nix-env -if https://github.com/cachix/devenv/tarball/latest
else
nix-env -if https://github.com/cachix/devenv/tarball/latest
fi
echo "$HOME/.nix-profile/bin" >> $GITHUB_PATH
- name: Run cargo check
shell: devenv shell bash -- -e {0}
run: cargo check --tests
docker run --rm base cargo clippy --all-targets --all -- -D warnings -A incomplete-features -A clippy::needless_return -A clippy::too_long_first_doc_paragraph -A clippy::await_holding_lock
- name: fmt
run: |
docker run --rm base cargo fmt --all -- --check
- name: check
run: |
docker run --rm base cargo check --tests
test:
name: Test Suite
Expand Down
Loading

0 comments on commit d7607cf

Please sign in to comment.