mirror of
https://github.com/cookiengineer/audacity
synced 2026-01-23 17:25:54 +01:00
Move GitHub Actions CI scripts into separate files
Break the workflow into smaller stages (Configure, Build, Install, Package, etc.) so that you can see exactly which stage failed in the GitHub Actions run log. Create a separate Bash CI script for each job stage (configure.sh, build.sh, install.sh, package.sh, etc.) to reduce the size of the main YAML workflow file and enable Bash syntax highlighting. Close #917
This commit is contained in:
committed by
Dmitry Vedenko
parent
3ebebbb360
commit
4b5c95d7fe
49
scripts/ci/dependencies.sh
Executable file
49
scripts/ci/dependencies.sh
Executable file
@@ -0,0 +1,49 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
((${BASH_VERSION%%.*} >= 4)) || echo >&2 "$0: Warning: Using ancient Bash version ${BASH_VERSION}."
|
||||
|
||||
set -euxo pipefail
|
||||
|
||||
if [[ "${OSTYPE}" == msys* ]]; then # Windows
|
||||
|
||||
# Python packages
|
||||
pip_packages=(
|
||||
conan
|
||||
)
|
||||
pip3 install "${pip_packages[@]}"
|
||||
|
||||
elif [[ "${OSTYPE}" == darwin* ]]; then # macOS
|
||||
|
||||
# Homebrew packages
|
||||
brew_packages=(
|
||||
bash # macOS ships with Bash v3 for licensing reasons so upgrade it now
|
||||
conan
|
||||
)
|
||||
brew install "${brew_packages[@]}"
|
||||
|
||||
else # Linux & others
|
||||
|
||||
# Distribution packages
|
||||
if which apt-get; then
|
||||
apt_packages=(
|
||||
libasound2-dev
|
||||
libgtk2.0-dev
|
||||
gettext
|
||||
python3-pip
|
||||
)
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install -y --no-install-recommends "${apt_packages[@]}"
|
||||
sudo apt-get remove -y ccache
|
||||
else
|
||||
echo >&2 "$0: Error: You don't have a recognized package manager installed."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Python packages
|
||||
pip_packages=(
|
||||
conan
|
||||
)
|
||||
pip3 install wheel setuptools # need these first to install other packages (e.g. conan)
|
||||
pip3 install "${pip_packages[@]}"
|
||||
|
||||
fi
|
||||
Reference in New Issue
Block a user