Skip to content

Commit

Permalink
Merge branch 'master' into feature/unbind-keybinds
Browse files Browse the repository at this point in the history
  • Loading branch information
the-mikedavis committed Oct 15, 2022
2 parents 119c750 + 661f48d commit 86caa8b
Show file tree
Hide file tree
Showing 320 changed files with 17,729 additions and 5,817 deletions.
File renamed without changes.
11 changes: 11 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Auto detect text files and perform normalization
* text=auto

*.rs text diff=rust
*.toml text diff=toml

*.scm text diff=scheme
*.md text diff=markdown

book/theme/highlight.js linguist-vendored
Cargo.lock text
13 changes: 13 additions & 0 deletions .github/ISSUE_TEMPLATE/enhancement.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
name: Enhancement
about: Suggest an improvement
title: ''
labels: C-enhancement
assignees: ''
---

<!--
Your enhancement may already be reported!
Please search on the issue tracker before creating a new issue.
If this is an idea for a feature, please open an "Idea" Discussion instead.
-->
13 changes: 0 additions & 13 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

28 changes: 28 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,14 @@ jobs:
command: clippy
args: --all-targets -- -D warnings

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

docs:
name: Docs
runs-on: ubuntu-latest
Expand Down Expand Up @@ -131,3 +139,23 @@ 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
2 changes: 1 addition & 1 deletion .github/workflows/cachix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ jobs:
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}

- name: Build nix flake
run: nix build
run: nix build -L
2 changes: 1 addition & 1 deletion .github/workflows/msrv-rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "1.57.0"
channel = "1.61.0"
components = ["rustfmt", "rust-src"]
83 changes: 58 additions & 25 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@ on:
tags:
- '[0-9]+.[0-9]+'
- '[0-9]+.[0-9]+.[0-9]+'
branches:
- 'patch/ci-release-*'
pull_request:
paths:
- '.github/workflows/release.yml'

env:
# Preview mode: Publishes the build output as a CI artifact instead of creating
# a release, allowing for manual inspection of the output. This mode is
# activated if the CI run was triggered by events other than pushed tags, or
# if the repository is a fork.
preview: ${{ !startsWith(github.ref, 'refs/tags/') || github.repository != 'helix-editor/helix' }}

jobs:
fetch-grammars:
Expand Down Expand Up @@ -49,11 +61,16 @@ jobs:
rust: stable
target: x86_64-unknown-linux-gnu
cross: false
# - build: aarch64-linux
# os: ubuntu-20.04
# rust: stable
# target: aarch64-unknown-linux-gnu
# cross: true
- build: aarch64-linux
os: ubuntu-20.04
rust: stable
target: aarch64-unknown-linux-gnu
cross: true
- build: riscv64-linux
os: ubuntu-20.04
rust: stable
target: riscv64gc-unknown-linux-gnu
cross: true
- build: x86_64-macos
os: macos-latest
rust: stable
Expand All @@ -64,10 +81,12 @@ jobs:
rust: stable
target: x86_64-pc-windows-msvc
cross: false
# - build: aarch64-macos
# os: macos-latest
# rust: stable
# target: aarch64-apple-darwin
- build: aarch64-macos
os: macos-latest
rust: stable
target: aarch64-apple-darwin
cross: false
skip_tests: true # x86_64 host can't run aarch64 code
# - build: x86_64-win-gnu
# os: windows-2019
# rust: stable-x86_64-gnu
Expand Down Expand Up @@ -98,36 +117,40 @@ jobs:
target: ${{ matrix.target }}
override: true

# Install a pre-release version of Cross
# TODO: We need to pre-install Cross because we need cross-rs/cross#591 to
# get a newer C++ compiler toolchain. Remove this step when Cross
# 0.3.0, which includes cross-rs/cross#591, is released.
- name: Install Cross
if: "matrix.cross"
run: cargo install cross --git https://github.com/cross-rs/cross.git --rev 47df5c76e7cba682823a0b6aa6d95c17b31ba63a

- name: Run cargo test
uses: actions-rs/cargo@v1
if: "!matrix.skip_tests"
with:
use-cross: ${{ matrix.cross }}
command: test
args: --release --locked --target ${{ matrix.target }} --workspace

- name: Set profile.release.strip = true
shell: bash
run: |
cat >> .cargo/config.toml <<EOF
[profile.release]
strip = true
EOF
- name: Build release binary
uses: actions-rs/cargo@v1
with:
use-cross: ${{ matrix.cross }}
command: build
args: --release --locked --target ${{ matrix.target }}

- name: Strip release binary (linux and macos)
if: matrix.build == 'x86_64-linux' || matrix.build == 'x86_64-macos'
run: strip "target/${{ matrix.target }}/release/hx"

- name: Strip release binary (arm)
if: matrix.build == 'aarch64-linux'
run: |
docker run --rm -v \
"$PWD/target:/target:Z" \
rustembedded/cross:${{ matrix.target }} \
aarch64-linux-gnu-strip \
/target/${{ matrix.target }}/release/hx
- name: Build AppImage
shell: bash
if: matrix.build == 'x86_64-linux'
if: matrix.build == 'aarch64-linux' || matrix.build == 'x86_64-linux'
run: |
mkdir dist
Expand All @@ -136,8 +159,10 @@ jobs:
name=${GITHUB_REF:10}
fi
build="${{ matrix.build }}"
export VERSION="$name"
export ARCH=x86_64
export ARCH=${build%-linux}
export APP=helix
export OUTPUT="helix-$VERSION-$ARCH.AppImage"
export UPDATE_INFORMATION="gh-releases-zsync|$GITHUB_REPOSITORY_OWNER|helix|latest|$APP-*-$ARCH.AppImage.zsync"
Expand Down Expand Up @@ -234,7 +259,7 @@ jobs:
mv bins-$platform/hx$exe $pkgname
chmod +x $pkgname/hx$exe
if [[ "$platform" = "x86_64-linux" ]]; then
if [[ "$platform" = "aarch64-linux" || "$platform" = "x86_64-linux" ]]; then
mv bins-$platform/helix-*.AppImage* dist/
fi
Expand All @@ -250,9 +275,17 @@ jobs:
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
if: env.preview == 'false'
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: dist/*
file_glob: true
tag: ${{ steps.tagname.outputs.val }}
overwrite: true

- name: Upload binaries as artifact
uses: actions/upload-artifact@v3
if: env.preview == 'true'
with:
name: release
path: dist/*
5 changes: 5 additions & 0 deletions .ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Things that we don't want ripgrep to search that we do want in git
# https://github.com/BurntSushi/ripgrep/blob/master/GUIDE.md#automatic-filtering

# Minified JS vendored from mdbook
book/theme/highlight.js
Loading

0 comments on commit 86caa8b

Please sign in to comment.