Skip to content

Commit

Permalink
Update build workflow (#14798)
Browse files Browse the repository at this point in the history
* Update build workflow

* update

* Update DynamoCLI check in linux
  • Loading branch information
avidit authored Dec 21, 2023
1 parent d1243cb commit 3aa05f3
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 71 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/build_dynamo_all_net8.0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,11 @@ jobs:
if-no-files-found: warn
retention-days: 3
- name: Save Pull Request Artifact
env:
PR_NUMBER: ${{ github.event.number }}
run: |
New-Item -Path ${{ github.workspace }}\pr -ItemType Directory -Force
${{ github.event.number }}| Out-File -FilePath pr\pr_number.txt
$env:PR_NUMBER | Out-File -FilePath ${{ github.workspace }}\pr\pr_number.txt
- name: Upload Pull Request Artifact
uses: actions/upload-artifact@v4
with:
Expand Down
57 changes: 28 additions & 29 deletions .github/workflows/build_dynamo_core_net6.0_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,31 @@ on:
pull_request:

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Dynamo Repo
uses: actions/checkout@v4
with:
path: Dynamo
- name: Setup dotnet
uses: actions/setup-dotnet@v4
- name: Disable problem matcher
run: echo "::remove-matcher owner=csc::"

- name: Install dependencies for linux runtime
run: dotnet restore ${{ github.workspace }}/Dynamo/src/DynamoCore.sln -p:Platform=NET60_Linux --runtime=linux-x64
- name: Build Dynamo with MSBuild for Linux
run: |
echo "***Continue with the build, Good luck developer!***"
dotnet build ${{ github.workspace }}/Dynamo/src/DynamoCore.sln -c Release /p:Platform=NET60_Linux
- name: Navigate to Dynamo Linux Folder
run: |
cd "${{ github.workspace }}/Dynamo/bin/NET60_Linux/Release"
echo "***Locating DynamoCLI for Linux!***"
test "./DynamoCLI.exe" && echo "DynamoCLI exists!"
- name: Run smoke tests
run: |
cd "${{ github.workspace }}/Dynamo/bin/NET60_Linux/Release"
echo "***Running Smoke tests on linux***"
#TODO unfortunately dotnet does not find any tests in this assembly.
#dotnet test DynamoCoreTests.dll --filter "TestCategory~UnitTest"
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Dynamo Repo
uses: actions/checkout@v4
with:
path: Dynamo
- name: Setup dotnet
uses: actions/setup-dotnet@v4
- name: Disable problem matcher
run: echo "::remove-matcher owner=csc::"
- name: Install dependencies for linux runtime
run: dotnet restore ${{ github.workspace }}/Dynamo/src/DynamoCore.sln -p:Platform=NET60_Linux --runtime=linux-x64
- name: Build Dynamo with MSBuild for Linux
run: |
echo "***Continue with the build, Good luck developer!***"
dotnet build ${{ github.workspace }}/Dynamo/src/DynamoCore.sln -c Release /p:Platform=NET60_Linux
- name: Look for DynamoCLI.exe
run: |
cd "${{ github.workspace }}/Dynamo/bin/NET60_Linux/Release"
echo "***Locating DynamoCLI for Linux!***"
test "./DynamoCLI.exe" && echo "DynamoCLI exists!"
- name: Run smoke tests
run: |
cd "${{ github.workspace }}/Dynamo/bin/NET60_Linux/Release"
echo "***Running Smoke tests on linux***"
#TODO unfortunately dotnet does not find any tests in this assembly.
#dotnet test DynamoCoreTests.dll --filter "TestCategory~UnitTest"
86 changes: 45 additions & 41 deletions .github/workflows/build_dynamo_core_net6.0_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,44 +8,48 @@ on:
pull_request:

jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout Dynamo Repo
uses: actions/checkout@v4
with:
path: Dynamo
repository: DynamoDS/Dynamo
- name: Setup dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0.x'
- name: Disable problem matcher
run: echo "::remove-matcher owner=csc::"

- name: Install dependencies for windows runtime
run: |
dotnet restore $Env:GITHUB_WORKSPACE\Dynamo\src\DynamoCore.sln /p:Configuration=Release --runtime=win-x64
- name: Build Dynamo with MSBuild for Windows
run: |
echo "***Continue with the build, Good luck developer!***"
cd "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\"
.\MSBuild.exe $Env:GITHUB_WORKSPACE\Dynamo\src\DynamoCore.sln /p:Configuration=Release
# look for Dynamo
- name: Navigate to Dynamo Windows Folder
run: |
cd "$Env:GITHUB_WORKSPACE\Dynamo\bin\AnyCPU\Release"
echo "***Locating DynamoCLI for Windows!***"
test ".\DynamoCLI.exe" && echo "DynamoCLI exists!"
- name: Install dependencies for linux runtime
run: dotnet restore $Env:GITHUB_WORKSPACE\Dynamo\src\DynamoCore.sln -p:Platform=NET60_Linux --runtime=linux-x64
- name: Build Dynamo with MSBuild for Linux
run: |
echo "***Continue with the build, Good luck developer!***"
cd "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\"
.\MSBuild.exe $Env:GITHUB_WORKSPACE\Dynamo\src\DynamoCore.sln /p:Configuration=Release /p:Platform=NET60_Linux
- name: Navigate to Dynamo Linux Folder
run: |
cd "$Env:GITHUB_WORKSPACE\Dynamo\bin\NET60_Linux\Release"
echo "***Locating DynamoCLI for Linux!***"
test ".\DynamoCLI.exe" && echo "DynamoCLI exists!"
build:
runs-on: windows-latest
steps:
- name: Checkout Dynamo Repo
uses: actions/checkout@v4
with:
path: Dynamo
repository: DynamoDS/Dynamo
- name: Setup dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0.x'
- name: Disable problem matcher
run: Write-Output "::remove-matcher owner=csc::"
- name: Setup msbuild
uses: microsoft/[email protected]
- name: Install dependencies for windows runtime
run: |
dotnet restore ${{ github.workspace }}\Dynamo\src\DynamoCore.sln /p:Configuration=Release --runtime=win-x64
- name: Build Dynamo with MSBuild for Windows
run: |
Write-Output "***Continue with the build, Good luck developer!***"
msbuild ${{ github.workspace }}\Dynamo\src\DynamoCore.sln /p:Configuration=Release
- name: Look for DynamoCLI.exe
run: |
Write-Output "***Locating DynamoCLI.exe!***"
if (Test-Path -Path "${{ github.workspace }}\Dynamo\bin\AnyCPU\Release\DynamoCLI.exe") {
Write-Output "DynamoCLI.exe exists!"
} else {
Write-Error "DynamoCLI.exe was not found!"
}
- name: Install dependencies for linux runtime
run: dotnet restore ${{ github.workspace }}\Dynamo\src\DynamoCore.sln -p:Platform=NET60_Linux --runtime=linux-x64
- name: Build Dynamo with MSBuild for Linux
run: |
Write-Output "***Continue with the build, Good luck developer!***"
msbuild ${{ github.workspace }}\Dynamo\src\DynamoCore.sln /p:Configuration=Release /p:Platform=NET60_Linux
- name: Look for DynamoCLI
run: |
Write-Output "***Locating DynamoCLI for Linux!***"
if (Test-Path -Path "${{ github.workspace }}\Dynamo\bin\NET60_Linux\Release\DynamoCLI") {
Write-Output "DynamoCLI exists!"
} else {
Write-Error "DynamoCLI was not found!"
}

0 comments on commit 3aa05f3

Please sign in to comment.