mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-06-06 06:44:20 +00:00
103 lines
3.0 KiB
YAML
103 lines
3.0 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
tags:
|
|
- "v*.*.*"
|
|
pull_request:
|
|
branches: [ main ]
|
|
|
|
jobs:
|
|
build-and-test:
|
|
name: Build & Test (${{ matrix.os }})
|
|
runs-on: ${{ matrix.os }}
|
|
continue-on-error: ${{ github.event_name != 'push' || !startsWith(github.ref, 'refs/tags/v') }}
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- os: windows-2025
|
|
artifact: windows
|
|
preset: ci-windows-2022
|
|
debug_preset: windows-msvc-relwithdebinfo
|
|
- os: ubuntu-24.04
|
|
artifact: linux
|
|
preset: ci-ubuntu-22.04
|
|
debug_preset: linux-gnu-relwithdebinfo
|
|
- os: macos-15-intel
|
|
artifact: macos
|
|
preset: ci-macos-15-intel
|
|
debug_preset: macos-relwithdebinfo
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
submodules: true
|
|
- name: Add msbuild to PATH (Windows only)
|
|
if: ${{ matrix.os == 'windows-2025' }}
|
|
uses: microsoft/setup-msbuild@30375c66a4eea26614e0d39710365f22f8b0af57 # v3
|
|
with:
|
|
vs-version: '[17,18)'
|
|
msbuild-architecture: x64
|
|
- name: Install libssl and switch to XCode 15.2 (Mac Only)
|
|
if: ${{ matrix.os == 'macos-15-intel' }}
|
|
run: |
|
|
brew install openssl@3
|
|
sudo xcode-select -s /Applications/Xcode_15.2.app/Contents/Developer
|
|
- name: Get CMake 3.x
|
|
uses: lukka/get-cmake@591817e96fcad43505fb4eae36172462abb3a42e # v4.3.3
|
|
with:
|
|
cmakeVersion: "~3.25.0"
|
|
- name: cmake
|
|
uses: lukka/run-cmake@5d55ea7949e25f69f0ecb516d8d572297e03a956 # v10.9
|
|
with:
|
|
workflowPreset: "${{ matrix.debug_preset }}"
|
|
- name: artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: build-${{matrix.artifact}}
|
|
path: |
|
|
build/*/*Server*
|
|
build/*/*.ini
|
|
build/*/*.so
|
|
build/*/*.dll
|
|
build/*/*.dylib
|
|
build/*/vanity/
|
|
build/*/navmeshes/
|
|
build/*/migrations/
|
|
build/*/*.dcf
|
|
!build/*/*.pdb
|
|
!build/*/d*/
|
|
!build/*/*.dSYM/
|
|
|
|
- name: Extract Linux debug symbols
|
|
if: matrix.os == 'ubuntu-24.04'
|
|
run: |
|
|
find build -type f -name '*Server' | while read bin; do
|
|
objcopy --only-keep-debug "$bin" "${bin}.debug"
|
|
objcopy --strip-debug --add-gnu-debuglink="${bin}.debug" "$bin"
|
|
done
|
|
- name: debug symbols (Windows)
|
|
if: matrix.os == 'windows-2025'
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: debug-${{matrix.artifact}}
|
|
path: |
|
|
build/*/*.pdb
|
|
build/*/d*/
|
|
retention-days: 30
|
|
- name: debug symbols (Linux)
|
|
if: matrix.os == 'ubuntu-24.04'
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: debug-${{matrix.artifact}}
|
|
path: build/**/*.debug
|
|
retention-days: 30
|
|
- name: debug symbols (macOS)
|
|
if: matrix.os == 'macos-15-intel'
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: debug-${{matrix.artifact}}
|
|
path: build/**/*.dSYM/
|
|
retention-days: 30
|