Skip to content

Commit 86caa8b

Browse files
committed
Merge branch 'master' into feature/unbind-keybinds
2 parents 119c750 + 661f48d commit 86caa8b

File tree

320 files changed

+17729
-5817
lines changed

Some content is hidden

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

320 files changed

+17729
-5817
lines changed

.cargo/config .cargo/config.toml

File renamed without changes.

.gitattributes

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Auto detect text files and perform normalization
2+
* text=auto
3+
4+
*.rs text diff=rust
5+
*.toml text diff=toml
6+
7+
*.scm text diff=scheme
8+
*.md text diff=markdown
9+
10+
book/theme/highlight.js linguist-vendored
11+
Cargo.lock text

.github/ISSUE_TEMPLATE/enhancement.md

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
name: Enhancement
3+
about: Suggest an improvement
4+
title: ''
5+
labels: C-enhancement
6+
assignees: ''
7+
---
8+
9+
<!--
10+
Your enhancement may already be reported!
11+
Please search on the issue tracker before creating a new issue.
12+
If this is an idea for a feature, please open an "Idea" Discussion instead.
13+
-->

.github/ISSUE_TEMPLATE/feature_request.md

-13
This file was deleted.

.github/workflows/build.yml

+28
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,14 @@ jobs:
103103
command: clippy
104104
args: --all-targets -- -D warnings
105105

106+
- name: Run cargo doc
107+
uses: actions-rs/cargo@v1
108+
with:
109+
command: doc
110+
args: --no-deps --workspace --document-private-items
111+
env:
112+
RUSTDOCFLAGS: -D warnings
113+
106114
docs:
107115
name: Docs
108116
runs-on: ubuntu-latest
@@ -131,3 +139,23 @@ jobs:
131139
|| (echo "Run 'cargo xtask docgen', commit the changes and push again" \
132140
&& exit 1)
133141
142+
queries:
143+
name: Tree-sitter queries
144+
runs-on: ubuntu-latest
145+
steps:
146+
- name: Checkout sources
147+
uses: actions/checkout@v3
148+
149+
- name: Install stable toolchain
150+
uses: helix-editor/rust-toolchain@v1
151+
with:
152+
profile: minimal
153+
override: true
154+
155+
- uses: Swatinem/rust-cache@v1
156+
157+
- name: Generate docs
158+
uses: actions-rs/cargo@v1
159+
with:
160+
command: xtask
161+
args: query-check

.github/workflows/cachix.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ jobs:
2323
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
2424

2525
- name: Build nix flake
26-
run: nix build
26+
run: nix build -L
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[toolchain]
2-
channel = "1.57.0"
2+
channel = "1.61.0"
33
components = ["rustfmt", "rust-src"]

.github/workflows/release.yml

+58-25
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,18 @@ on:
44
tags:
55
- '[0-9]+.[0-9]+'
66
- '[0-9]+.[0-9]+.[0-9]+'
7+
branches:
8+
- 'patch/ci-release-*'
9+
pull_request:
10+
paths:
11+
- '.github/workflows/release.yml'
12+
13+
env:
14+
# Preview mode: Publishes the build output as a CI artifact instead of creating
15+
# a release, allowing for manual inspection of the output. This mode is
16+
# activated if the CI run was triggered by events other than pushed tags, or
17+
# if the repository is a fork.
18+
preview: ${{ !startsWith(github.ref, 'refs/tags/') || github.repository != 'helix-editor/helix' }}
719

820
jobs:
921
fetch-grammars:
@@ -49,11 +61,16 @@ jobs:
4961
rust: stable
5062
target: x86_64-unknown-linux-gnu
5163
cross: false
52-
# - build: aarch64-linux
53-
# os: ubuntu-20.04
54-
# rust: stable
55-
# target: aarch64-unknown-linux-gnu
56-
# cross: true
64+
- build: aarch64-linux
65+
os: ubuntu-20.04
66+
rust: stable
67+
target: aarch64-unknown-linux-gnu
68+
cross: true
69+
- build: riscv64-linux
70+
os: ubuntu-20.04
71+
rust: stable
72+
target: riscv64gc-unknown-linux-gnu
73+
cross: true
5774
- build: x86_64-macos
5875
os: macos-latest
5976
rust: stable
@@ -64,10 +81,12 @@ jobs:
6481
rust: stable
6582
target: x86_64-pc-windows-msvc
6683
cross: false
67-
# - build: aarch64-macos
68-
# os: macos-latest
69-
# rust: stable
70-
# target: aarch64-apple-darwin
84+
- build: aarch64-macos
85+
os: macos-latest
86+
rust: stable
87+
target: aarch64-apple-darwin
88+
cross: false
89+
skip_tests: true # x86_64 host can't run aarch64 code
7190
# - build: x86_64-win-gnu
7291
# os: windows-2019
7392
# rust: stable-x86_64-gnu
@@ -98,36 +117,40 @@ jobs:
98117
target: ${{ matrix.target }}
99118
override: true
100119

120+
# Install a pre-release version of Cross
121+
# TODO: We need to pre-install Cross because we need cross-rs/cross#591 to
122+
# get a newer C++ compiler toolchain. Remove this step when Cross
123+
# 0.3.0, which includes cross-rs/cross#591, is released.
124+
- name: Install Cross
125+
if: "matrix.cross"
126+
run: cargo install cross --git https://github.com/cross-rs/cross.git --rev 47df5c76e7cba682823a0b6aa6d95c17b31ba63a
127+
101128
- name: Run cargo test
102129
uses: actions-rs/cargo@v1
130+
if: "!matrix.skip_tests"
103131
with:
104132
use-cross: ${{ matrix.cross }}
105133
command: test
106134
args: --release --locked --target ${{ matrix.target }} --workspace
107135

136+
- name: Set profile.release.strip = true
137+
shell: bash
138+
run: |
139+
cat >> .cargo/config.toml <<EOF
140+
[profile.release]
141+
strip = true
142+
EOF
143+
108144
- name: Build release binary
109145
uses: actions-rs/cargo@v1
110146
with:
111147
use-cross: ${{ matrix.cross }}
112148
command: build
113149
args: --release --locked --target ${{ matrix.target }}
114150

115-
- name: Strip release binary (linux and macos)
116-
if: matrix.build == 'x86_64-linux' || matrix.build == 'x86_64-macos'
117-
run: strip "target/${{ matrix.target }}/release/hx"
118-
119-
- name: Strip release binary (arm)
120-
if: matrix.build == 'aarch64-linux'
121-
run: |
122-
docker run --rm -v \
123-
"$PWD/target:/target:Z" \
124-
rustembedded/cross:${{ matrix.target }} \
125-
aarch64-linux-gnu-strip \
126-
/target/${{ matrix.target }}/release/hx
127-
128151
- name: Build AppImage
129152
shell: bash
130-
if: matrix.build == 'x86_64-linux'
153+
if: matrix.build == 'aarch64-linux' || matrix.build == 'x86_64-linux'
131154
run: |
132155
mkdir dist
133156
@@ -136,8 +159,10 @@ jobs:
136159
name=${GITHUB_REF:10}
137160
fi
138161
162+
build="${{ matrix.build }}"
163+
139164
export VERSION="$name"
140-
export ARCH=x86_64
165+
export ARCH=${build%-linux}
141166
export APP=helix
142167
export OUTPUT="helix-$VERSION-$ARCH.AppImage"
143168
export UPDATE_INFORMATION="gh-releases-zsync|$GITHUB_REPOSITORY_OWNER|helix|latest|$APP-*-$ARCH.AppImage.zsync"
@@ -234,7 +259,7 @@ jobs:
234259
mv bins-$platform/hx$exe $pkgname
235260
chmod +x $pkgname/hx$exe
236261
237-
if [[ "$platform" = "x86_64-linux" ]]; then
262+
if [[ "$platform" = "aarch64-linux" || "$platform" = "x86_64-linux" ]]; then
238263
mv bins-$platform/helix-*.AppImage* dist/
239264
fi
240265
@@ -250,9 +275,17 @@ jobs:
250275
251276
- name: Upload binaries to release
252277
uses: svenstaro/upload-release-action@v2
278+
if: env.preview == 'false'
253279
with:
254280
repo_token: ${{ secrets.GITHUB_TOKEN }}
255281
file: dist/*
256282
file_glob: true
257283
tag: ${{ steps.tagname.outputs.val }}
258284
overwrite: true
285+
286+
- name: Upload binaries as artifact
287+
uses: actions/upload-artifact@v3
288+
if: env.preview == 'true'
289+
with:
290+
name: release
291+
path: dist/*

.ignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Things that we don't want ripgrep to search that we do want in git
2+
# https://github.com/BurntSushi/ripgrep/blob/master/GUIDE.md#automatic-filtering
3+
4+
# Minified JS vendored from mdbook
5+
book/theme/highlight.js

0 commit comments

Comments
 (0)