mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
ci: make install_deps.sh more flexible
This will allow us to use it in containers as well as specify whether we want to install test dependencies.
This commit is contained in:
parent
13a24b905e
commit
933fdff466
27
.github/scripts/install_deps.sh
vendored
27
.github/scripts/install_deps.sh
vendored
@ -1,10 +1,31 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
SUDO="sudo"
|
||||||
|
|
||||||
|
while (($# > 0)); do
|
||||||
|
case $1 in
|
||||||
|
--test) # install test dependencies
|
||||||
|
TEST=1
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
--container) # don't use sudo
|
||||||
|
SUDO=""
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
os=$(uname -s)
|
os=$(uname -s)
|
||||||
if [[ $os == Linux ]]; then
|
if [[ $os == Linux ]]; then
|
||||||
sudo apt-get update
|
$SUDO apt-get update
|
||||||
sudo apt-get install -y build-essential cmake curl gettext locales-all ninja-build pkg-config unzip "$@"
|
$SUDO apt-get install -y build-essential cmake curl gettext ninja-build pkg-config unzip
|
||||||
|
if [[ -n $TEST ]]; then
|
||||||
|
$SUDO apt-get install -y locales-all cpanminus
|
||||||
|
fi
|
||||||
elif [[ $os == Darwin ]]; then
|
elif [[ $os == Darwin ]]; then
|
||||||
brew update --quiet
|
brew update --quiet
|
||||||
brew install ninja "$@"
|
brew install ninja
|
||||||
|
if [[ -n $TEST ]]; then
|
||||||
|
brew install cpanminus
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
5
.github/workflows/release.yml
vendored
5
.github/workflows/release.yml
vendored
@ -39,10 +39,7 @@ jobs:
|
|||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Install dependencies
|
- run: ./.github/scripts/install_deps.sh --container
|
||||||
run: |
|
|
||||||
apt-get update
|
|
||||||
apt-get install -y build-essential cmake gettext ninja-build unzip
|
|
||||||
- if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name != 'nightly')
|
- if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name != 'nightly')
|
||||||
run: |
|
run: |
|
||||||
echo 'NVIM_BUILD_TYPE=Release' >> $GITHUB_ENV
|
echo 'NVIM_BUILD_TYPE=Release' >> $GITHUB_ENV
|
||||||
|
4
.github/workflows/test.yml
vendored
4
.github/workflows/test.yml
vendored
@ -41,7 +41,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
./.github/scripts/install_deps.sh lua-check
|
./.github/scripts/install_deps.sh
|
||||||
brew install stylua uncrustify
|
brew install stylua uncrustify
|
||||||
|
|
||||||
- uses: ./.github/actions/cache
|
- uses: ./.github/actions/cache
|
||||||
@ -141,7 +141,7 @@ jobs:
|
|||||||
run: mkdir -p "$LOG_DIR"
|
run: mkdir -p "$LOG_DIR"
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: ./.github/scripts/install_deps.sh cpanminus
|
run: ./.github/scripts/install_deps.sh --test
|
||||||
|
|
||||||
- name: Setup interpreter packages
|
- name: Setup interpreter packages
|
||||||
run: |
|
run: |
|
||||||
|
Loading…
Reference in New Issue
Block a user