Skip to content

add main_menu.rml

add main_menu.rml #17

Workflow file for this run

name: Build
permissions:
contents: write
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
VULKAN_VERSION: 1.4.309.0
LLVM_VERSION: 20
LLVM_WINDOWS_VERSION: 20.1.4
LLVM_MACOS_VERSION: 21
jobs:
build:
strategy:
fail-fast: false
matrix:
platform:
- { runner: windows-2025, os: windows, arch: x64, toolchain: msvc, mode: release, runtime: MT }
- { runner: windows-2025, os: windows, arch: x64, toolchain: msvc, mode: debug, runtime: MTd }
- { runner: windows-2025, os: windows, arch: x64, toolchain: clang-cl, mode: release, runtime: MT }
- { runner: windows-2025, os: windows, arch: x64, toolchain: clang-cl, mode: debug, runtime: MTd }
- { runner: ubuntu-latest, os: linux, arch: x86_64, toolchain: clang-20, mode: release, runtime: c++_static }
- { runner: ubuntu-latest, os: linux, arch: x86_64, toolchain: clang-20, mode: debug, runtime: c++_static }
- { runner: macos-26, os: macos, arch: arm64, toolchain: mac-clang, mode: release, runtime: c++_static }
- { runner: macos-26, os: macos, arch: arm64, toolchain: mac-clang, mode: debug, runtime: c++_static }
runs-on: ${{ matrix.platform.runner }}
steps:
- name: Get current date as package key
id: cache_key
run: echo "key=$(date +'%W')" >> $GITHUB_OUTPUT
shell: bash
- name: "Set OUTPUT_FILE variable"
run: echo "OUTPUT_FILE=${{ matrix.platform.os }}_${{ matrix.platform.arch }}_${{ matrix.platform.mode }}_${{ matrix.platform.toolchain }}_${{ matrix.platform.runtime }}${{ matrix.platform.archive_ext }}" >> $GITHUB_ENV
shell: bash
# Force xmake to a specific folder (for cache)
- name: Set xmake env
run: echo "XMAKE_GLOBALDIR=${{ runner.workspace }}/xmake-global" >> $GITHUB_ENV
shell: bash
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Linux dependencies
if: ${{ matrix.platform.os == 'linux' }}
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository -y "deb http://apt.llvm.org/noble/ llvm-toolchain-noble-${{ env.LLVM_VERSION }} main"
sudo add-apt-repository -y "deb-src http://apt.llvm.org/noble/ llvm-toolchain-noble-${{ env.LLVM_VERSION }} main"
sudo apt update -y
sudo apt install -y clang-${{ env.LLVM_VERSION }} lld-${{ env.LLVM_VERSION }} llvm-${{ env.LLVM_VERSION }} libllvm${{ env.LLVM_VERSION }} llvm-${{ env.LLVM_VERSION }}-runtime libclang-common-${{ env.LLVM_VERSION }}-dev libclang-${{ env.LLVM_VERSION }}-dev libclang1-${{ env.LLVM_VERSION }} libclang-rt-${{ env.LLVM_VERSION }}-dev libc++-${{ env.LLVM_VERSION }}-dev libc++abi-${{ env.LLVM_VERSION }}-dev libunwind-${{ env.LLVM_VERSION }}-dev libllvmlibc-${{ env.LLVM_VERSION }}-dev
sudo apt install libx11-dev libxext-dev libxrandr-dev libxrender-dev libxfixes-dev libxi-dev libxinerama-dev libxkbcommon-dev
- name: Install LLVM for Windows
if: ${{ matrix.platform.os == 'windows' }}
uses: KyleMayes/install-llvm-action@master
with:
version: "${{env.LLVM_WINDOWS_VERSION}}"
- name: Install LLVM for MacOS
if: ${{ matrix.platform.os == 'macos' }}
run: |
brew install llvm@${{ env.LLVM_MACOS_VERSION }}
LLVM_PATH=$(brew --prefix llvm@${{ env.LLVM_MACOS_VERSION }})
echo "LLVM_PATH=$LLVM_PATH" >> $GITHUB_ENV
echo "PATH=$LLVM_PATH/bin:$PATH" >> $GITHUB_ENV
echo "LDFLAGS=-L$LLVM_PATH/lib/c++ -Wl,-rpath,$LLVM_PATH/lib/c++ $LDFLAGS" >> $GITHUB_ENV
echo "CPPFLAGS=-I$LLVM_PATH/include $CPPFLAGS" >> $GITHUB_ENV
echo "CXXFLAGS=-stdlib=libc++ $CXXFLAGS" >> $GITHUB_ENV
# Install xmake
- name: Setup xmake
uses: xmake-io/github-action-setup-xmake@v1
with:
xmake-version: branch@dev
actions-cache-folder: .xmake-cache-W${{ steps.cache_key.outputs.key }}
# Update xmake repository (in order to have the file that will be cached)
- name: Update xmake repository
run: xmake repo --update -vD
# Fetch xmake dephash
- name: Retrieve dependencies hash
id: dep_hash
run: echo "hash=$(xmake l utils.ci.packageskey)" >> $GITHUB_OUTPUT
shell: bash
# Retrieve xmake dependencies
- name: Restore cached xmake dependencies
id: restore-depcache
uses: actions/cache/restore@v4
with:
path: ${{ env.XMAKE_GLOBALDIR }}/.xmake/packages
key: ${{ matrix.platform.os }}-${{ matrix.platform.arch }}-${{ matrix.platform.mode }}-${{ matrix.platform.runtime }}-${{ matrix.platform.toolchain }}-${{ steps.dep_hash.outputs.hash }}-W${{ steps.cache_key.outputs.key }}
- name: Configure xmake and install dependencies
run: xmake config -v --toolchain=${{ matrix.platform.toolchain }} --arch=${{ matrix.platform.arch }} --mode=${{ matrix.platform.mode }} --runtimes=${{ matrix.platform.runtime }} --yes --policies=package.precompiled:n
# Save dependencies
- name: Save cached xmake dependencies
if: ${{ !steps.restore-depcache.outputs.cache-hit }}
uses: actions/cache/save@v4
with:
path: ${{ env.XMAKE_GLOBALDIR }}/.xmake/packages
key: ${{ steps.restore-depcache.outputs.cache-primary-key }}
- name: Build all targets
run: xmake build -vD -a
- name: Install
run: xmake install -vDo dest/
- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.platform.os }}-${{ matrix.platform.arch }}-${{ matrix.platform.mode }}-${{ matrix.platform.toolchain }}-${{ matrix.platform.runtime }}
path: |
dest