mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-20 06:10:06 +02:00
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
23 lines
427 B
Bash
Executable File
23 lines
427 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
((${BASH_VERSION%%.*} >= 4)) || { echo >&2 "$0: Error: Please upgrade Bash."; exit 1; }
|
|
|
|
set -euxo pipefail
|
|
|
|
if [[ "${OSTYPE}" == msys* ]]; then # Windows
|
|
|
|
cpus="${NUMBER_OF_PROCESSORS}"
|
|
|
|
elif [[ "${OSTYPE}" == darwin* ]]; then # macOS
|
|
|
|
cpus="$(sysctl -n hw.ncpu)"
|
|
|
|
else # Linux & others
|
|
|
|
cpus="$(nproc)"
|
|
|
|
fi
|
|
|
|
# Build Audacity
|
|
cmake --build build -j "${cpus}" --config "${AUDACITY_BUILD_TYPE}"
|