-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmisc_lib
More file actions
executable file
·45 lines (43 loc) · 2.12 KB
/
misc_lib
File metadata and controls
executable file
·45 lines (43 loc) · 2.12 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/usr/bin/env bash
# This script installs miscellaneous libraries for GitHub Actions on ***hosted runners***.
#
# Usage: bash mist_setup
# Exit if the script is not executed during a GitHub Actions workflow on a GitHub-hosted runner.
# For GITHUB_ACTIONS and RUNNER_ENVIRONMENT variables, see:
# https://docs.github.com/en/actions/reference/workflows-and-actions/variables
if [[ "$GITHUB_ACTIONS" != "true" || "$RUNNER_ENVIRONMENT" != "github-hosted" ]]; then
printf "\nThis is not a GitHub Actions workflow on a GitHub-hosted runner. Nothing will be done.\n"
exit 0
fi
if [[ "$RUNNER_OS" == "Linux" ]] ; then
sudo apt update || true
sudo apt install -y gdb make cmake ninja-build execstack
gdb --version
make --version
cmake --version
ninja --version
execstack --version
# Zaikun 20250728: The following line re-installs necessary packages removed by the `large-packages`
# section of [email protected]. This is why the script should be called AFTER free-disk-space.
# 1. Without x11-xkb-utils, MATLAB R2025a when running `plot` crashes with an internal error:
# "Assertion: This application failed to start because no Qt platform plugin could be initialized".
# 2. Without libgl1, MATLAB R2025a gets stuck when executing `saveas`.
# See https://github.com/zequipe/test_matlab/blob/master/.github/workflows/dependencies.yml
# and https://github.com/matlab-actions/setup-matlab/issues/154 for more details.
sudo apt install -y x11-xkb-utils libgl1
dpkg -l x11-xkb-utils libgl1
elif [[ "$RUNNER_OS" == "macOS" ]] ; then
brew update || true
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 upgrade chocolatey -y --no-progress || true
choco install wget make cmake ninja -y --no-progress # gdb cannot be installed by choco
make --version
cmake --version
ninja --version
fi