mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-16 10:20:11 -04:00
ci: fix invalid workflow
Context variables aren't always available, so we can't rely on them for e.g. environment variables. Also merge all install scripts into `script/ci-install.sh`, that way it can be called the same way regardless of system.
This commit is contained in:
parent
143a342bd8
commit
6444286cbf
8 changed files with 31 additions and 28 deletions
6
.github/workflows/test-queries.yml
vendored
6
.github/workflows/test-queries.yml
vendored
|
|
@ -51,8 +51,8 @@ jobs:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
env:
|
env:
|
||||||
CC: ${{ matrix.cc }}
|
CC: ${{ matrix.cc }}
|
||||||
NVIM: ${{ runner.os == 'Windows' && 'nvim-win64\\bin\\nvim.exe' || 'nvim' }}
|
NVIM: ${{ matrix.os == 'windows-latest' && 'nvim-win64\\bin\\nvim.exe' || 'nvim' }}
|
||||||
ALLOWED_INSTALLATION_FAILURES: ${{ runner.os == 'Windows' && 'rnoweb' }}
|
ALLOWED_INSTALLATION_FAILURES: ${{ matrix.os == 'windows-latest' && 'rnoweb' }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: ilammy/msvc-dev-cmd@v1
|
- uses: ilammy/msvc-dev-cmd@v1
|
||||||
|
|
@ -65,7 +65,7 @@ jobs:
|
||||||
env:
|
env:
|
||||||
NVIM_TAG: ${{ matrix.nvim_tag }}
|
NVIM_TAG: ${{ matrix.nvim_tag }}
|
||||||
run: |
|
run: |
|
||||||
bash ./scripts/ci-install-${{ matrix.os }}.sh
|
bash ./scripts/ci-install.sh
|
||||||
|
|
||||||
- name: Setup Parsers Cache
|
- name: Setup Parsers Cache
|
||||||
id: parsers-cache
|
id: parsers-cache
|
||||||
|
|
|
||||||
2
.github/workflows/tests.yml
vendored
2
.github/workflows/tests.yml
vendored
|
|
@ -44,7 +44,7 @@ jobs:
|
||||||
env:
|
env:
|
||||||
NVIM_TAG: stable
|
NVIM_TAG: stable
|
||||||
run: |
|
run: |
|
||||||
bash ./scripts/ci-install-${{ matrix.os }}.sh
|
bash ./scripts/ci-install.sh
|
||||||
|
|
||||||
- name: Setup Parsers Cache
|
- name: Setup Parsers Cache
|
||||||
id: parsers-cache
|
id: parsers-cache
|
||||||
|
|
|
||||||
2
.github/workflows/update-lockfile.yml
vendored
2
.github/workflows/update-lockfile.yml
vendored
|
|
@ -27,7 +27,7 @@ jobs:
|
||||||
wget https://github.com/josephburnett/jd/releases/download/v1.7.1/jd-amd64-linux
|
wget https://github.com/josephburnett/jd/releases/download/v1.7.1/jd-amd64-linux
|
||||||
mv jd-amd64-linux /tmp/jd
|
mv jd-amd64-linux /tmp/jd
|
||||||
chmod +x /tmp/jd
|
chmod +x /tmp/jd
|
||||||
bash scripts/ci-install-ubuntu-latest.sh
|
bash scripts/ci-install.sh
|
||||||
|
|
||||||
- name: Update parsers
|
- name: Update parsers
|
||||||
env:
|
env:
|
||||||
|
|
|
||||||
2
.github/workflows/update-readme.yml
vendored
2
.github/workflows/update-readme.yml
vendored
|
|
@ -23,7 +23,7 @@ jobs:
|
||||||
env:
|
env:
|
||||||
NVIM_TAG: stable
|
NVIM_TAG: stable
|
||||||
run: |
|
run: |
|
||||||
bash ./scripts/ci-install-ubuntu-latest.sh
|
bash ./scripts/ci-install.sh
|
||||||
|
|
||||||
- name: Check README
|
- name: Check README
|
||||||
run: |
|
run: |
|
||||||
|
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
curl -L https://github.com/neovim/neovim/releases/download/${NVIM_TAG}/nvim-macos.tar.gz | tar -xz
|
|
||||||
sudo ln -s "$PWD"/nvim-macos/bin/nvim /usr/local/bin
|
|
||||||
rm -rf "$PWD"/nvim-macos/lib/nvim/parser
|
|
||||||
mkdir -p ~/.local/share/nvim/site/pack/nvim-treesitter/start
|
|
||||||
ln -s "$PWD" ~/.local/share/nvim/site/pack/nvim-treesitter/start
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
wget https://github.com/neovim/neovim/releases/download/${NVIM_TAG}/nvim-linux64.tar.gz
|
|
||||||
tar -zxf nvim-linux64.tar.gz
|
|
||||||
sudo ln -s "$PWD"/nvim-linux64/bin/nvim /usr/local/bin
|
|
||||||
rm -rf "$PWD"/nvim-linux64/lib/nvim/parser
|
|
||||||
mkdir -p ~/.local/share/nvim/site/pack/nvim-treesitter/start
|
|
||||||
ln -s "$PWD" ~/.local/share/nvim/site/pack/nvim-treesitter/start
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
curl -L https://github.com/neovim/neovim/releases/download/${NVIM_TAG}/nvim-win64.zip -o nvim-win64.zip
|
|
||||||
unzip nvim-win64
|
|
||||||
mkdir -p ~/AppData/Local/nvim/pack/nvim-treesitter/start
|
|
||||||
mkdir -p ~/AppData/Local/nvim-data
|
|
||||||
cp -r "$PWD" ~/AppData/Local/nvim/pack/nvim-treesitter/start
|
|
||||||
25
scripts/ci-install.sh
Executable file
25
scripts/ci-install.sh
Executable file
|
|
@ -0,0 +1,25 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
os=$(uname -s)
|
||||||
|
if [[ $os == Linux ]]; then
|
||||||
|
wget https://github.com/neovim/neovim/releases/download/${NVIM_TAG}/nvim-linux64.tar.gz
|
||||||
|
tar -zxf nvim-linux64.tar.gz
|
||||||
|
sudo ln -s "$PWD"/nvim-linux64/bin/nvim /usr/local/bin
|
||||||
|
rm -rf "$PWD"/nvim-linux64/lib/nvim/parser
|
||||||
|
mkdir -p ~/.local/share/nvim/site/pack/nvim-treesitter/start
|
||||||
|
ln -s "$PWD" ~/.local/share/nvim/site/pack/nvim-treesitter/start
|
||||||
|
elif [[ $os == Darwin ]]; then
|
||||||
|
curl -L https://github.com/neovim/neovim/releases/download/${NVIM_TAG}/nvim-macos.tar.gz | tar -xz
|
||||||
|
sudo ln -s "$PWD"/nvim-macos/bin/nvim /usr/local/bin
|
||||||
|
rm -rf "$PWD"/nvim-macos/lib/nvim/parser
|
||||||
|
mkdir -p ~/.local/share/nvim/site/pack/nvim-treesitter/start
|
||||||
|
ln -s "$PWD" ~/.local/share/nvim/site/pack/nvim-treesitter/start
|
||||||
|
else
|
||||||
|
curl -L https://github.com/neovim/neovim/releases/download/${NVIM_TAG}/nvim-win64.zip -o nvim-win64.zip
|
||||||
|
unzip nvim-win64
|
||||||
|
mkdir -p ~/AppData/Local/nvim/pack/nvim-treesitter/start
|
||||||
|
mkdir -p ~/AppData/Local/nvim-data
|
||||||
|
cp -r "$PWD" ~/AppData/Local/nvim/pack/nvim-treesitter/start
|
||||||
|
fi
|
||||||
Loading…
Add table
Add a link
Reference in a new issue