Add LTCG symbols: CDevice_KickOff variants, D3DDevice_MakeSpace, and XGSetSurfaceHeader #285
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: GitHub CI | |
on: | |
workflow_call: | |
outputs: | |
do-release: | |
value: ${{ jobs.semver.outputs.do-build == 'true' && jobs.semver.outputs.do-release == 'true' }} | |
ver-cur: | |
value: ${{ jobs.semver.outputs.ver-cur }} | |
workflow_dispatch: | |
push: | |
paths-ignore: | |
- '.github/*' | |
- '.github/*TEMPLATE/**' | |
branches: | |
- '**' | |
pull_request: | |
paths-ignore: | |
- '*.md' | |
- '.github/*' | |
- '.github/*TEMPLATE/**' | |
env: | |
is_pr: ${{ startsWith(github.ref, 'refs/pull/') }} | |
repo_default: 'Cxbx-Reloaded/XbSymbolDatabase' | |
jobs: | |
semver: | |
name: Generate Semver | |
runs-on: ubuntu-latest | |
outputs: | |
ver-prev: ${{ steps.semver-output.outputs.version_previous }} | |
ver-cur: ${{ steps.semver-output.outputs.version_current }} | |
# Hack method to generate true or false for jobs. | |
# Since job's "if" doesn't support env context. | |
do-build: ${{ steps.build-cond.outputs.do-build }} | |
do-release: ${{ github.repository == env.repo_default }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: RadWolfie/Semantic-Version-Action@main | |
id: semver-output | |
with: | |
repository: ${{ env.repo_default }} | |
version_major_init: 3 | |
version_minor_init: 0 | |
- name: Run Build Conditional | |
id: build-cond | |
run: | | |
if [ "true" == "${{ (github.event_name != 'schedule' && github.event_name != 'workflow_dispatch') || steps.semver-output.outputs.version_previous != steps.semver-output.outputs.version_current }}" ] | |
then | |
echo "do-build=true" >> $GITHUB_OUTPUT | |
else | |
echo "do-build=false" >> $GITHUB_OUTPUT | |
fi | |
- name: Generate Changelog | |
if: steps.build-cond.outputs.do-build == 'true' | |
run: | | |
if [ "true" == "${{ env.is_pr }}" ] | |
then | |
git log --pretty=format:"%h: %s%n%w(0,11)%-b%n" ${{ steps.semver-output.outputs.version_previous }}..HEAD > changelog | |
else | |
git log --first-parent --pretty=format:"%h: %s%n%w(0,11)%-b%n" ${{ steps.semver-output.outputs.version_previous }}..HEAD > changelog | |
fi | |
# NOTE: Require to reduce workload from CI service from fetch whole git content. | |
- name: Upload Changelog | |
if: steps.build-cond.outputs.do-build == 'true' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: changelog | |
path: changelog | |
build: | |
name: ${{ matrix.platform }} (${{ matrix.arch }}, ${{ matrix.configuration }}) | |
runs-on: ${{ matrix.os }} | |
needs: semver | |
if: needs.semver.outputs.do-build == 'true' | |
strategy: | |
fail-fast: false | |
matrix: | |
cmake-generator: | |
# x86 arch | |
- -A Win32 # Visual Studio (latest IDE) | |
# x64 arch | |
- -A x64 # Visual Studio (latest IDE) | |
- -G "Unix Makefiles" | |
- -G Xcode | |
configuration: [Debug, Release] | |
include: | |
- cmake-generator: -A Win32 | |
platform: Windows | |
os: windows-latest | |
arch: x86 | |
cmake-build-param: -j $env:NUMBER_OF_PROCESSORS | |
folder: win | |
- cmake-generator: -A x64 | |
platform: Windows | |
os: windows-latest | |
arch: x64 | |
cmake-build-param: -j $env:NUMBER_OF_PROCESSORS | |
folder: win | |
- cmake-generator: -G "Unix Makefiles" | |
platform: Linux | |
os: ubuntu-latest | |
arch: x64 | |
cmake-build-param: -j $(nproc --all) | |
folder: linux | |
- cmake-generator: -G Xcode | |
platform: macOS | |
os: macos-latest | |
arch: x64 | |
cmake-build-param: -j $(sysctl -n hw.ncpu) | |
folder: macos | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Generate CMake Files | |
# NOTES: | |
# -Werror=dev is used to validate CMakeLists.txt for any faults. | |
run: cmake -B build -Werror=dev ${{ matrix.cmake-generator }} | |
- name: Build | |
run: cmake --build build --config ${{ matrix.configuration }} ${{ matrix.cmake-build-param }} | |
- name: CTests | |
run: ctest --test-dir build --build-config ${{ matrix.configuration }} --verbose | |
- name: Copy Files | |
if: matrix.configuration == 'Release' | |
run: cmake --install build --config ${{ matrix.configuration }} --prefix upload/${{ matrix.folder }}_${{ matrix.arch }} | |
- name: Upload Build Artifact | |
if: matrix.configuration == 'Release' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: XbSymbolDatabase | |
# roughly translate to upload/<platform_arch>/<bin | lib | include>/<anything in here and after> | |
path: upload/*/*/* | |
if-no-files-found: error | |
- name: Upload Misc Artifact | |
if: matrix.cmake-generator == '-G "Unix Makefiles"' && matrix.configuration == 'Release' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: XbSymbolDatabase | |
path: | | |
README.md | |
LICENSE | |
if-no-files-found: error |