mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-05-10 17:40:24 +08:00
Testing - Samples build on GH #331
Add GitHub Action to build CSharp sample on Windows Add MFC and Qt sample build actions Improve CASROOT assignment logic in env.build.sh and env.install.sh for better compatibility with binary directories
This commit is contained in:
54
.github/actions/build-sample-mfc/action.yml
vendored
Normal file
54
.github/actions/build-sample-mfc/action.yml
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
name: 'Build MFC Sample'
|
||||
description: 'Build MFC sample using OCCT installation'
|
||||
|
||||
inputs:
|
||||
platform:
|
||||
description: 'Build platform (windows)'
|
||||
required: true
|
||||
install-artifact-name:
|
||||
description: 'OCCT installation artifact name'
|
||||
required: true
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Download OCCT installation
|
||||
uses: actions/download-artifact@v4.1.7
|
||||
with:
|
||||
name: ${{ inputs.install-artifact-name }}
|
||||
path: occt-install
|
||||
|
||||
- name: Build MFC Sample
|
||||
if: inputs.platform == 'windows'
|
||||
shell: cmd
|
||||
run: |
|
||||
REM Setup environment
|
||||
call "${{ github.workspace }}\occt-install\env.bat" vc14 win64 Release
|
||||
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" x64
|
||||
|
||||
cd ${{ github.workspace }}/samples/mfc/standard
|
||||
set "PATH=C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE;%PATH%"
|
||||
|
||||
REM First restore the solution
|
||||
echo "Restoring solution..."
|
||||
msbuild.exe ALL-vc14.sln -t:Restore -p:Configuration=Release -p:Platform=x64 /consoleloggerparameters:Verbosity=normal;Summary /flp:LogFile=restore.log;Verbosity=detailed
|
||||
|
||||
REM Build solution with detailed logging
|
||||
echo "Building solution..."
|
||||
msbuild.exe ALL-vc14.sln /p:Configuration=Release /p:Platform=x64 /p:PlatformToolset=v143 /consoleloggerparameters:Verbosity=normal;Summary /flp:LogFile=build.log;Verbosity=detailed /m
|
||||
|
||||
REM Display logs if build fails
|
||||
if errorlevel 1 (
|
||||
echo "Build failed. Contents of restore.log:"
|
||||
type restore.log
|
||||
echo "Contents of build.log:"
|
||||
type build.log
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
- name: Upload MFC Sample
|
||||
uses: actions/upload-artifact@v4.4.3
|
||||
with:
|
||||
name: mfc-sample-${{ inputs.platform }}-x64
|
||||
path: samples/mfc/
|
||||
retention-days: 7
|
||||
Reference in New Issue
Block a user