-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
2 changed files
with
43 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/bin/bash | ||
|
||
set -xeu | ||
|
||
ci_dir="$(dirname "$0")" | ||
|
||
if [[ "$OSTYPE" == "linux-gnu"* ]]; then | ||
os_family="Linux" | ||
elif [[ "$OSTYPE" == "darwin"* ]]; then | ||
os_family="macOS" | ||
elif [[ "$OSTYPE" == "cygwin" || "$OSTYPE" == "msys" || "$OSTYPE" == "win32" ]]; then | ||
os_family="Windows" | ||
elif [[ "$OSTYPE" == "freebsd"* ]]; then | ||
exit "FreeBSD is not supported" | ||
else | ||
exit "Unknown OS: $OSTYPE" | ||
fi | ||
|
||
if [[ "$os_family" == "Linux" ]]; then | ||
# free up disk space in Github Actions image: https://github.com/actions/runner-images/issues/2840 | ||
sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/share/boost | ||
if [[ "${VCPKG_VERSION:-}" != "" ]]; then # vcpkg build | ||
"$ci_dir/install-ubuntu-vcpkg.sh" | ||
else | ||
"$ci_dir/install-ubuntu.sh" | ||
fi | ||
elif [[ "$os_family" == "macOS" ]]; then | ||
if [[ "${BREW_OPENCV_VERSION:-}" != "" ]]; then # brew build | ||
"$ci_dir/install-macos-brew.sh" | ||
elif [[ "${VCPKG_VERSION:-}" != "" ]]; then # vcpkg build | ||
"$ci_dir/install-macos-vcpkg.sh" | ||
else | ||
"$ci_dir/install-macos-framework.sh" | ||
fi | ||
elif [[ "$os_family" == "Windows" ]]; then | ||
export CHOCO_LLVM_VERSION=18.1.8 | ||
if [[ "${VCPKG_VERSION:-}" != "" ]]; then # vcpkg build | ||
"$ci_dir/install-windows-vcpkg.sh" | ||
else # chocolatey build | ||
"$ci_dir/install-windows-chocolatey.sh" | ||
fi | ||
fi |