Skip to content

Commit

Permalink
feat: make ci more modern (#131)
Browse files Browse the repository at this point in the history
  • Loading branch information
Conni2461 authored Jul 2, 2024
1 parent 935bedf commit cf48d4d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 41 deletions.
48 changes: 11 additions & 37 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,10 @@ jobs:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
compiler: gcc
- os: ubuntu-latest
compiler: clang
- os: macos-latest
compiler: gcc
- os: macos-latest
compiler: clang
os: [ubuntu-22.04, macos-12]
compiler: [gcc, clang]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Prepare
env:
CC: ${{ matrix.compiler }}
Expand All @@ -43,52 +36,33 @@ jobs:
name: windows
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: lukka/get-cmake@latest
- name: Build
run: |
cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release
cmake --install build --prefix build
nvim-tests:
name: nvim-tests
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
rev: nightly/nvim-linux64.tar.gz
- os: ubuntu-latest
rev: v0.9.0/nvim-linux64.tar.gz
- os: macos-latest
rev: nightly/nvim-macos.tar.gz
- os: macos-latest
rev: v0.9.0/nvim-macos.tar.gz
os: [ubuntu-22.04, macos-12]
rev: [nightly, v0.9.5, v0.10.0]
steps:
- uses: actions/checkout@v3
- run: date +%F > todays-date
- name: Restore from todays cache
uses: actions/cache@v3
- uses: actions/checkout@v4
- uses: rhysd/action-setup-vim@v1
with:
path: _neovim
key: ${{ runner.os }}-${{ matrix.rev }}-${{ hashFiles('todays-date') }}

neovim: true
version: ${{ matrix.rev }}
- name: Prepare
run: |
test -d _neovim || {
mkdir -p _neovim
curl -sL "https://github.com/neovim/neovim/releases/download/${{ matrix.rev }}" | tar xzf - --strip-components=1 -C "${PWD}/_neovim"
}
mkdir -p ~/.local/share/nvim/site/pack/vendor/start
git clone --depth 1 https://github.com/nvim-lua/plenary.nvim ~/.local/share/nvim/site/pack/vendor/start/plenary.nvim
ln -s $(pwd) ~/.local/share/nvim/site/pack/vendor/start
git clone --depth 1 https://github.com/nvim-lua/plenary.nvim ../plenary.nvim
- name: Build
run: make
- name: Tests
run: |
export PATH="${PWD}/_neovim/bin:${PATH}"
export VIM="${PWD}/_neovim/share/nvim/runtime"
nvim --version
make ntest
8 changes: 4 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Prepare
run: |
Expand All @@ -22,7 +22,7 @@ jobs:
name: clangformat
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Prepare clang-format
run: |
sudo apt-get update
Expand All @@ -34,8 +34,8 @@ jobs:
name: stylua
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: JohnnyMorganz/stylua-action@v3
- uses: actions/checkout@v4
- uses: JohnnyMorganz/stylua-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
version: latest
Expand Down

0 comments on commit cf48d4d

Please sign in to comment.