-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmisc_app
executable file
·30 lines (28 loc) · 1.11 KB
/
misc_app
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env bash
# This script installs miscellaneous applications for GitHub Actions on ***hosted runners***.
# Usage: bash mist_setup
# Exist if the runner is not hosted. Is there a better way to decide the runner type?
if [[ ("$RUNNER_OS" == "Linux" && ! -d /home/runner/work/) || ("$RUNNER_OS" == "macOS" && ! -d /Users/runner/work/) ]] ; then
printf "\nThe runner is not hosted by GitHub.\n"
exit 0
fi
if [[ "$RUNNER_OS" == "Linux" ]] ; then
sudo apt update
sudo apt install gdb make cmake ninja-build
gdb --version
make --version
cmake --version
ninja --version
elif [[ "$RUNNER_OS" == "macOS" ]] ; then
brew install coreutils make cmake ninja
make --version
cmake --version
ninja --version
# gdb cannot be installed by brew on macOS 14 with Apple Silicon chips as of 20240219
(brew install gdb &> /dev/null && gbd --version) || echo "!!! WARNING: gdb cannot be installed !!!"
elif [[ "$RUNNER_OS" == "Windows" ]] ; then
choco install wget make cmake ninja --no-progress # gdb cannot be installed by choco
make --version
cmake --version
ninja --version
fi