aboutsummaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
Diffstat (limited to '.github')
-rw-r--r--.github/DISCUSSION_TEMPLATE/support.yml84
-rw-r--r--.github/FUNDING.yml13
-rw-r--r--.github/ISSUE_TEMPLATE/bug.yaml39
-rw-r--r--.github/dependabot.yml19
-rw-r--r--.github/pull_request_template.md5
-rw-r--r--.github/workflows/codespell.yml28
-rw-r--r--.github/workflows/docker.yaml61
-rw-r--r--.github/workflows/fossier-scan.yml51
-rw-r--r--.github/workflows/fossier.yml29
-rw-r--r--.github/workflows/installer.yml38
-rw-r--r--.github/workflows/nix.yml34
-rw-r--r--.github/workflows/release.yml304
-rw-r--r--.github/workflows/rust.yml230
-rw-r--r--.github/workflows/shellcheck.yml18
-rw-r--r--.github/workflows/update-nix-deps.yml21
15 files changed, 0 insertions, 974 deletions
diff --git a/.github/DISCUSSION_TEMPLATE/support.yml b/.github/DISCUSSION_TEMPLATE/support.yml
deleted file mode 100644
index b6a6ae40..00000000
--- a/.github/DISCUSSION_TEMPLATE/support.yml
+++ /dev/null
@@ -1,84 +0,0 @@
-body:
- - type: input
- attributes:
- label: Operating System
- description: What operating system are you using?
- placeholder: "Example: macOS Big Sur"
- validations:
- required: true
-
- - type: input
- attributes:
- label: Shell
- description: What shell are you using?
- placeholder: "Example: zsh 5.8.1"
- validations:
- required: true
-
- - type: dropdown
- attributes:
- label: Version
- description: What version of atuin are you running?
- multiple: false
- options: # how often will I forget to update this? a lot.
- - v17.0.0 (Default)
- - v16.0.0
- - v15.0.0
- - v14.0.1
- - v14.0.0
- - v13.0.1
- - v13.0.0
- - v12.0.0
- - v11.0.0
- - v0.10.0
- - v0.9.1
- - v0.9.0
- - v0.8.1
- - v0.8.0
- - v0.7.2
- - v0.7.1
- - v0.7.0
- - v0.6.4
- - v0.6.3
- default: 0
- validations:
- required: true
-
- - type: checkboxes
- attributes:
- label: Self hosted
- description: Are you self hosting atuin server?
- options:
- - label: I am self hosting atuin server
-
- - type: checkboxes
- attributes:
- label: Search the issues
- description: Did you search the issues and discussions for your problem?
- options:
- - label: I checked that someone hasn't already asked about the same issue
- required: true
-
- - type: textarea
- attributes:
- label: Behaviour
- description: "Please describe the issue - what you expected to happen, what actually happened"
-
- - type: textarea
- attributes:
- label: Logs
- description: "If possible, please include logs from atuin, especially if you self host the server - ATUIN_LOG=debug"
-
- - type: textarea
- attributes:
- label: Extra information
- description: "Anything else you'd like to add?"
-
- - type: checkboxes
- attributes:
- label: Code of Conduct
- description: The Code of Conduct helps create a safe space for everyone. We require
- that everyone agrees to it.
- options:
- - label: I agree to follow this project's [Code of Conduct](https://github.com/atuinsh/atuin/blob/main/CODE_OF_CONDUCT.md)
- required: true
diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
deleted file mode 100644
index 8b9c8039..00000000
--- a/.github/FUNDING.yml
+++ /dev/null
@@ -1,13 +0,0 @@
-# These are supported funding model platforms
-
-github: [atuinsh]
-patreon: # Replace with a single Patreon username
-open_collective: # Replace with a single Open Collective username
-ko_fi: # Replace with a single Ko-fi username
-tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
-community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
-liberapay: # Replace with a single Liberapay username
-issuehunt: # Replace with a single IssueHunt username
-otechie: # Replace with a single Otechie username
-lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
-custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
diff --git a/.github/ISSUE_TEMPLATE/bug.yaml b/.github/ISSUE_TEMPLATE/bug.yaml
deleted file mode 100644
index 54cc46d7..00000000
--- a/.github/ISSUE_TEMPLATE/bug.yaml
+++ /dev/null
@@ -1,39 +0,0 @@
-name: Bug Report
-description: File a bug report
-title: "[Bug]: "
-labels: ["bug", "triage"]
-body:
- - type: markdown
- attributes:
- value: |
- Thanks for taking the time to fill out this bug report!
- - type: textarea
- id: what-expected
- attributes:
- label: What did you expect to happen?
- placeholder: Tell us what you expected to see!
- validations:
- required: true
- - type: textarea
- id: what-happened
- attributes:
- label: What happened?
- placeholder: Tell us what you see!
- validations:
- required: true
- - type: textarea
- id: doctor
- validations:
- required: true
- attributes:
- label: Atuin doctor output
- description: Please run 'atuin doctor' and share the output. If it fails to run, share any errors. This requires Atuin >=v18.1.0
- render: yaml
- - type: checkboxes
- id: terms
- attributes:
- label: Code of Conduct
- description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/atuinsh/atuin/blob/main/CODE_OF_CONDUCT.md)
- options:
- - label: I agree to follow this project's Code of Conduct
- required: true
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
deleted file mode 100644
index 9380a5ce..00000000
--- a/.github/dependabot.yml
+++ /dev/null
@@ -1,19 +0,0 @@
-# To get started with Dependabot version updates, you'll need to specify which
-# package ecosystems to update and where the package manifests are located.
-# Please see the documentation for all configuration options:
-# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
-
-version: 2
-updates:
- - package-ecosystem: "cargo" # See documentation for possible values
- directory: "/" # Location of package manifests
- schedule:
- interval: "weekly"
- - package-ecosystem: "docker" # See documentation for possible values
- directory: "/" # Location of package manifests
- schedule:
- interval: "weekly"
- - package-ecosystem: "github-actions"
- directory: "/"
- schedule:
- interval: "weekly"
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
deleted file mode 100644
index 4621b63c..00000000
--- a/.github/pull_request_template.md
+++ /dev/null
@@ -1,5 +0,0 @@
-<!-- Thank you for making a PR! Bug fixes are always welcome, but if you're adding a new feature or changing an existing one, we'd really appreciate if you open an issue, post on the forum, or drop in on Discord -->
-
-## Checks
-- [ ] I am happy for maintainers to push small adjustments to this PR, to speed up the review cycle
-- [ ] I have checked that there are no existing pull requests for the same thing
diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml
deleted file mode 100644
index 7d941112..00000000
--- a/.github/workflows/codespell.yml
+++ /dev/null
@@ -1,28 +0,0 @@
-# Codespell configuration is within .codespellrc
----
-name: Codespell
-
-on:
- push:
- branches: [main]
- pull_request:
- branches: [main]
-
-permissions:
- contents: read
-
-jobs:
- codespell:
- name: Check for spelling errors
- runs-on: depot-ubuntu-24.04
-
- steps:
- - name: Checkout
- uses: actions/checkout@v6
- - name: Codespell
- uses: codespell-project/actions-codespell@v2
- with:
- # This is regenerated from commit history
- # we cannot rewrite commit history, and I'd rather not correct it
- # every time
- exclude_file: CHANGELOG.md
diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml
deleted file mode 100644
index 8761aaf6..00000000
--- a/.github/workflows/docker.yaml
+++ /dev/null
@@ -1,61 +0,0 @@
-name: build-docker
-
-on:
- push:
- branches: [main]
- tags:
- - 'v*'
-
-jobs:
- publish:
- concurrency:
- group: ${{ github.ref }}-docker
- cancel-in-progress: true
- permissions:
- packages: write
- contents: read
- id-token: write
-
- runs-on: depot-ubuntu-24.04
- steps:
- - uses: actions/checkout@v6
-
- - name: Get Repo Owner
- id: get_repo_owner
- run: echo "REPO_OWNER=$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]')" > $GITHUB_ENV
-
- - uses: depot/setup-action@v1
-
- - name: Login to container Registry
- uses: docker/login-action@v3
- with:
- username: ${{ github.repository_owner }}
- password: ${{ secrets.GITHUB_TOKEN }}
- registry: ghcr.io
-
- - name: Docker meta
- id: meta
- uses: docker/metadata-action@v5
- with:
- images: ghcr.io/${{ env.REPO_OWNER }}/atuin
- flavor: |
- latest=false
- tags: |
- type=ref,event=branch
- type=sha,prefix=
- type=semver,pattern={{version}}
- type=semver,pattern={{major}}.{{minor}}
-
- - name: Build and push
- uses: depot/build-push-action@v1
- with:
- push: true
- platforms: linux/amd64,linux/arm64
- file: ./Dockerfile
- context: .
- provenance: false
- build-args: |
- Version=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] || 'dev' }}
- GitCommit=${{ github.sha }}
- tags: ${{ steps.meta.outputs.tags }}
- labels: ${{ steps.meta.outputs.labels }}
diff --git a/.github/workflows/fossier-scan.yml b/.github/workflows/fossier-scan.yml
deleted file mode 100644
index 5c89be67..00000000
--- a/.github/workflows/fossier-scan.yml
+++ /dev/null
@@ -1,51 +0,0 @@
-name: Fossier Scan All PRs
-
-on:
- workflow_dispatch:
- inputs:
- dry-run:
- description: "Dry run - evaluate but don't take actions"
- type: boolean
- default: false
-
-permissions:
- contents: read
- pull-requests: write
- issues: write
-
-jobs:
- scan:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v4
-
- - name: Set up uv
- uses: astral-sh/setup-uv@v4
-
- - name: Set up Python
- uses: actions/setup-python@v5
- with:
- python-version: "3.13"
-
- - name: Install fossier
- run: uv tool install git+https://github.com/pthorpe92/fossier.git
-
- - name: Restore DB cache
- uses: actions/cache@v4
- with:
- path: .fossier.db
- key: fossier-db-${{ github.repository }}
- restore-keys: |
- fossier-db-${{ github.repository }}
-
- - name: Scan open PRs
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: |
- FLAGS="--format table"
- if [ "${{ inputs.dry-run }}" = "true" ]; then
- FLAGS="$FLAGS --dry-run"
- else
- FLAGS="$FLAGS --execute"
- fi
- fossier scan $FLAGS
diff --git a/.github/workflows/fossier.yml b/.github/workflows/fossier.yml
deleted file mode 100644
index e582e2d3..00000000
--- a/.github/workflows/fossier.yml
+++ /dev/null
@@ -1,29 +0,0 @@
-name: Fossier PR Check
-on:
- pull_request_target:
- types: [opened, synchronize]
- issue_comment:
- types: [created]
-
-permissions:
- contents: write
- pull-requests: write
- issues: write
-
-jobs:
- check:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v4
-
- - uses: PThorpe92/fossier@6e7f2a6c1c727949e2a6c94d7dc6904d7bb40928
- id: fossier
- with:
- contact-url: "https://discord.gg/Fq8bJSKPHh"
- github-token: ${{ secrets.GITHUB_TOKEN }}
- # Optional: connect to the global spam registry
- # registry-api-key: ${{ secrets.FOSSIER_REGISTRY_API_KEY }}
-
- - name: Handle result
- if: steps.fossier.outputs.outcome == 'deny'
- run: echo "PR denied with score ${{ steps.fossier.outputs.score }}"
diff --git a/.github/workflows/installer.yml b/.github/workflows/installer.yml
deleted file mode 100644
index 2cc4f89f..00000000
--- a/.github/workflows/installer.yml
+++ /dev/null
@@ -1,38 +0,0 @@
-name: Install
-
-on:
- push:
- branches: [main]
- pull_request:
- paths: .github/workflows/installer.yml
-
-env:
- CARGO_TERM_COLOR: always
-
-jobs:
- install:
- strategy:
- matrix:
- os: [depot-ubuntu-24.04, macos-14]
- runs-on: ${{ matrix.os }}
-
- steps:
- - uses: actions/checkout@v6
-
- - name: Install zsh for ubuntu
- if: matrix.os == 'depot-ubuntu-24.04'
- run: |
- sudo apt install zsh
-
- - name: Test install script on bash
- run: |
- /bin/bash -c "$(curl --proto '=https' --tlsv1.2 -sSf https://setup.atuin.sh)"
- [ -d "$HOME/.atuin" ] && source $HOME/.atuin/bin/env
- atuin --help
-
- - name: Test install script on zsh
- shell: zsh {0}
- run: |
- /bin/bash -c "$(curl --proto '=https' --tlsv1.2 -sSf https://setup.atuin.sh)"
- [ -d "$HOME/.atuin" ] && source $HOME/.atuin/bin/env
- atuin --help
diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml
deleted file mode 100644
index 515a05eb..00000000
--- a/.github/workflows/nix.yml
+++ /dev/null
@@ -1,34 +0,0 @@
-# Verify the Nix build is working
-# Failures will usually occur due to an out of date Rust version
-# That can be updated to the latest version in nixpkgs-unstable with `nix flake update`
-name: Nix
-on:
- push:
- branches: [ main ]
- paths-ignore:
- - 'ui/**'
- pull_request:
- branches: [ main ]
- paths-ignore:
- - 'ui/**'
-
-jobs:
- check:
- runs-on: depot-ubuntu-24.04
-
- steps:
- - uses: actions/checkout@v6
- - uses: cachix/install-nix-action@v31
-
- - name: Run nix flake check
- run: nix flake check --print-build-logs
-
- build-test:
- runs-on: depot-ubuntu-24.04
-
- steps:
- - uses: actions/checkout@v6
- - uses: cachix/install-nix-action@v31
-
- - name: Run nix build
- run: nix build --print-build-logs
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
deleted file mode 100644
index 5da97452..00000000
--- a/.github/workflows/release.yml
+++ /dev/null
@@ -1,304 +0,0 @@
-# This file was autogenerated by dist: https://axodotdev.github.io/cargo-dist
-#
-# Copyright 2022-2024, axodotdev
-# SPDX-License-Identifier: MIT or Apache-2.0
-#
-# CI that:
-#
-# * checks for a Git Tag that looks like a release
-# * builds artifacts with dist (archives, installers, hashes)
-# * uploads those artifacts to temporary workflow zip
-# * on success, uploads the artifacts to a GitHub Release
-#
-# Note that the GitHub Release will be created with a generated
-# title/body based on your changelogs.
-
-name: Release
-permissions:
- "contents": "write"
-
-# This task will run whenever you push a git tag that looks like a version
-# like "1.0.0", "v0.1.0-prerelease.1", "my-app/0.1.0", "releases/v1.0.0", etc.
-# Various formats will be parsed into a VERSION and an optional PACKAGE_NAME, where
-# PACKAGE_NAME must be the name of a Cargo package in your workspace, and VERSION
-# must be a Cargo-style SemVer Version (must have at least major.minor.patch).
-#
-# If PACKAGE_NAME is specified, then the announcement will be for that
-# package (erroring out if it doesn't have the given version or isn't dist-able).
-#
-# If PACKAGE_NAME isn't specified, then the announcement will be for all
-# (dist-able) packages in the workspace with that version (this mode is
-# intended for workspaces with only one dist-able package, or with all dist-able
-# packages versioned/released in lockstep).
-#
-# If you push multiple tags at once, separate instances of this workflow will
-# spin up, creating an independent announcement for each one. However, GitHub
-# will hard limit this to 3 tags per commit, as it will assume more tags is a
-# mistake.
-#
-# If there's a prerelease-style suffix to the version, then the release(s)
-# will be marked as a prerelease.
-on:
- pull_request:
- push:
- tags:
- - '**[0-9]+.[0-9]+.[0-9]+*'
-
-jobs:
- # Run 'dist plan' (or host) to determine what tasks we need to do
- plan:
- runs-on: "ubuntu-22.04"
- outputs:
- val: ${{ steps.plan.outputs.manifest }}
- tag: ${{ !github.event.pull_request && github.ref_name || '' }}
- tag-flag: ${{ !github.event.pull_request && format('--tag={0}', github.ref_name) || '' }}
- publishing: ${{ !github.event.pull_request }}
- env:
- GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- steps:
- - uses: actions/checkout@v6
- with:
- persist-credentials: false
- submodules: recursive
- - name: Install dist
- # we specify bash to get pipefail; it guards against the `curl` command
- # failing. otherwise `sh` won't catch that `curl` returned non-0
- shell: bash
- run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.31.0/cargo-dist-installer.sh | sh"
- - name: Cache dist
- uses: actions/upload-artifact@v6
- with:
- name: cargo-dist-cache
- path: ~/.cargo/bin/dist
- # sure would be cool if github gave us proper conditionals...
- # so here's a doubly-nested ternary-via-truthiness to try to provide the best possible
- # functionality based on whether this is a pull_request, and whether it's from a fork.
- # (PRs run on the *source* but secrets are usually on the *target* -- that's *good*
- # but also really annoying to build CI around when it needs secrets to work right.)
- - id: plan
- run: |
- dist ${{ (!github.event.pull_request && format('host --steps=create --tag={0}', github.ref_name)) || 'plan' }} --output-format=json > plan-dist-manifest.json
- echo "dist ran successfully"
- cat plan-dist-manifest.json
- echo "manifest=$(jq -c "." plan-dist-manifest.json)" >> "$GITHUB_OUTPUT"
- - name: "Upload dist-manifest.json"
- uses: actions/upload-artifact@v6
- with:
- name: artifacts-plan-dist-manifest
- path: plan-dist-manifest.json
-
- # Build and packages all the platform-specific things
- build-local-artifacts:
- name: build-local-artifacts (${{ join(matrix.targets, ', ') }})
- # Let the initial task tell us to not run (currently very blunt)
- needs:
- - plan
- if: ${{ fromJson(needs.plan.outputs.val).ci.github.artifacts_matrix.include != null && (needs.plan.outputs.publishing == 'true' || fromJson(needs.plan.outputs.val).ci.github.pr_run_mode == 'upload') }}
- strategy:
- fail-fast: false
- # Target platforms/runners are computed by dist in create-release.
- # Each member of the matrix has the following arguments:
- #
- # - runner: the github runner
- # - dist-args: cli flags to pass to dist
- # - install-dist: expression to run to install dist on the runner
- #
- # Typically there will be:
- # - 1 "global" task that builds universal installers
- # - N "local" tasks that build each platform's binaries and platform-specific installers
- matrix: ${{ fromJson(needs.plan.outputs.val).ci.github.artifacts_matrix }}
- runs-on: ${{ matrix.runner }}
- container: ${{ matrix.container && matrix.container.image || null }}
- env:
- GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- BUILD_MANIFEST_NAME: target/distrib/${{ join(matrix.targets, '-') }}-dist-manifest.json
- permissions:
- "attestations": "write"
- "contents": "read"
- "id-token": "write"
- steps:
- - name: enable windows longpaths
- run: |
- git config --global core.longpaths true
- - uses: actions/checkout@v6
- with:
- persist-credentials: false
- submodules: recursive
- - name: Install Rust non-interactively if not already installed
- if: ${{ matrix.container }}
- run: |
- if ! command -v cargo > /dev/null 2>&1; then
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
- echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- fi
- - name: Install dist
- run: ${{ matrix.install_dist.run }}
- # Get the dist-manifest
- - name: Fetch local artifacts
- uses: actions/download-artifact@v7
- with:
- pattern: artifacts-*
- path: target/distrib/
- merge-multiple: true
- - name: Install dependencies
- run: |
- ${{ matrix.packages_install }}
- - name: Build artifacts
- run: |
- # Actually do builds and make zips and whatnot
- dist build ${{ needs.plan.outputs.tag-flag }} --print=linkage --output-format=json ${{ matrix.dist_args }} > dist-manifest.json
- echo "dist ran successfully"
- - name: Attest
- uses: actions/attest-build-provenance@v3
- with:
- subject-path: "target/distrib/*${{ join(matrix.targets, ', ') }}*"
- - id: cargo-dist
- name: Post-build
- # We force bash here just because github makes it really hard to get values up
- # to "real" actions without writing to env-vars, and writing to env-vars has
- # inconsistent syntax between shell and powershell.
- shell: bash
- run: |
- # Parse out what we just built and upload it to scratch storage
- echo "paths<<EOF" >> "$GITHUB_OUTPUT"
- dist print-upload-files-from-manifest --manifest dist-manifest.json >> "$GITHUB_OUTPUT"
- echo "EOF" >> "$GITHUB_OUTPUT"
-
- cp dist-manifest.json "$BUILD_MANIFEST_NAME"
- - name: "Upload artifacts"
- uses: actions/upload-artifact@v6
- with:
- name: artifacts-build-local-${{ join(matrix.targets, '_') }}
- path: |
- ${{ steps.cargo-dist.outputs.paths }}
- ${{ env.BUILD_MANIFEST_NAME }}
-
- # Build and package all the platform-agnostic(ish) things
- build-global-artifacts:
- needs:
- - plan
- - build-local-artifacts
- runs-on: "ubuntu-22.04"
- env:
- GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- BUILD_MANIFEST_NAME: target/distrib/global-dist-manifest.json
- steps:
- - uses: actions/checkout@v6
- with:
- persist-credentials: false
- submodules: recursive
- - name: Install cached dist
- uses: actions/download-artifact@v7
- with:
- name: cargo-dist-cache
- path: ~/.cargo/bin/
- - run: chmod +x ~/.cargo/bin/dist
- # Get all the local artifacts for the global tasks to use (for e.g. checksums)
- - name: Fetch local artifacts
- uses: actions/download-artifact@v7
- with:
- pattern: artifacts-*
- path: target/distrib/
- merge-multiple: true
- - id: cargo-dist
- shell: bash
- run: |
- dist build ${{ needs.plan.outputs.tag-flag }} --output-format=json "--artifacts=global" > dist-manifest.json
- echo "dist ran successfully"
-
- # Parse out what we just built and upload it to scratch storage
- echo "paths<<EOF" >> "$GITHUB_OUTPUT"
- jq --raw-output ".upload_files[]" dist-manifest.json >> "$GITHUB_OUTPUT"
- echo "EOF" >> "$GITHUB_OUTPUT"
-
- cp dist-manifest.json "$BUILD_MANIFEST_NAME"
- - name: "Upload artifacts"
- uses: actions/upload-artifact@v6
- with:
- name: artifacts-build-global
- path: |
- ${{ steps.cargo-dist.outputs.paths }}
- ${{ env.BUILD_MANIFEST_NAME }}
- # Determines if we should publish/announce
- host:
- needs:
- - plan
- - build-local-artifacts
- - build-global-artifacts
- # Only run if we're "publishing", and only if plan, local and global didn't fail (skipped is fine)
- if: ${{ always() && needs.plan.result == 'success' && needs.plan.outputs.publishing == 'true' && (needs.build-global-artifacts.result == 'skipped' || needs.build-global-artifacts.result == 'success') && (needs.build-local-artifacts.result == 'skipped' || needs.build-local-artifacts.result == 'success') }}
- env:
- GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- runs-on: "ubuntu-22.04"
- outputs:
- val: ${{ steps.host.outputs.manifest }}
- steps:
- - uses: actions/checkout@v6
- with:
- persist-credentials: false
- submodules: recursive
- - name: Install cached dist
- uses: actions/download-artifact@v7
- with:
- name: cargo-dist-cache
- path: ~/.cargo/bin/
- - run: chmod +x ~/.cargo/bin/dist
- # Fetch artifacts from scratch-storage
- - name: Fetch artifacts
- uses: actions/download-artifact@v7
- with:
- pattern: artifacts-*
- path: target/distrib/
- merge-multiple: true
- - id: host
- shell: bash
- run: |
- dist host ${{ needs.plan.outputs.tag-flag }} --steps=upload --steps=release --output-format=json > dist-manifest.json
- echo "artifacts uploaded and released successfully"
- cat dist-manifest.json
- echo "manifest=$(jq -c "." dist-manifest.json)" >> "$GITHUB_OUTPUT"
- - name: "Upload dist-manifest.json"
- uses: actions/upload-artifact@v6
- with:
- # Overwrite the previous copy
- name: artifacts-dist-manifest
- path: dist-manifest.json
- # Create a GitHub Release while uploading all files to it
- - name: "Download GitHub Artifacts"
- uses: actions/download-artifact@v7
- with:
- pattern: artifacts-*
- path: artifacts
- merge-multiple: true
- - name: Cleanup
- run: |
- # Remove the granular manifests
- rm -f artifacts/*-dist-manifest.json
- - name: Create GitHub Release
- env:
- PRERELEASE_FLAG: "${{ fromJson(steps.host.outputs.manifest).announcement_is_prerelease && '--prerelease' || '' }}"
- ANNOUNCEMENT_TITLE: "${{ fromJson(steps.host.outputs.manifest).announcement_title }}"
- ANNOUNCEMENT_BODY: "${{ fromJson(steps.host.outputs.manifest).announcement_github_body }}"
- RELEASE_COMMIT: "${{ github.sha }}"
- run: |
- # Write and read notes from a file to avoid quoting breaking things
- echo "$ANNOUNCEMENT_BODY" > $RUNNER_TEMP/notes.txt
-
- gh release create "${{ needs.plan.outputs.tag }}" --target "$RELEASE_COMMIT" $PRERELEASE_FLAG --title "$ANNOUNCEMENT_TITLE" --notes-file "$RUNNER_TEMP/notes.txt" artifacts/*
-
- announce:
- needs:
- - plan
- - host
- # use "always() && ..." to allow us to wait for all publish jobs while
- # still allowing individual publish jobs to skip themselves (for prereleases).
- # "host" however must run to completion, no skipping allowed!
- if: ${{ always() && needs.host.result == 'success' }}
- runs-on: "ubuntu-22.04"
- env:
- GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- steps:
- - uses: actions/checkout@v6
- with:
- persist-credentials: false
- submodules: recursive
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml
deleted file mode 100644
index 96c8ebc7..00000000
--- a/.github/workflows/rust.yml
+++ /dev/null
@@ -1,230 +0,0 @@
-name: Rust
-
-on:
- push:
- branches: [main]
- paths-ignore:
- - "ui/**"
- pull_request:
- branches: [main]
- paths-ignore:
- - "ui/**"
-
-env:
- CARGO_TERM_COLOR: always
-
-jobs:
- build:
- strategy:
- matrix:
- os: [depot-ubuntu-24.04, macos-14, windows-latest]
- runs-on: ${{ matrix.os }}
-
- steps:
- - uses: actions/checkout@v6
-
- - name: Install rust
- uses: dtolnay/rust-toolchain@master
- with:
- toolchain: 1.96.0
-
- - uses: actions/cache@v5
- with:
- path: |
- ~/.cargo/registry
- ~/.cargo/git
- target
- key: ${{ runner.os }}-cargo-release-${{ hashFiles('**/Cargo.lock') }}
-
- - name: Run cargo build common
- run: cargo build -p atuin-common --locked --release
-
- - name: Run cargo build client
- run: cargo build -p atuin-client --locked --release
-
- - name: Run cargo build server
- run: cargo build -p atuin-server --locked --release
-
- - name: Run cargo build main
- run: cargo build --all --locked --release
-
- cross-compile:
- strategy:
- matrix:
- # There was an attempt to make cross-compiles also work on FreeBSD, but that failed with:
- #
- # warning: libelf.so.2, needed by <...>/libkvm.so, not found (try using -rpath or -rpath-link)
- target: [x86_64-unknown-illumos]
- runs-on: depot-ubuntu-24.04
- steps:
- - uses: actions/checkout@v6
-
- - name: Install cross
- uses: taiki-e/install-action@v2
- with:
- tool: cross
-
- - uses: actions/cache@v5
- with:
- path: |
- ~/.cargo/registry
- ~/.cargo/git
- target
- key: ${{ matrix.target }}-cross-compile-${{ hashFiles('**/Cargo.lock') }}
-
- - name: Run cross build common
- run: cross build -p atuin-common --locked --target ${{ matrix.target }}
-
- - name: Run cross build client
- run: cross build -p atuin-client --locked --target ${{ matrix.target }}
-
- - name: Run cross build server
- run: cross build -p atuin-server --locked --target ${{ matrix.target }}
-
- - name: Run cross build main
- run: |
- cross build --all --locked --target ${{ matrix.target }}
-
- unit-test:
- strategy:
- matrix:
- os: [depot-ubuntu-24.04, macos-14, windows-latest]
- runs-on: ${{ matrix.os }}
-
- steps:
- - uses: actions/checkout@v6
-
- - name: Install rust
- uses: dtolnay/rust-toolchain@master
- with:
- toolchain: 1.96.0
-
- - uses: taiki-e/install-action@v2
- name: Install nextest
- with:
- tool: cargo-nextest
-
- - uses: actions/cache@v5
- with:
- path: |
- ~/.cargo/registry
- ~/.cargo/git
- target
- key: ${{ runner.os }}-cargo-debug-${{ hashFiles('**/Cargo.lock') }}
-
- - name: Run cargo test
- run: cargo nextest run --lib --bins
-
- check:
- strategy:
- matrix:
- os: [depot-ubuntu-24.04, macos-14, windows-latest]
- runs-on: ${{ matrix.os }}
-
- steps:
- - uses: actions/checkout@v6
-
- - name: Install rust
- uses: dtolnay/rust-toolchain@master
- with:
- toolchain: 1.96.0
-
- - uses: actions/cache@v5
- with:
- path: |
- ~/.cargo/registry
- ~/.cargo/git
- target
- key: ${{ runner.os }}-cargo-debug-${{ hashFiles('**/Cargo.lock') }}
-
- - name: Run cargo check (all features)
- run: cargo check --all-features --workspace
-
- - name: Run cargo check (no features)
- run: cargo check --no-default-features --workspace
-
- - name: Run cargo check (sync)
- run: cargo check --no-default-features --features sync --workspace
-
- - name: Run cargo check (server)
- run: cargo check -p atuin-server
-
- - name: Run cargo check (client only)
- run: cargo check --no-default-features --features client --workspace
-
- integration-test:
- runs-on: depot-ubuntu-24.04
-
- services:
- postgres:
- image: postgres
- env:
- POSTGRES_USER: atuin
- POSTGRES_PASSWORD: pass
- POSTGRES_DB: atuin
- ports:
- - 5432:5432
-
- steps:
- - uses: actions/checkout@v6
-
- - name: Install rust
- uses: dtolnay/rust-toolchain@master
- with:
- toolchain: 1.96.0
-
- - uses: taiki-e/install-action@v2
- name: Install nextest
- with:
- tool: cargo-nextest
-
- - uses: actions/cache@v5
- with:
- path: |
- ~/.cargo/registry
- ~/.cargo/git
- target
- key: ${{ runner.os }}-cargo-debug-${{ hashFiles('**/Cargo.lock') }}
-
- - name: Run cargo test
- run: cargo nextest run --test '*'
- env:
- ATUIN_DB_URI: postgres://atuin:pass@localhost:5432/atuin
-
- clippy:
- runs-on: depot-ubuntu-24.04
-
- steps:
- - uses: actions/checkout@v6
-
- - name: Install latest rust
- uses: dtolnay/rust-toolchain@master
- with:
- toolchain: 1.96.0
- components: clippy
-
- - uses: actions/cache@v5
- with:
- path: |
- ~/.cargo/registry
- ~/.cargo/git
- target
- key: ${{ runner.os }}-cargo-debug-${{ hashFiles('**/Cargo.lock') }}
-
- - name: Run clippy
- run: cargo clippy -- -D warnings -D clippy::redundant_clone
-
- format:
- runs-on: depot-ubuntu-24.04
-
- steps:
- - uses: actions/checkout@v6
-
- - name: Install latest rust
- uses: dtolnay/rust-toolchain@master
- with:
- toolchain: 1.96.0
- components: rustfmt
-
- - name: Format
- run: cargo fmt -- --check
diff --git a/.github/workflows/shellcheck.yml b/.github/workflows/shellcheck.yml
deleted file mode 100644
index e85381fd..00000000
--- a/.github/workflows/shellcheck.yml
+++ /dev/null
@@ -1,18 +0,0 @@
-name: Shellcheck
-
-on:
- push:
- branches: [ main ]
- pull_request:
- branches: [ main ]
-
-jobs:
- shellcheck:
- runs-on: depot-ubuntu-24.04
-
- steps:
- - uses: actions/checkout@v6
- - name: Run shellcheck
- uses: ludeeus/action-shellcheck@master
- env:
- SHELLCHECK_OPTS: "-e SC2148"
diff --git a/.github/workflows/update-nix-deps.yml b/.github/workflows/update-nix-deps.yml
deleted file mode 100644
index 2ed5ff78..00000000
--- a/.github/workflows/update-nix-deps.yml
+++ /dev/null
@@ -1,21 +0,0 @@
-name: Update Nix Deps
-on:
- workflow_dispatch: # allows manual triggering
- schedule:
- - cron: '0 0 1 * *' # runs monthly on the first day of the month at 00:00
-
-jobs:
- lockfile:
- runs-on: depot-ubuntu-24.04
- if: github.repository == 'atuinsh/atuin'
- steps:
- - name: Checkout repository
- uses: actions/checkout@v6
- - name: Install Nix
- uses: DeterminateSystems/nix-installer-action@main
- - name: Update flake.lock
- uses: DeterminateSystems/update-flake-lock@main
- with:
- pr-title: "chore(deps): update flake.lock"
- pr-labels: |
- dependencies