Add volume slider configuration #674
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
name: 🏁 Windows Builds | |
on: | |
push: | |
branches: | |
- 'main' | |
pull_request: | |
jobs: | |
build-windows: | |
runs-on: "ubuntu-20.04" | |
name: Build | |
strategy: | |
matrix: | |
include: | |
- name: 32 Bits | |
arch: x86_32 | |
bin: godot.windows.template_release.x86_32.exe | |
template: godot_32.exe | |
videodecoder: windows_32 | |
- name: 64 Bits | |
arch: x86_64 | |
bin: godot.windows.template_release.x86_64.exe | |
template: godot_64.exe | |
videodecoder: windows_64 | |
steps: | |
- name: "Checkout RetroHub" | |
uses: actions/checkout@v3 | |
with: | |
path: "retrohub" | |
- name: "Load cached objects (Godot editor)" | |
uses: actions/cache@v3 | |
id: "cache_editor" | |
with: | |
path: cached_builds/editor/godot | |
key: editor-build | |
continue-on-error: true | |
- name: "Load cached objects (Godot templates)" | |
uses: actions/cache@v3 | |
id: "cache_template" | |
with: | |
path: cached_builds/template/${{ matrix.template }} | |
key: Windows-${{ matrix.arch }}-template-build | |
continue-on-error: true | |
- name: "Load cached objects (Videodecoder)" | |
uses: actions/cache@v3 | |
id: "cache_videodecoder" | |
with: | |
path: cached_builds/videodecoder/${{ matrix.videodecoder }} | |
key: Windows-${{ matrix.arch }}-videodecoder-build | |
continue-on-error: true | |
- name: "Checkout Custom Godot" | |
if: steps.cache_template.outputs.cache-hit != 'true' | |
uses: actions/checkout@v3 | |
with: | |
repository: retrohub-org/godot | |
ref: retrohub_patches_4x | |
path: "godot" | |
- name: "Checkout godot-videodecoder" | |
if: steps.cache_videodecoder.outputs.cache-hit != 'true' | |
uses: actions/checkout@v3 | |
with: | |
repository: retrohub-org/godot-videodecoder | |
submodules: recursive | |
path: "videodecoder" | |
- name: "[Videodecoder] Compilation" | |
if: steps.cache_videodecoder.outputs.cache-hit != 'true' | |
working-directory: ./videodecoder | |
env: | |
PLATFORMS: ${{ matrix.videodecoder }} | |
run: | | |
./build_gdextension.sh | |
mkdir -p -v ../cached_builds/videodecoder | |
cp -r -v target/* ../cached_builds/videodecoder | |
- name: "[Godot] Dependencies" | |
if: steps.cache_template.outputs.cache-hit != 'true' | |
working-directory: ./godot | |
shell: bash | |
run: | | |
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list | |
sudo add-apt-repository ppa:kisak/kisak-mesa | |
sudo apt-get install -qq mesa-vulkan-drivers | |
sudo dpkg --add-architecture i386 | |
sudo apt-get update | |
# The actual dependencies | |
sudo apt-get install build-essential gcc-multilib g++-multilib pkg-config libc6-dev-i386 libx11-dev libx11-dev:i386 \ | |
libxcursor-dev libxcursor-dev:i386 libxinerama-dev libxinerama-dev:i386 libx11-dev:i386 libgl1-mesa-dev \ | |
libgl1-mesa-dev:i386 libglu-dev libasound2-dev libpulse-dev libdbus-1-dev libudev-dev libxi-dev \ | |
libxi-dev:i386 libxrandr-dev libxrandr-dev:i386 yasm xvfb wget unzip mingw-w64 | |
sudo update-alternatives --set i686-w64-mingw32-gcc /usr/bin/i686-w64-mingw32-gcc-posix | |
sudo update-alternatives --set i686-w64-mingw32-g++ /usr/bin/i686-w64-mingw32-g++-posix | |
sudo update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix | |
sudo update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix | |
- name: "[Godot] Setup Godot build cache" | |
if: steps.cache_template.outputs.cache-hit != 'true' | |
uses: ./godot/.github/actions/godot-cache | |
with: | |
cache-name: windows-template | |
continue-on-error: true | |
- name: "[Godot] Setup python and scons" | |
if: steps.cache_template.outputs.cache-hit != 'true' | |
uses: ./godot/.github/actions/godot-deps | |
- name: "[Godot] Compilation [template]" | |
if: steps.cache_template.outputs.cache-hit != 'true' | |
uses: ./godot/.github/actions/godot-build | |
with: | |
root: ./godot | |
sconsflags: verbose=yes warnings=all werror=yes use_lto=yes optimize=size arch=${{ matrix.arch }} | |
platform: windows | |
target: template_release | |
tools: false | |
- name: "[Godot] Clean and cache template build" | |
if: steps.cache_template.outputs.cache-hit != 'true' | |
run: | | |
strip godot/bin/* | |
mkdir -p -v cached_builds/template | |
[[ -e godot/bin/${{ matrix.bin }} ]] && mv godot/bin/${{ matrix.bin }} cached_builds/template/${{ matrix.template }} | |
- name: "[Godot] Download editor" | |
if: steps.cache_editor.outputs.cache-hit != 'true' | |
run: | | |
wget https://downloads.tuxfamily.org/godotengine/4.1/Godot_v4.1-stable_linux.x86_64.zip | |
unzip Godot_v4.1-stable_linux.x86_64.zip | |
mkdir -p -v cached_builds/editor | |
mv Godot_v4.1-stable_linux.x86_64 cached_builds/editor/godot | |
- name: "Setup templates and libraries" | |
env: | |
TEMPLATE_PATH: /home/runner/.local/share/godot/export_templates/4.1.stable | |
run: | | |
mkdir -p -v $TEMPLATE_PATH | |
cp cached_builds/template/${{ matrix.template }} $TEMPLATE_PATH/windows_release_${{ matrix.arch }}.exe | |
ln -s ../../../cached_builds/videodecoder/${{ matrix.videodecoder }} retrohub/addons/godot-videodecoder/${{ matrix.videodecoder }} | |
mkdir -p -v export/windows_${{ matrix.arch }} | |
- name: "Package default themes" | |
uses: ./retrohub/.github/actions/get-default-themes | |
- name: "Setup rcedit" | |
run: | | |
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list | |
sudo apt-get update | |
sudo apt-get install wine-stable | |
wget https://github.com/electron/rcedit/releases/download/v1.1.1/rcedit-x64.exe | |
cached_builds/editor/godot --headless --quit | |
echo "export/windows/wine = \"/usr/bin/wine\"" >> ~/.config/godot/editor_settings-4.tres | |
echo "export/windows/rcedit = \"$(pwd)/rcedit-x64.exe\"" >> ~/.config/godot/editor_settings-4.tres | |
tail -n2 ~/.config/godot/editor_settings-4.tres | |
- name: "Exporting RetroHub" | |
working-directory: retrohub | |
run: | | |
../cached_builds/editor/godot --headless --export-release "Windows (${{ matrix.arch }})" ../export/windows_${{ matrix.arch }}/RetroHub.exe | |
- name: "Upload Artifacts" | |
uses: actions/upload-artifact@v3 | |
with: | |
name: windows-${{ matrix.arch }} | |
path: export/windows_${{ matrix.arch }} |