diff options
| -rw-r--r-- | .github/workflows/test-queries.yml | 6 | ||||
| -rw-r--r-- | .github/workflows/tests.yml | 2 | ||||
| -rw-r--r-- | .github/workflows/update-lockfile.yml | 2 | ||||
| -rw-r--r-- | .github/workflows/update-readme.yml | 2 | ||||
| -rwxr-xr-x | scripts/ci-install-macos-14.sh | 7 | ||||
| -rwxr-xr-x | scripts/ci-install-ubuntu-latest.sh | 8 | ||||
| -rwxr-xr-x | scripts/ci-install-windows-2022.sh | 7 | ||||
| -rwxr-xr-x | scripts/ci-install.sh | 25 |
8 files changed, 31 insertions, 28 deletions
diff --git a/.github/workflows/test-queries.yml b/.github/workflows/test-queries.yml index 0d713c836..e1606f2fc 100644 --- a/.github/workflows/test-queries.yml +++ b/.github/workflows/test-queries.yml @@ -51,8 +51,8 @@ jobs: runs-on: ${{ matrix.os }} env: CC: ${{ matrix.cc }} - NVIM: ${{ runner.os == 'Windows' && 'nvim-win64\\bin\\nvim.exe' || 'nvim' }} - ALLOWED_INSTALLATION_FAILURES: ${{ runner.os == 'Windows' && 'rnoweb' }} + NVIM: ${{ matrix.os == 'windows-latest' && 'nvim-win64\\bin\\nvim.exe' || 'nvim' }} + ALLOWED_INSTALLATION_FAILURES: ${{ matrix.os == 'windows-latest' && 'rnoweb' }} steps: - uses: actions/checkout@v4 - uses: ilammy/msvc-dev-cmd@v1 @@ -65,7 +65,7 @@ jobs: env: NVIM_TAG: ${{ matrix.nvim_tag }} run: | - bash ./scripts/ci-install-${{ matrix.os }}.sh + bash ./scripts/ci-install.sh - name: Setup Parsers Cache id: parsers-cache diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8c4043417..b3858b5de 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -44,7 +44,7 @@ jobs: env: NVIM_TAG: stable run: | - bash ./scripts/ci-install-${{ matrix.os }}.sh + bash ./scripts/ci-install.sh - name: Setup Parsers Cache id: parsers-cache diff --git a/.github/workflows/update-lockfile.yml b/.github/workflows/update-lockfile.yml index efcea9ee6..b163a3232 100644 --- a/.github/workflows/update-lockfile.yml +++ b/.github/workflows/update-lockfile.yml @@ -27,7 +27,7 @@ jobs: wget https://github.com/josephburnett/jd/releases/download/v1.7.1/jd-amd64-linux mv jd-amd64-linux /tmp/jd chmod +x /tmp/jd - bash scripts/ci-install-ubuntu-latest.sh + bash scripts/ci-install.sh - name: Update parsers env: diff --git a/.github/workflows/update-readme.yml b/.github/workflows/update-readme.yml index d8954e462..e68b43d50 100644 --- a/.github/workflows/update-readme.yml +++ b/.github/workflows/update-readme.yml @@ -23,7 +23,7 @@ jobs: env: NVIM_TAG: stable run: | - bash ./scripts/ci-install-ubuntu-latest.sh + bash ./scripts/ci-install.sh - name: Check README run: | diff --git a/scripts/ci-install-macos-14.sh b/scripts/ci-install-macos-14.sh deleted file mode 100755 index 06bce74f7..000000000 --- a/scripts/ci-install-macos-14.sh +++ /dev/null @@ -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 diff --git a/scripts/ci-install-ubuntu-latest.sh b/scripts/ci-install-ubuntu-latest.sh deleted file mode 100755 index 60f260cc8..000000000 --- a/scripts/ci-install-ubuntu-latest.sh +++ /dev/null @@ -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 diff --git a/scripts/ci-install-windows-2022.sh b/scripts/ci-install-windows-2022.sh deleted file mode 100755 index 8d27ecc53..000000000 --- a/scripts/ci-install-windows-2022.sh +++ /dev/null @@ -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 diff --git a/scripts/ci-install.sh b/scripts/ci-install.sh new file mode 100755 index 000000000..4f4265465 --- /dev/null +++ b/scripts/ci-install.sh @@ -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 |
