mirror of
https://github.com/hedge-dev/XenonRecomp.git
synced 2025-06-10 09:35:06 +00:00
89 lines
2.1 KiB
YAML
89 lines
2.1 KiB
YAML
name: Build stuff
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-latest, windows-latest]
|
|
build_type: [Debug]
|
|
include:
|
|
- os: windows-latest
|
|
c_compiler: clang-cl
|
|
cpp_compiler: clang-cl
|
|
- os: ubuntu-latest
|
|
c_compiler: clang
|
|
cpp_compiler: clang++
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Install Ninja (Linux)
|
|
if: runner.os == 'Linux'
|
|
run: sudo apt-get update && sudo apt-get install -y ninja-build
|
|
shell: bash
|
|
|
|
- name: Install Ninja (Windows)
|
|
if: runner.os == 'Windows'
|
|
run: choco install ninja
|
|
shell: powershell
|
|
|
|
- name: Configure CMake (Linux)
|
|
if: runner.os == 'Linux'
|
|
run: >
|
|
cmake
|
|
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
|
|
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
|
|
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
|
|
-G Ninja
|
|
-S .
|
|
shell: bash
|
|
|
|
- name: Configure CMake (Windows)
|
|
if: runner.os == 'Windows'
|
|
run: >
|
|
cmake
|
|
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
|
|
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
|
|
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
|
|
-G Ninja
|
|
-S .
|
|
shell: powershell
|
|
|
|
|
|
- name: Build
|
|
run: ninja
|
|
|
|
|
|
|
|
|
|
- name: Package Artifacts (Linux)
|
|
if: runner.os == 'Linux'
|
|
run: |
|
|
mkdir -p artifacts
|
|
cp XenonRecomp/XenonRecomp artifacts/
|
|
cp XenonAnalyse/XenonAnalyse artifacts/
|
|
shell: bash
|
|
|
|
- name: Package Artifacts (Windows)
|
|
if: runner.os == 'Windows'
|
|
run: |
|
|
New-Item -ItemType Directory -Path artifacts
|
|
Copy-Item -Path XenonRecomp\XenonRecomp.exe -Destination artifacts\
|
|
Copy-Item -Path XenonAnalyse\XenonAnalyse.exe -Destination artifacts\
|
|
shell: powershell
|
|
|
|
- name: Upload Artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: XenonBinaries-${{ matrix.os }}
|
|
path: artifacts/*
|