Skip to content

Rename release to release.yml #8

Rename release to release.yml

Rename release to release.yml #8

name: Build
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build-plugin:
strategy:
fail-fast: false
# Set up a matrix to run the following 3 configurations:
# 1. <Windows, Release, latest MSVC compiler toolchain on the default runner image, default generator>
# 2. <Linux, Release, latest GCC compiler toolchain on the default runner image, default generator>
# 3. <Linux, Release, latest Clang compiler toolchain on the default runner image, default generator>
#
# To add more build types (Release, Debug, RelWithDebInfo, etc.) customize the build_type list.
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
name: ${{ matrix.os }} build
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v5
with:
submodules: recursive
- name: Cache Core Build
id: core-cache
uses: actions/cache@v4
with:
# Cache the CMake build directory at the repo root
path: |
build
# Include OS and relevant files so cache is properly scoped/invalidated
key: ${{ runner.os }}-cmake-Release-${{ hashFiles('CMakeLists.txt', 'cmake/**', 'xplib/**', 'scripts/**', '.github/workflows/cmake-multi-platform.yml') }}
restore-keys: |
${{ runner.os }}-cmake-Release-
- name: Install ubuntu libraries
if: matrix.os == 'ubuntu-latest' && steps.core-cache.outputs.cache-hit != 'true'
run: |
sudo apt update
sudo apt install -y libgl1-mesa-dev libglx-dev
- name: Run CMake
if: steps.core-cache.outputs.cache-hit != 'true'
run: |
cmake -DCMAKE_OSX_ARCHITECTURES:STRING="x86_64;arm64" -DCMAKE_BUILD_TYPE=Release -S . -B build
cmake --build build --parallel --config Release
- name: Upload Core artifacts
uses: actions/upload-artifact@v4
with:
name: xplib
path: bin/
if-no-files-found: 'error'
overwrite: 'true'