File tree Expand file tree Collapse file tree 3 files changed +45
-1
lines changed
Expand file tree Collapse file tree 3 files changed +45
-1
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/sh -eu
2+
3+ dir=$( dirname " $0 " )
4+ # shellcheck source=/dev/null
5+ . " $dir /common.sh" # for get_build_deps_excl
6+
7+ # build dir that will be restored from cache
8+ cache_dir=/var/tmp/glfw
9+
10+ # install the deps - runs always (regardless the cache)
11+ deps () {
12+ sudo apt build-dep libglfw3
13+ }
14+
15+ # build SDL, SDL_ttf and fluidsynth and also install them
16+ build_install () {
17+ mkdir -p $cache_dir
18+ cd $cache_dir
19+
20+ git clone --depth 1 https://github.com/glfw/glfw.git
21+ cmake -S glfw -B glfw/build \
22+ -DGLFW_BUILD_WAYLAND=ON -DGLFW_BUILD_X11=ON
23+ cmake --build glfw/build -j " $( nproc) "
24+ sudo cmake --install glfw/build
25+ }
26+
27+ # if cache is successfully restored, just install the builds
28+ install_cached () {
29+ cd $cache_dir
30+ sudo cmake --install glfw/build
31+ }
32+
33+ deps
34+ if [ -d $cache_dir ]; then
35+ install_cached
36+ else
37+ build_install
38+ fi
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ sudo apt install appstream `# appstreamcli for mkappimage AppStream validation`
2525 asciidoc
2626sudo apt install fonts-dejavu-core
2727sudo apt --no-install-recommends install nvidia-cuda-toolkit
28- sudo apt install libglew-dev libglfw3-dev
28+ sudo apt install libglew-dev
2929sudo apt install libglm-dev
3030sudo apt install imagemagick libmagickwand-dev
3131sudo apt install libsoxr-dev libspeexdsp-dev
@@ -52,4 +52,5 @@ qt6.conf" "/usr/lib/$(uname -m)-linux-gnu/qt-default/qtchooser/default.conf"
5252
5353" $dir " /install_sdl.sh
5454" $dir " /install_ffmpeg.sh
55+ " $dir " /install_glfw.sh
5556
Original file line number Diff line number Diff line change 8585 with :
8686 path : ' /var/tmp/sdl'
8787 key : cache-sdl-${{ runner.os }}-${{ hashFiles( '.github/scripts/Linux/install_sdl.sh' ) }}
88+ - name : Cache GLFW
89+ uses : actions/cache@main
90+ with :
91+ path : ' /var/tmp/glfw'
92+ key : cache-sdl-${{ runner.os }}-${{ hashFiles( '.github/scripts/Linux/install_glfw.sh' ) }}
8893 - name : bootstrap
8994 run : |
9095 . .github/scripts/environment.sh
You can’t perform that action at this time.
0 commit comments