Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions .circleci/config.yml

This file was deleted.

6 changes: 3 additions & 3 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ Please submit pull request to `dev` branch. This is to avoid mismatch between
vimscript and rust binary run by end user.

# Release
1. Update [CHANGELOG](../CHANGELOG.md).
1. Issue command `cargo release patch`. Note you will need [`cargo-release`][cargo-release] installed. This will create a commit with updated version metadata, tag it, push to GitHub remote, which will then trigger Travis workflow to generate binaries.
1. Once Travis workflow is finished successfully, rebase `dev` branch onto `next` branch.
1. Issue command `cargo release patch`. Note you will need [`cargo-release`][cargo-release] installed. This will create a commit with updated version metadata, tag it, push to GitHub remote.
1. Create a release on github UI from the tag you created on the previous step. This will trigger a github workflow to create the binaries and upload them to the release.
1. Once the github release workflow has finished, rebase next to dev (`git rebase dev`).

[cargo-release]: https://github.com/sunng87/cargo-release
127 changes: 127 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
name: CI
on:
pull_request:
push:
branches:
- dev
- next

jobs:
test-integration:
name: Integration tests
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 20

- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
components: rustfmt, clippy

- name: Install other dependencies
run: |
sudo apt-get update
sudo apt-get install --yes --no-install-recommends neovim curl git python3-pip python3-pytest mypy flake8 npm make
sudo apt-get clean
sudo rm -rf /var/lib/apt/lists/*
python3 -m pip install neovim vim-vint
sudo curl -L https://github.com/rust-analyzer/rust-analyzer/releases/latest/download/rust-analyzer-linux -o /usr/local/bin/rust-analyzer
sudo chmod +x /usr/local/bin/rust-analyzer

- name: Test
run: make integration-test

test-unit:
name: Unit tests
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 20

- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
components: rustfmt, clippy

- name: Compile
run: cargo test --no-run --locked

- name: Test
run: cargo test

lint-rust:
name: Lint rust
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 20

- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
components: rustfmt, clippy

- name: Format
run: cargo fmt -- --check

- name: Check
run: cargo clippy -- -D warnings

lint-vimscript:
name: Lint VimL
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install --yes --no-install-recommends python3-pip python3-pytest python3-setuptools make
sudo apt-get clean
sudo rm -rf /var/lib/apt/lists/*
sudo python3 -m pip install neovim vim-vint

- name: Lint
run: make vim-lint

lint-python:
name: Lint Python
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install --yes --no-install-recommends python3-pip python3-pytest mypy flake8 make
sudo apt-get clean
sudo rm -rf /var/lib/apt/lists/*

- name: Lint
run: make python-lint
94 changes: 94 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: Build and upload binaries to release

on:
release:
types: [created]

jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
include:
- target: x86_64-unknown-linux-musl
binary: languageclient
asset_name: languageclient-${{ github.event.release.tag_name }}-x86_64-unknown-linux-musl
- target: aarch64-unknown-linux-musl
binary: languageclient
asset_name: languageclient-${{ github.event.release.tag_name }}-aarch64-unknown-linux-musl
- target: i686-unknown-linux-musl
binary: languageclient
asset_name: languageclient-${{ github.event.release.tag_name }}-i686-unknown-linux-musl
- target: x86_64-pc-windows-gnu
binary: languageclient.exe
asset_name: languageclient-${{ github.event.release.tag_name }}-x86_64-pc-windows-gnu.exe
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set output
id: vars
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}

- uses: actions-rs/toolchain@v1
with:
toolchain: stable

- name: Install cross
run: cargo install cross

- name: Compile
run: cross build --release --locked --target=${{ matrix.target }}

- name: Hash
run: cp target/${{ matrix.target }}/release/${{ matrix.binary }} bin/${{ matrix.binary }} && sha256sum bin/${{ matrix.binary }} | tee bin/languageclient.sha256

- name: Upload binary to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/${{ matrix.target }}/release/${{ matrix.binary }}
asset_name: ${{ matrix.asset_name }}
tag: ${{ github.ref }}

- name: Upload sha to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: bin/languageclient.sha256
asset_name: ${{ matrix.asset_name }}.sha256
tag: ${{ github.ref }}

build-mac:
name: Build mac
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- uses: actions-rs/toolchain@v1
with:
toolchain: stable

- name: Compile
run: cargo build --release --locked

- name: Hash
run: cp target/release/languageclient bin/languageclient && openssl sha256 bin/languageclient | awk '{print $2 " bin/languageclient"}' > bin/languageclient.sha256

- name: Upload binary to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/release/languageclient
asset_name: languageclient-${{ github.event.release.tag_name }}-x86_64-apple-darwin
tag: ${{ github.ref }}

- name: Upload sha to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: bin/languageclient.sha256
asset_name: languageclient-${{ github.event.release.tag_name }}-x86_64-apple-darwin.sha256
tag: ${{ github.ref }}
56 changes: 0 additions & 56 deletions .travis.yml

This file was deleted.

3 changes: 0 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@ integration-test-docker:
integration-test-docker-debug:
docker run --interactive --tty --volume ${CURDIR}:/root/.config/nvim autozimu/languageclientneovim

cleanup-binary-tags:
ci/cleanup-binary-tags.py

clean:
cargo clean
rm -rf bin/languageclient
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# LanguageClient-neovim

[![CircleCI](https://circleci.com/gh/autozimu/LanguageClient-neovim.svg?style=svg)](https://circleci.com/gh/autozimu/LanguageClient-neovim) [![Join the chat at https://gitter.im/LanguageClient-neovim/LanguageClient-neovim](https://badges.gitter.im/LanguageClient-neovim/LanguageClient-neovim.svg)](https://gitter.im/LanguageClient-neovim/LanguageClient-neovim?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Join the chat at https://gitter.im/LanguageClient-neovim/LanguageClient-neovim](https://badges.gitter.im/LanguageClient-neovim/LanguageClient-neovim.svg)](https://gitter.im/LanguageClient-neovim/LanguageClient-neovim?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

[Language Server Protocol](LSP) support for [vim] and [neovim].

Expand Down
16 changes: 0 additions & 16 deletions ci/Dockerfile

This file was deleted.

Loading