|
| 1 | +# Build SampleIntegration.sln and DynamoSamples.sln with .NET 8.0 |
| 2 | +name: Build |
| 3 | + |
| 4 | +on: |
| 5 | + push: |
| 6 | + branches: |
| 7 | + - master |
| 8 | + pull_request: |
| 9 | + |
| 10 | +jobs: |
| 11 | + build: |
| 12 | + runs-on: windows-latest |
| 13 | + steps: |
| 14 | + - name: Checkout DynamoSamples Repo |
| 15 | + uses: actions/checkout@v4 |
| 16 | + with: |
| 17 | + path: DynamoSamples |
| 18 | + repository: DynamoDS/DynamoSamples |
| 19 | + - name: Setup dotnet |
| 20 | + uses: actions/setup-dotnet@v4 |
| 21 | + with: |
| 22 | + dotnet-version: '8.0.x' |
| 23 | + - name: Disable problem matcher |
| 24 | + run: echo "::remove-matcher owner=csc::" |
| 25 | + - name: Setup msbuild |
| 26 | + |
| 27 | + - name: Install dependencies for SampleIntegration |
| 28 | + run: | |
| 29 | + dotnet restore ${{ github.workspace }}\DynamoSamples\src\SampleIntegration\SampleIntegration.sln /p:Configuration=Release --runtime=win-x64 |
| 30 | + - name: Build SampleIntegration |
| 31 | + run: | |
| 32 | + msbuild ${{ github.workspace }}\DynamoSamples\src\SampleIntegration\SampleIntegration.sln /p:Configuration=Release |
| 33 | + - name: Look for Sample Integration |
| 34 | + run: | |
| 35 | + if (Test-Path -Path "${{ github.workspace }}\DynamoSamples\src\SampleIntegration\bin\Release\SampleIntegration.dll") { |
| 36 | + Write-Output "SampleIntegration.dll exists!" |
| 37 | + } else { |
| 38 | + Write-Error "SampleIntegration.dll was not found!" |
| 39 | + } |
| 40 | + - name: Install dependencies for DynamoSamples |
| 41 | + run: | |
| 42 | + dotnet restore ${{ github.workspace }}\DynamoSamples\src\DynamoSamples.sln /p:Configuration=Release --runtime=win-x64 |
| 43 | + - name: Build DynamoSamples |
| 44 | + run: | |
| 45 | + msbuild ${{ github.workspace }}\DynamoSamples\src\DynamoSamples.sln /p:Configuration=Release |
| 46 | + - name: Look for Sample Packages |
| 47 | + run: | |
| 48 | + $paths = @( |
| 49 | + "${{ github.workspace }}\DynamoSamples\dynamo_linter\Sample Linter\bin\SampleLinter.dll", |
| 50 | + "${{ github.workspace }}\DynamoSamples\dynamo_package\Dynamo Samples\bin\SampleLibraryUI.dll", |
| 51 | + "${{ github.workspace }}\DynamoSamples\dynamo_package\Dynamo Samples\bin\SampleLibraryZeroTouch.dll", |
| 52 | + "${{ github.workspace }}\DynamoSamples\dynamo_viewExtension\Sample View Extension\bin\SampleViewExtension.dll" |
| 53 | + ) |
| 54 | +
|
| 55 | + foreach ($path in $paths) { |
| 56 | + if (Test-Path -Path $path) { |
| 57 | + Write-Output "$path exists!" |
| 58 | + } else { |
| 59 | + Write-Error "$path was not found!" |
| 60 | + } |
| 61 | + } |
0 commit comments