tweak: string compliance fixes #100
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: CI | |
on: | |
workflow_dispatch: | |
inputs: | |
remote_debug: | |
type: boolean | |
description: 'Run TMate if Building or Testing fails. (https://github.com/marketplace/actions/debugging-with-tmate)' | |
required: false | |
default: false | |
push: | |
branches: [ "main", "devel5"] | |
pull_request: | |
branches: [ "main", "devel5" ] | |
jobs: | |
MSVC: | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
config: [Debug, Shipping] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: 'recursive' | |
fetch-depth: '0' | |
- name: Premake | |
shell: pwsh | |
run: .\build\bin\win\premake5 --file=premake5.lua vs2022 | |
- name: Build | |
shell: pwsh | |
run: | | |
Import-Module (& .\build\bin\win\vswhere.exe -find Common7\Tools\Microsoft.VisualStudio.DevShell.dll) | |
Enter-VsDevShell -VsInstallPath (& .\build\bin\win\vswhere.exe -property installationPath) -Arch amd64 -SkipAutomaticLocation | |
msbuild .\out\vs2022\Equilibrium.sln /t:'base\base:Rebuild;base\base_memory_unittests:Rebuild;base\base_unittests:Rebuild' /p:Configuration=${{ matrix.config }} /p:Platform=x64 -m | |
- name: Test | |
shell: pwsh | |
run: Get-ChildItem -Path (Resolve-Path .\out\vs*\bin\*\equilibrium\) -Filter *.exe | ForEach-Object $_ { $p = @(); $p += '--gtest_color=no '; $p += '--gtest_output=xml:.\tests\' + $_.Name.Replace('.exe','') + '.xml'; &$_.PSPath $p; } | |
- name: Convert Gtest to JUnit | |
if: ${{ !cancelled() }} | |
shell: pwsh | |
run: | | |
$xsl = New-Object System.Xml.Xsl.XslCompiledTransform | |
$xsl.Load("${{github.workspace}}\.github\gtest_to_junit.xsl") | |
Get-ChildItem -Path .\tests\ -Filter *.xml | Where-Object { !$_.Name.StartsWith('convert') } | ForEach-Object $_ { $xsl.Transform($_.FullName,($_.Directory.FullName + '\convert-' + $_.Name)); } | |
- name: Setup tmate debug session | |
if: ${{ failure() && github.event_name == 'workflow_dispatch' && inputs.remote_debug}} | |
uses: mxschmitt/action-tmate@v3 | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
if: ${{ !cancelled() }} | |
with: | |
name: test-results | |
path: .\tests\convert-*.xml | |
Linux: | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
config: [Debug, Shipping] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: 'recursive' | |
fetch-depth: '0' | |
- name: Setup Dynamic Test Binary Name | |
run: echo "TEST_BINARY_NAME=$(if [[ '${{ matrix.config }}' == 'Debug' ]]; then echo 'base_unittests_x86_64_d'; else echo 'base_unittests'; fi)" >> $GITHUB_ENV | |
- name: Setup C++ environment | |
uses: aminya/setup-cpp@v1 | |
with: | |
compiler: gcc-13 | |
- name: Premake | |
run: ./build/premake_linux.sh ${{ matrix.config }} | |
- name: Build | |
run: | | |
cd out/gmake2 | |
CONFIG_LOWER=$(echo "${{ matrix.config }}" | tr '[:upper:]' '[:lower:]') | |
make config=$CONFIG_LOWER | |
- name: Test | |
run: ./out/gmake2/bin/${{ matrix.config }}/equilibrium/${{ env.TEST_BINARY_NAME }} |