Skip to content

bruh

bruh #2133

name: 'Build utilities'
on:
push:
branches:
- '**'
paths:
- '.github/workflows/**'
- 'gamedata/**'
- 'sdk/**'
- 'src/**'
- '**/CMakeLists.txt'
- '**/*.ltx'
- '**/*.json'
pull_request:
branches:
- '**'
paths:
- '.github/workflows/**'
- 'gamedata/**'
- 'sdk/**'
- 'src/**'
- '**/CMakeLists.txt'
- '**/*.ltx'
- '**/*.json'
defaults:
run:
shell: pwsh
jobs:
build-utilities:
name: 'Build utilities'
strategy:
matrix:
system:
- windows-2022
preset:
- Utilities
platform:
- x64
config:
- Debug
- RelWithDebInfo
- Release
runs-on: ${{ matrix.system }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Cache packages
uses: actions/cache@v4
with:
key: ${{ matrix.preset }}-NuGet-${{ hashFiles('**/Packages.config') }}
restore-keys: |
${{ matrix.preset }}-NuGet-${{ hashFiles('**/Packages.config') }}
${{ matrix.preset }}-NuGet-
path: |
~/.nuget/packages
- name: Configure utilities
run: |
cmake --preset ${{ matrix.preset }}-${{ matrix.platform }}-${{ runner.os }} -DIXRAY_CI=ON
- name: Build utilities
run: |
cmake --build --preset ${{ matrix.preset }}-${{ matrix.platform }}-${{ runner.os }}-${{ matrix.config }}
- name: Upload binaries
uses: actions/upload-artifact@v4
with:
name: utilities-binaries-${{ matrix.system }}-${{ matrix.platform }}-${{ matrix.config }}-${{ github.sha }}
path: |
build/${{ matrix.platform }}/${{ matrix.preset }}-${{ runner.os }}/bin/${{ matrix.config }}/*.exe
build/${{ matrix.platform }}/${{ matrix.preset }}-${{ runner.os }}/bin/${{ matrix.config }}/*.dll
- name: Upload symbols
uses: actions/upload-artifact@v4
if: ${{ matrix.config != 'Release' }}
with:
name: utilities-symbols-${{ matrix.system }}-${{ matrix.platform }}-${{ matrix.config }}-${{ github.sha }}
path: |
build/${{ matrix.platform }}/${{ matrix.preset }}-${{ runner.os }}/bin/${{ matrix.config }}/*.pdb
- name: Upload libraries
uses: actions/upload-artifact@v4
with:
name: utilities-libraries-${{ matrix.system }}-${{ matrix.platform }}-${{ matrix.config }}-${{ github.sha }}
path: |
build/${{ matrix.platform }}/${{ matrix.preset }}-${{ runner.os }}/lib/${{ matrix.config }}/
- name: Upload packages
uses: actions/upload-artifact@v4
if: ${{ (matrix.config == 'Debug' && matrix.platform == 'x64') }}
with:
name: utilities-packages-${{ matrix.system }}-${{ github.sha }}
path: |
build/${{ matrix.platform }}/${{ matrix.preset }}-${{ runner.os }}/packages/
build-targets:
name: 'Build targets'
strategy:
matrix:
system:
- ubuntu-22.04
preset:
- Targets
platform:
- x64
config:
- Debug
- RelWithDebInfo
- Release
defaults:
run:
shell: bash
runs-on: ${{ matrix.system }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Ninja
uses: imesense/[email protected]
- name: Configure targets
run: |
cmake \
-S . \
-B build/${{ matrix.platform }}/${{ matrix.preset }}-${{ runner.os }} \
-G "Ninja Multi-Config" \
-DCMAKE_C_COMPILER=clang-14 \
-DCMAKE_CXX_COMPILER=clang++-14 \
-DIXRAY_UTILS=ON \
-DIXRAY_CI=ON
- name: Build targets
run: |
cmake \
--build build/${{ matrix.platform }}/${{ matrix.preset }}-${{ runner.os }} \
--target TextureCloner \
--config ${{ matrix.config }} \
-j$(nproc)
- name: Upload binaries
uses: actions/upload-artifact@v4
with:
name: targets-binaries-${{ matrix.system }}-${{ matrix.platform }}-${{ matrix.config }}-${{ github.sha }}
path: |
build/${{ matrix.platform }}/${{ matrix.preset }}-${{ runner.os }}/bin/${{ matrix.config }}/
!build/${{ matrix.platform }}/${{ matrix.preset }}-${{ runner.os }}/bin/${{ matrix.config }}/*.pdb
!build/${{ matrix.platform }}/${{ matrix.preset }}-${{ runner.os }}/bin/${{ matrix.config }}/*.debug
if-no-files-found: ignore
- name: Upload symbols
uses: actions/upload-artifact@v4
if: ${{ matrix.config != 'Release' }}
with:
name: targets-symbols-${{ matrix.system }}-${{ matrix.platform }}-${{ matrix.config }}-${{ github.sha }}
path: |
build/${{ matrix.platform }}/${{ matrix.preset }}-${{ runner.os }}/bin/${{ matrix.config }}/*.pdb
build/${{ matrix.platform }}/${{ matrix.preset }}-${{ runner.os }}/bin/${{ matrix.config }}/*.debug
if-no-files-found: ignore
- name: Upload libraries
uses: actions/upload-artifact@v4
with:
name: targets-libraries-${{ matrix.system }}-${{ matrix.platform }}-${{ matrix.config }}-${{ github.sha }}
path: |
build/${{ matrix.platform }}/${{ matrix.preset }}-${{ runner.os }}/lib/${{ matrix.config }}/
if-no-files-found: ignore