mirror of https://github.com/PCSX2/pcsx2.git
GHActions: Use ninja for windows cmake builds
This commit is contained in:
parent
4f22bc8162
commit
e9e58fd791
|
@ -104,23 +104,28 @@ jobs:
|
||||||
|
|
||||||
- name: Generate CMake
|
- name: Generate CMake
|
||||||
id: cmake
|
id: cmake
|
||||||
shell: bash
|
shell: cmd
|
||||||
run: |
|
run: |
|
||||||
TYPE=$([ "${{ github.event.inputs.retainDebugArtifacts }}" == "true" ] && echo RelWithDebInfo || echo Release)
|
if "${{ github.event.inputs.retainDebugArtifacts }}"=="true" (SET type=RelWithDebInfo) else (SET type=Release)
|
||||||
echo "::set-output name=buildtype::$TYPE"
|
if "${{ matrix.platform }}"=="Win32" (SET vcvars=vcvarsamd64_x86.bat) else (SET vcvars=vcvars64.bat)
|
||||||
cmake . -B build -DCMAKE_BUILD_TYPE=$TYPE -DCMAKE_GENERATOR_PLATFORM=${{ matrix.platform }}
|
call "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\%vcvars%"
|
||||||
|
echo ::set-output name=buildtype::%type%
|
||||||
|
echo ::set-output name=vcvars::%vcvars%
|
||||||
|
cmake . -B build -DCMAKE_BUILD_TYPE=%type% -G Ninja
|
||||||
if: matrix.configuration == 'CMake'
|
if: matrix.configuration == 'CMake'
|
||||||
|
|
||||||
- name: Build PCSX2
|
- name: Build PCSX2
|
||||||
|
shell: cmd
|
||||||
env:
|
env:
|
||||||
# Set to 'true' to retain the .pdb / .exp / .lib, etc files which can be useful for repro'ing issues that only occur in the compiled .exe
|
# Set to 'true' to retain the .pdb / .exp / .lib, etc files which can be useful for repro'ing issues that only occur in the compiled .exe
|
||||||
RetainDebuggingArtifacts: ${{ github.event.inputs.retainDebugArtifacts == 'true' }}
|
RetainDebuggingArtifacts: ${{ github.event.inputs.retainDebugArtifacts == 'true' }}
|
||||||
run: |
|
run: |
|
||||||
if ("${{ matrix.configuration }}" -eq "CMake") {
|
if "${{ matrix.configuration }}"=="CMake" (
|
||||||
|
call "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\${{ steps.cmake.outputs.vcvars }}"
|
||||||
cmake --build build --config ${{ steps.cmake.outputs.buildtype }}
|
cmake --build build --config ${{ steps.cmake.outputs.buildtype }}
|
||||||
} else {
|
) else (
|
||||||
msbuild "PCSX2_suite.sln" /m /v:m /p:Configuration="${{ matrix.configuration }}" /p:Platform="${{ matrix.platform }}"
|
msbuild "PCSX2_suite.sln" /m /v:m /p:Configuration="${{ matrix.configuration }}" /p:Platform="${{ matrix.platform }}"
|
||||||
}
|
)
|
||||||
|
|
||||||
- name: Prepare Artifact Metadata
|
- name: Prepare Artifact Metadata
|
||||||
id: artifact-metadata
|
id: artifact-metadata
|
||||||
|
@ -131,7 +136,7 @@ jobs:
|
||||||
Release) SIMD="SSE4";;
|
Release) SIMD="SSE4";;
|
||||||
*AVX2) SIMD="AVX2";;
|
*AVX2) SIMD="AVX2";;
|
||||||
CMake) SIMD="CMake"
|
CMake) SIMD="CMake"
|
||||||
cp build/pcsx2/${{ steps.cmake.outputs.buildtype }}/PCSX2* bin/ ;;
|
cp build/pcsx2/PCSX2* bin/ ;;
|
||||||
*) SIMD="UNKNOWN";;
|
*) SIMD="UNKNOWN";;
|
||||||
esac
|
esac
|
||||||
if [ ${{ github.event_name }} == "pull_request" ]; then
|
if [ ${{ github.event_name }} == "pull_request" ]; then
|
||||||
|
|
Loading…
Reference in New Issue