Skip to content

Commit e8e7e25

Browse files
authored
Use github actions instead of travis and circle (#1173)
1 parent a5d74bd commit e8e7e25

File tree

18 files changed

+243
-282
lines changed

18 files changed

+243
-282
lines changed

.circleci/config.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

.github/CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ Please submit pull request to `dev` branch. This is to avoid mismatch between
5959
vimscript and rust binary run by end user.
6060

6161
# Release
62-
1. Update [CHANGELOG](../CHANGELOG.md).
63-
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.
64-
1. Once Travis workflow is finished successfully, rebase `dev` branch onto `next` branch.
62+
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.
63+
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.
64+
1. Once the github release workflow has finished, rebase next to dev (`git rebase dev`).
6565

6666
[cargo-release]: https://github.com/sunng87/cargo-release

.github/workflows/ci.yml

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
name: CI
2+
on:
3+
pull_request:
4+
push:
5+
branches:
6+
- dev
7+
- next
8+
9+
jobs:
10+
test-integration:
11+
name: Integration tests
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v2
17+
with:
18+
ref: ${{ github.event.pull_request.head.sha }}
19+
fetch-depth: 20
20+
21+
- name: Install Rust toolchain
22+
uses: actions-rs/toolchain@v1
23+
with:
24+
toolchain: stable
25+
profile: minimal
26+
override: true
27+
components: rustfmt, clippy
28+
29+
- name: Install other dependencies
30+
run: |
31+
sudo apt-get update
32+
sudo apt-get install --yes --no-install-recommends neovim curl git python3-pip python3-pytest mypy flake8 npm make
33+
sudo apt-get clean
34+
sudo rm -rf /var/lib/apt/lists/*
35+
python3 -m pip install neovim vim-vint
36+
sudo curl -L https://github.com/rust-analyzer/rust-analyzer/releases/latest/download/rust-analyzer-linux -o /usr/local/bin/rust-analyzer
37+
sudo chmod +x /usr/local/bin/rust-analyzer
38+
39+
- name: Test
40+
run: make integration-test
41+
42+
test-unit:
43+
name: Unit tests
44+
runs-on: ubuntu-latest
45+
46+
steps:
47+
- name: Checkout repository
48+
uses: actions/checkout@v2
49+
with:
50+
ref: ${{ github.event.pull_request.head.sha }}
51+
fetch-depth: 20
52+
53+
- name: Install Rust toolchain
54+
uses: actions-rs/toolchain@v1
55+
with:
56+
toolchain: stable
57+
profile: minimal
58+
override: true
59+
components: rustfmt, clippy
60+
61+
- name: Compile
62+
run: cargo test --no-run --locked
63+
64+
- name: Test
65+
run: cargo test
66+
67+
lint-rust:
68+
name: Lint rust
69+
runs-on: ubuntu-latest
70+
71+
steps:
72+
- name: Checkout repository
73+
uses: actions/checkout@v2
74+
with:
75+
ref: ${{ github.event.pull_request.head.sha }}
76+
fetch-depth: 20
77+
78+
- name: Install Rust toolchain
79+
uses: actions-rs/toolchain@v1
80+
with:
81+
toolchain: stable
82+
profile: minimal
83+
override: true
84+
components: rustfmt, clippy
85+
86+
- name: Format
87+
run: cargo fmt -- --check
88+
89+
- name: Check
90+
run: cargo clippy -- -D warnings
91+
92+
lint-vimscript:
93+
name: Lint VimL
94+
runs-on: ubuntu-latest
95+
96+
steps:
97+
- name: Checkout repository
98+
uses: actions/checkout@v2
99+
100+
- name: Install dependencies
101+
run: |
102+
sudo apt-get update
103+
sudo apt-get install --yes --no-install-recommends python3-pip python3-pytest python3-setuptools make
104+
sudo apt-get clean
105+
sudo rm -rf /var/lib/apt/lists/*
106+
sudo python3 -m pip install neovim vim-vint
107+
108+
- name: Lint
109+
run: make vim-lint
110+
111+
lint-python:
112+
name: Lint Python
113+
runs-on: ubuntu-latest
114+
115+
steps:
116+
- name: Checkout repository
117+
uses: actions/checkout@v2
118+
119+
- name: Install dependencies
120+
run: |
121+
sudo apt-get update
122+
sudo apt-get install --yes --no-install-recommends python3-pip python3-pytest mypy flake8 make
123+
sudo apt-get clean
124+
sudo rm -rf /var/lib/apt/lists/*
125+
126+
- name: Lint
127+
run: make python-lint

.github/workflows/release.yml

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
name: Build and upload binaries to release
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
build:
9+
name: Build
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
include:
14+
- target: x86_64-unknown-linux-musl
15+
binary: languageclient
16+
asset_name: languageclient-${{ github.event.release.tag_name }}-x86_64-unknown-linux-musl
17+
- target: aarch64-unknown-linux-musl
18+
binary: languageclient
19+
asset_name: languageclient-${{ github.event.release.tag_name }}-aarch64-unknown-linux-musl
20+
- target: i686-unknown-linux-musl
21+
binary: languageclient
22+
asset_name: languageclient-${{ github.event.release.tag_name }}-i686-unknown-linux-musl
23+
- target: x86_64-pc-windows-gnu
24+
binary: languageclient.exe
25+
asset_name: languageclient-${{ github.event.release.tag_name }}-x86_64-pc-windows-gnu.exe
26+
steps:
27+
- name: Checkout code
28+
uses: actions/checkout@v2
29+
30+
- name: Set output
31+
id: vars
32+
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
33+
34+
- uses: actions-rs/toolchain@v1
35+
with:
36+
toolchain: stable
37+
38+
- name: Install cross
39+
run: cargo install cross
40+
41+
- name: Compile
42+
run: cross build --release --locked --target=${{ matrix.target }}
43+
44+
- name: Hash
45+
run: cp target/${{ matrix.target }}/release/${{ matrix.binary }} bin/${{ matrix.binary }} && sha256sum bin/${{ matrix.binary }} | tee bin/languageclient.sha256
46+
47+
- name: Upload binary to release
48+
uses: svenstaro/upload-release-action@v2
49+
with:
50+
repo_token: ${{ secrets.GITHUB_TOKEN }}
51+
file: target/${{ matrix.target }}/release/${{ matrix.binary }}
52+
asset_name: ${{ matrix.asset_name }}
53+
tag: ${{ github.ref }}
54+
55+
- name: Upload sha to release
56+
uses: svenstaro/upload-release-action@v2
57+
with:
58+
repo_token: ${{ secrets.GITHUB_TOKEN }}
59+
file: bin/languageclient.sha256
60+
asset_name: ${{ matrix.asset_name }}.sha256
61+
tag: ${{ github.ref }}
62+
63+
build-mac:
64+
name: Build mac
65+
runs-on: macos-latest
66+
steps:
67+
- name: Checkout code
68+
uses: actions/checkout@v2
69+
70+
- uses: actions-rs/toolchain@v1
71+
with:
72+
toolchain: stable
73+
74+
- name: Compile
75+
run: cargo build --release --locked
76+
77+
- name: Hash
78+
run: cp target/release/languageclient bin/languageclient && openssl sha256 bin/languageclient | awk '{print $2 " bin/languageclient"}' > bin/languageclient.sha256
79+
80+
- name: Upload binary to release
81+
uses: svenstaro/upload-release-action@v2
82+
with:
83+
repo_token: ${{ secrets.GITHUB_TOKEN }}
84+
file: target/release/languageclient
85+
asset_name: languageclient-${{ github.event.release.tag_name }}-x86_64-apple-darwin
86+
tag: ${{ github.ref }}
87+
88+
- name: Upload sha to release
89+
uses: svenstaro/upload-release-action@v2
90+
with:
91+
repo_token: ${{ secrets.GITHUB_TOKEN }}
92+
file: bin/languageclient.sha256
93+
asset_name: languageclient-${{ github.event.release.tag_name }}-x86_64-apple-darwin.sha256
94+
tag: ${{ github.ref }}

.travis.yml

Lines changed: 0 additions & 56 deletions
This file was deleted.

Makefile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,6 @@ integration-test-docker:
5454
integration-test-docker-debug:
5555
docker run --interactive --tty --volume ${CURDIR}:/root/.config/nvim autozimu/languageclientneovim
5656

57-
cleanup-binary-tags:
58-
ci/cleanup-binary-tags.py
59-
6057
clean:
6158
cargo clean
6259
rm -rf bin/languageclient

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
# LanguageClient-neovim
44

5-
[![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)
5+
[![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)
66

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

ci/Dockerfile

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)