Skip to content

[Core] [GUI]: Add Nix and add a GUI #230

[Core] [GUI]: Add Nix and add a GUI

[Core] [GUI]: Add Nix and add a GUI #230

Workflow file for this run

# Copyright 2025 Xenon Emulator Project
name: Build
on: [push, pull_request]
concurrency:
group: ci-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'push' }}
env:
BUILD_TYPE: Release
jobs:
Windows:
runs-on: windows-2025
steps:
- uses: actions/checkout@main
with:
submodules: recursive
- name: Cache CMake Configuration
uses: actions/cache@main
env:
cache-name: ${{ runner.os }}-xenon-cache-config-windows
with:
path: |
${{github.workspace}}/build
key: ${{ env.cache-name }}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }}
restore-keys: |
${{ env.cache-name }}-
- name: Cache CMake Build
uses: hendrikmuhs/ccache-action@v1.2.17
env:
cache-name: ${{ runner.os }}-xenon-cache-build-windows
with:
append-timestamp: false
key: ${{ env.cache-name }}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }}
- name: Setup VS Environment
uses: ilammy/msvc-dev-cmd@v1.13.0
with:
arch: amd64
- name: Configure CMake
run: cmake --fresh -G Ninja -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel $env:NUMBER_OF_PROCESSORS
- name: Upload Windows Artifact
uses: actions/upload-artifact@main
with:
name: Xenon-win64
path: ${{github.workspace}}/build/Xenon.exe
Linux:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@main
with:
submodules: recursive
- name: Install Dependencies
run: |
sudo apt update
sudo apt install -y ninja-build clang lld cmake ccache \
libx11-dev libxext-dev libxrandr-dev libxcursor-dev \
libxi-dev libxinerama-dev libwayland-dev libxkbcommon-dev \
wayland-protocols
- name: Cache CMake Configuration
uses: actions/cache@main
env:
cache-name: ${{ runner.os }}-xenon-cache-config-linux
with:
path: |
${{github.workspace}}/build
key: ${{ env.cache-name }}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }}
restore-keys: |
${{ env.cache-name }}-
- name: Cache CMake Build
uses: hendrikmuhs/ccache-action@v1.2.17
env:
cache-name: ${{ runner.os }}-xenon-cache-build-linux
with:
append-timestamp: false
key: ${{ env.cache-name }}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }}
- name: Configure CMake
run: cmake --fresh -G Ninja -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel $(nproc)
- name: Upload Linux Artifact
uses: actions/upload-artifact@main
with:
name: Xenon-linux64
path: ${{github.workspace}}/build/Xenon
linux_nix:
name: Linux (nix)
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: cachix/install-nix-action@v27
- name: Build Xenon
run: nix build .#xenon -L