Ci #37
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "CI" | |
on: | |
push: | |
branches: | |
- main | |
pull_request: {} | |
jobs: | |
check_and_test: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Neovim v0.10.4 | |
uses: rhysd/action-setup-vim@v1 | |
with: | |
neovim: true | |
version: v0.10.2 | |
- name: Install libluajit (Linux) | |
if: runner.os == 'Linux' | |
run: sudo apt-get update && sudo apt-get install -y libluajit-5.1-dev | |
- name: Install libluajit (macOS) | |
if: runner.os == 'macOS' | |
run: brew install luajit | |
- name: Install toolchain | |
uses: dtolnay/rust-toolchain@stable | |
- name: cargo fmt | |
working-directory: ./lua/nvim_winpick | |
run: cargo fmt --all --check | |
- name: cargo clippy | |
working-directory: ./lua/nvim_winpick | |
run: cargo clippy -- -D warnings | |
- name: cargo test --workspace | |
working-directory: ./lua/nvim_winpick | |
run: cargo test | |
publish_prebuilt: | |
strategy: | |
matrix: | |
platform: [ | |
{ runner: ubuntu-20.04, target: x86_64-unknown-linux-gnu, output: libnvim_winpick.so, dest: nvim_winpick.so }, | |
{ runner: ubuntu-22.04-arm, target: aarch64-unknown-linux-gnu, output: libnvim_winpick.so, dest: nvim_winpick.so }, | |
{ runner: macos-latest, target: aarch64-apple-darwin, output: libnvim_winpick.dylib, dest: nvim_winpick.so } ] | |
runs-on: ${{ matrix.platform.runner }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install toolchain | |
uses: dtolnay/rust-toolchain@stable | |
- name: build ${{ matrix.platform.target }} | |
run: bash ${GITHUB_WORKSPACE}/.github/publish-prebuilt.sh ${{ matrix.platform.target }} ${{ matrix.platform.output }} ${{ matrix.platform.dest }} ${{ runner.temp }} | |