|
17 | 17 | env: |
18 | 18 | Solution_Name: RAYTRACER_UNILIGHT.sln |
19 | 19 | Project_Name: RAYTRACER_UNILIGHT.csproj |
20 | | - CommonRepo_Url: https://github.com/danmunteanu/COMMON_GRAPHICS.git |
21 | | - CommonSolution_Name: COMMON_GRAPHICS.sln |
22 | | - CommonProject_Name: COMMON_GRAPHICS.csproj |
23 | 20 |
|
24 | 21 | steps: |
25 | 22 | # Checkout main repository |
@@ -48,33 +45,42 @@ jobs: |
48 | 45 |
|
49 | 46 | # Restore and build COMMON_GRAPHICS |
50 | 47 | - name: Restore COMMON_GRAPHICS |
51 | | - run: msbuild COMMON_GRAPHICS/$env:CommonSolution_Name /t:Restore /p:Configuration=${{ matrix.configuration }} |
| 48 | + shell: pwsh |
| 49 | + run: msbuild "$PWD/COMMON_GRAPHICS/COMMON_GRAPHICS.sln" /t:Restore /p:Configuration=${{ matrix.configuration }} |
52 | 50 |
|
53 | 51 | - name: Build COMMON_GRAPHICS |
54 | | - run: msbuild COMMON_GRAPHICS/$env:CommonSolution_Name /p:Configuration=${{ matrix.configuration }} |
| 52 | + shell: pwsh |
| 53 | + run: msbuild "$PWD/COMMON_GRAPHICS/COMMON_GRAPHICS.sln" /p:Configuration=${{ matrix.configuration }} |
55 | 54 |
|
56 | 55 | # Copy the compiled DLL into the main project folder |
57 | 56 | - name: Copy COMMON_GRAPHICS DLL |
| 57 | + shell: pwsh |
58 | 58 | run: | |
59 | | - mkdir -p RAYTRACER_UNILIGHT/libs |
60 | | - copy COMMON_GRAPHICS/bin/${{ matrix.configuration }}/net8.0/COMMON_GRAPHICS.dll RAYTRACER_UNILIGHT/libs/ |
| 59 | + $dllSource = "$PWD/COMMON_GRAPHICS/bin/${{ matrix.configuration }}/net8.0/COMMON_GRAPHICS.dll" |
| 60 | + $dllDestFolder = "$PWD/RAYTRACER_UNILIGHT/libs" |
| 61 | + if (!(Test-Path $dllDestFolder)) { New-Item -ItemType Directory -Path $dllDestFolder | Out-Null } |
| 62 | + Copy-Item $dllSource $dllDestFolder |
61 | 63 |
|
62 | 64 | # Restore main project packages |
63 | 65 | - name: Restore RAYTRACER_UNILIGHT |
64 | | - run: msbuild $env:Solution_Name /t:Restore /p:Configuration=${{ matrix.configuration }} |
| 66 | + shell: pwsh |
| 67 | + run: msbuild "$PWD/$env:Solution_Name" /t:Restore /p:Configuration=${{ matrix.configuration }} |
65 | 68 |
|
66 | 69 | # Build main project |
67 | 70 | - name: Build RAYTRACER_UNILIGHT |
68 | | - run: msbuild $env:Solution_Name /p:Configuration=${{ matrix.configuration }} |
| 71 | + shell: pwsh |
| 72 | + run: msbuild "$PWD/$env:Solution_Name" /p:Configuration=${{ matrix.configuration }} |
69 | 73 |
|
70 | 74 | # Run tests (optional) |
71 | | - #- name: Run tests |
72 | | - # run: dotnet test $env:Solution_Name --configuration ${{ matrix.configuration }} |
73 | | - # continue-on-error: true |
| 75 | + - name: Run tests |
| 76 | + shell: pwsh |
| 77 | + run: dotnet test "$PWD/$env:Solution_Name" --configuration ${{ matrix.configuration }} |
| 78 | + continue-on-error: true |
74 | 79 |
|
75 | 80 | # Publish main project |
76 | 81 | - name: Publish RAYTRACER_UNILIGHT |
77 | | - run: dotnet publish $env:Project_Name -c ${{ matrix.configuration }} -o publish |
| 82 | + shell: pwsh |
| 83 | + run: dotnet publish "$PWD/$env:Project_Name" -c ${{ matrix.configuration }} -o "$PWD/publish" |
78 | 84 |
|
79 | 85 | # Upload build artifacts |
80 | 86 | - name: Upload build artifacts |
|
0 commit comments