Skip to content

Commit

Permalink
Merge branch 'master' into dcardamo:statusline-abs-path
Browse files Browse the repository at this point in the history
  • Loading branch information
the-mikedavis committed Feb 10, 2024
2 parents a8ea416 + d570c29 commit 1b6f987
Show file tree
Hide file tree
Showing 705 changed files with 55,166 additions and 16,668 deletions.
16 changes: 15 additions & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# we use tokio_unstable to enable runtime::Handle::id so we can separate
# globals from multiple parallel tests. If that function ever does get removed
# its possible to replace (with some additional overhead and effort)
# Annoyingly build.rustflags doesn't work here because it gets overwritten
# if people have their own global target.<..> config (for example to enable mold)
# specifying flags this way is more robust as they get merged
# This still gets overwritten by RUST_FLAGS though, luckily it shouldn't be necessary
# to set those most of the time. If downstream does overwrite this its not a huge
# deal since it will only break tests anyway
[target."cfg(all())"]
rustflags = ["--cfg", "tokio_unstable", "-C", "target-feature=-crt-static"]


[alias]
xtask = "run --package xtask --"
integration-test = "test --features integration --workspace --test integration"
integration-test = "test --features integration --profile integration --workspace --test integration"

1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
watch_file shell.nix
watch_file flake.lock
watch_file rust-toolchain.toml

# try to use flakes, if it fails use normal nix (ie. shell.nix)
use flake || use nix
Expand Down
17 changes: 14 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ body:
id: helix-log
attributes:
label: Helix log
description: See `hx -h` for log file path
description: See `hx -h` for log file path. If you can reproduce the issue run `RUST_BACKTRACE=1 hx -vv` to generate a more detailed log file.
value: |
<details><summary>~/.cache/helix/helix.log</summary>
Expand All @@ -55,13 +55,24 @@ body:
placeholder: wezterm 20220101-133340-7edc5b5a
validations:
required: true
- type: input
id: installation-method
attributes:
label: Installation Method
description: >
How you installed Helix - from a package manager like Homebrew or the
AUR, built from source, downloaded a binary from the releases page, etc.
placeholder: "source / brew / nixpkgs / flake / releases page"
validations:
required: true
- type: input
id: helix-version
attributes:
label: Helix Version
description: >
Helix version (`hx -V` if using a release, `git describe` if building
from master)
placeholder: "helix 0.6.0 (c0dbd6dc)"
from master).
**Make sure that you are using the [latest helix release](https://github.com/helix-editor/helix/releases) or a newer master build**
placeholder: "helix 22.12 (5eaa6d97)"
validations:
required: true
105 changes: 31 additions & 74 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,29 @@ on:
push:
branches:
- master
merge_group:
schedule:
- cron: '00 01 * * *'

jobs:
check:
name: Check
name: Check (msrv)
runs-on: ubuntu-latest
strategy:
matrix:
rust: [stable, msrv]
steps:
- name: Checkout sources
uses: actions/checkout@v3

- name: Use MSRV rust toolchain
if: matrix.rust == 'msrv'
run: cp .github/workflows/msrv-rust-toolchain.toml rust-toolchain.toml

uses: actions/checkout@v4
- name: Install stable toolchain
uses: helix-editor/rust-toolchain@v1
with:
profile: minimal
override: true

- uses: Swatinem/rust-cache@v1
- uses: Swatinem/rust-cache@v2
with:
shared-key: "build"

- name: Run cargo check
uses: actions-rs/cargo@v1
with:
command: check
run: cargo check

test:
name: Test Suite
Expand All @@ -43,33 +36,27 @@ jobs:
HELIX_LOG_LEVEL: info
steps:
- name: Checkout sources
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install stable toolchain
uses: helix-editor/rust-toolchain@v1
with:
profile: minimal
override: true
uses: dtolnay/[email protected]

- uses: Swatinem/rust-cache@v1
- uses: Swatinem/rust-cache@v2
with:
shared-key: "build"

- name: Cache test tree-sitter grammar
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: runtime/grammars
key: ${{ runner.os }}-stable-v${{ env.CACHE_VERSION }}-tree-sitter-grammars-${{ hashFiles('languages.toml') }}
restore-keys: ${{ runner.os }}-stable-v${{ env.CACHE_VERSION }}-tree-sitter-grammars-

- name: Run cargo test
uses: actions-rs/cargo@v1
with:
command: test
args: --workspace
run: cargo test --workspace

- name: Run cargo integration-test
uses: actions-rs/cargo@v1
with:
command: integration-test
run: cargo integration-test

strategy:
matrix:
Expand All @@ -80,34 +67,25 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install stable toolchain
uses: helix-editor/rust-toolchain@v1
uses: dtolnay/rust-toolchain@1.70
with:
profile: minimal
override: true
components: rustfmt, clippy

- uses: Swatinem/rust-cache@v1
- uses: Swatinem/rust-cache@v2
with:
shared-key: "build"

- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
run: cargo fmt --all --check

- name: Run cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-targets -- -D warnings
run: cargo clippy --workspace --all-targets -- -D warnings

- name: Run cargo doc
uses: actions-rs/cargo@v1
with:
command: doc
args: --no-deps --workspace --document-private-items
run: cargo doc --no-deps --workspace --document-private-items
env:
RUSTDOCFLAGS: -D warnings

Expand All @@ -116,21 +94,20 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install stable toolchain
uses: helix-editor/rust-toolchain@v1
uses: dtolnay/[email protected]

- uses: Swatinem/rust-cache@v2
with:
profile: minimal
override: true
shared-key: "build"

- uses: Swatinem/rust-cache@v1
- name: Validate queries
run: cargo xtask query-check

- name: Generate docs
uses: actions-rs/cargo@v1
with:
command: xtask
args: docgen
run: cargo xtask docgen

- name: Check uncommitted documentation changes
run: |
Expand All @@ -139,23 +116,3 @@ jobs:
|| (echo "Run 'cargo xtask docgen', commit the changes and push again" \
&& exit 1)
queries:
name: Tree-sitter queries
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3

- name: Install stable toolchain
uses: helix-editor/rust-toolchain@v1
with:
profile: minimal
override: true

- uses: Swatinem/rust-cache@v1

- name: Generate docs
uses: actions-rs/cargo@v1
with:
command: xtask
args: query-check
6 changes: 3 additions & 3 deletions .github/workflows/cachix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install nix
uses: cachix/install-nix-action@v18
uses: cachix/install-nix-action@v25

- name: Authenticate with Cachix
uses: cachix/cachix-action@v11
uses: cachix/cachix-action@v14
with:
name: helix
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
Expand All @@ -26,16 +26,16 @@ jobs:
OUTDIR=$(basename ${{ github.ref }})
echo "OUTDIR=$OUTDIR" >> $GITHUB_ENV
- name: Deploy
- name: Deploy stable
uses: peaceiris/actions-gh-pages@v3
if: startswith(github.ref, 'refs/tags/')
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./book/book
destination_dir: ./${{ env.OUTDIR }}

- name: Deploy stable
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: startswith(github.ref, 'refs/tags/')
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./book/book
destination_dir: ./${{ env.OUTDIR }}
2 changes: 1 addition & 1 deletion .github/workflows/languages.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ indent = { tab-width = 4, unit = " " }

[[grammar]]
name = "rust"
source = { git = "https://github.com/tree-sitter/tree-sitter-rust", rev = "a360da0a29a19c281d08295a35ecd0544d2da211" }
source = { git = "https://github.com/tree-sitter/tree-sitter-rust", rev = "0431a2c60828731f27491ee9fdefe25e250ce9c9" }

[[language]]
name = "nix"
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/msrv-rust-toolchain.toml

This file was deleted.

Loading

0 comments on commit 1b6f987

Please sign in to comment.