From 54b8c91668468b3762c40a4ce485578a588ea2de Mon Sep 17 00:00:00 2001 From: Robin Jones Date: Fri, 14 Jun 2024 17:41:51 +0100 Subject: [PATCH 01/25] Add ability to test multiple OSes Switch build to any CPU --- azure-pipelines.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index af79460d..68a0207f 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -173,16 +173,24 @@ jobs: ) dependsOn: - Check_Build_Options + strategy: + matrix: + linux: + imageName: 'ubuntu-latest' + # windows: + # imageName: 'windows-latest' + # macos: + # imageName: 'macos-latest' pool: - vmImage: 'windows-latest' + vmImage: '$(imageName)' variables: - group: sign-client-credentials - name: DOTNET_NOLOGO value: true - name: buildPlatform - value: 'x64' + value: 'Any CPU' - name: buildConfiguration value: 'Release' - name: solution @@ -490,7 +498,7 @@ jobs: ) pool: - vmImage: 'windows-latest' + vmImage: 'ubuntu-latest' steps: From 8d5bf3acd105f4091166bfdd825e1d1c900466c7 Mon Sep 17 00:00:00 2001 From: Robin Jones Date: Fri, 14 Jun 2024 18:12:44 +0100 Subject: [PATCH 02/25] Test using GH action instead --- .github/workflows/smoketest-build.yml | 0 azure-pipelines.yml | 10 +++++----- 2 files changed, 5 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/smoketest-build.yml diff --git a/.github/workflows/smoketest-build.yml b/.github/workflows/smoketest-build.yml new file mode 100644 index 00000000..e69de29b diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 68a0207f..b0861e63 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -175,10 +175,10 @@ jobs: - Check_Build_Options strategy: matrix: - linux: - imageName: 'ubuntu-latest' - # windows: - # imageName: 'windows-latest' + # linux: + # imageName: 'ubuntu-latest' + windows: + imageName: 'windows-latest' # macos: # imageName: 'macos-latest' @@ -190,7 +190,7 @@ jobs: - name: DOTNET_NOLOGO value: true - name: buildPlatform - value: 'Any CPU' + value: 'x64' - name: buildConfiguration value: 'Release' - name: solution From 6b7e1dddbf918190a9627cb56279de8a82983819 Mon Sep 17 00:00:00 2001 From: Robin Jones Date: Fri, 14 Jun 2024 18:18:08 +0100 Subject: [PATCH 03/25] Add smoke build content --- .github/workflows/smoketest-build.yml | 28 +++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/.github/workflows/smoketest-build.yml b/.github/workflows/smoketest-build.yml index e69de29b..58e58619 100644 --- a/.github/workflows/smoketest-build.yml +++ b/.github/workflows/smoketest-build.yml @@ -0,0 +1,28 @@ +name: Smoke-Build + +on: + pull_request: + branches: + - test-pipeline-build +jobs: + build: + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: '8.0.x' + + - name: Restore NuGet packages + run: dotnet restore + + - name: Build solution + run: dotnet build --configuration Release From 11b20dc92ec5d62084266a31f4acfe7c4a031beb Mon Sep 17 00:00:00 2001 From: Robin Jones Date: Fri, 14 Jun 2024 18:22:49 +0100 Subject: [PATCH 04/25] Fix yaml --- .github/workflows/smoketest-build.yml | 38 +++++++++++++-------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/.github/workflows/smoketest-build.yml b/.github/workflows/smoketest-build.yml index 58e58619..02892780 100644 --- a/.github/workflows/smoketest-build.yml +++ b/.github/workflows/smoketest-build.yml @@ -1,28 +1,28 @@ name: Smoke-Build on: - pull_request: - branches: - - test-pipeline-build + pull_request: + branches: + - test-pipeline-build jobs: - build: - runs-on: ${{ matrix.os }} + build: + runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-latest, windows-latest, macos-latest] + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] - steps: - - name: Checkout repository - uses: actions/checkout@v4 + steps: + - name: Checkout repository + uses: actions/checkout@v4 - - name: Setup .NET - uses: actions/setup-dotnet@v4 - with: - dotnet-version: '8.0.x' + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: '8.0.x' - - name: Restore NuGet packages - run: dotnet restore + - name: Restore NuGet packages + run: dotnet restore - - name: Build solution - run: dotnet build --configuration Release + - name: Build solution + run: dotnet build --configuration Release From 58f6a7ee8ede46775023670be58cefbfa2f7dfa2 Mon Sep 17 00:00:00 2001 From: Robin Jones Date: Fri, 14 Jun 2024 18:26:34 +0100 Subject: [PATCH 05/25] Further fix. --- .github/workflows/smoketest-build.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/smoketest-build.yml b/.github/workflows/smoketest-build.yml index 02892780..3d45f32a 100644 --- a/.github/workflows/smoketest-build.yml +++ b/.github/workflows/smoketest-build.yml @@ -1,9 +1,11 @@ name: Smoke-Build on: - pull_request: + push: branches: - test-pipeline-build + pull_request: + jobs: build: runs-on: ${{ matrix.os }} From c046b0a896f1f0bca84b4b4f5132932c2199812d Mon Sep 17 00:00:00 2001 From: Robin Jones Date: Fri, 14 Jun 2024 18:35:40 +0100 Subject: [PATCH 06/25] Only smoketest windows to start. --- .github/workflows/smoketest-build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/smoketest-build.yml b/.github/workflows/smoketest-build.yml index 3d45f32a..c4b172ea 100644 --- a/.github/workflows/smoketest-build.yml +++ b/.github/workflows/smoketest-build.yml @@ -4,7 +4,7 @@ on: push: branches: - test-pipeline-build - pull_request: +# pull_request: jobs: build: @@ -12,7 +12,7 @@ jobs: strategy: matrix: - os: [ubuntu-latest, windows-latest, macos-latest] + os: [windows-latest] #, ubuntu-latest, macos-latest] steps: - name: Checkout repository From 2873780478a7e8a9a8a9040b740c612f3eaacb0f Mon Sep 17 00:00:00 2001 From: Robin Jones Date: Fri, 14 Jun 2024 18:41:41 +0100 Subject: [PATCH 07/25] Install nbgv tool --- .github/workflows/smoketest-build.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/smoketest-build.yml b/.github/workflows/smoketest-build.yml index c4b172ea..48de5cbe 100644 --- a/.github/workflows/smoketest-build.yml +++ b/.github/workflows/smoketest-build.yml @@ -23,6 +23,9 @@ jobs: with: dotnet-version: '8.0.x' + - name: Install dependencies + run: dotnet tool install --global nbgv + - name: Restore NuGet packages run: dotnet restore From ddc161cbdf7af70e9e00510225209e6270c7147a Mon Sep 17 00:00:00 2001 From: Robin Jones Date: Fri, 14 Jun 2024 18:53:27 +0100 Subject: [PATCH 08/25] Update nbgv --- .../nanoFirmwareFlasher.Library.csproj | 2 +- nanoFirmwareFlasher.Library/packages.lock.json | 12 ++++++------ .../nanoFirmwareFlasher.Tool.csproj | 2 +- nanoFirmwareFlasher.Tool/packages.lock.json | 6 +++--- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/nanoFirmwareFlasher.Library/nanoFirmwareFlasher.Library.csproj b/nanoFirmwareFlasher.Library/nanoFirmwareFlasher.Library.csproj index 386a6d4d..25c8e65d 100644 --- a/nanoFirmwareFlasher.Library/nanoFirmwareFlasher.Library.csproj +++ b/nanoFirmwareFlasher.Library/nanoFirmwareFlasher.Library.csproj @@ -64,7 +64,7 @@ - + diff --git a/nanoFirmwareFlasher.Library/packages.lock.json b/nanoFirmwareFlasher.Library/packages.lock.json index a8682335..b7cac9a4 100644 --- a/nanoFirmwareFlasher.Library/packages.lock.json +++ b/nanoFirmwareFlasher.Library/packages.lock.json @@ -47,9 +47,9 @@ }, "Nerdbank.GitVersioning": { "type": "Direct", - "requested": "[3.6.133, )", - "resolved": "3.6.133", - "contentHash": "VZWMd5YAeDxpjWjAP/X6bAxnRMiEf6tES/ITN0X5CHJgkWLLeHGmEALivmTAfYM6P+P/3Szy6VCITUAkqjcHVw==" + "requested": "[3.6.139, )", + "resolved": "3.6.139", + "contentHash": "rq0Ub/Jik7PtMtZtLn0tHuJ01Yt36RQ+eeBe+S7qnJ/EFOX6D4T9zuYD3vQPYKGI6Ro4t2iWgFm3fGDgjBrMfg==" }, "Newtonsoft.Json": { "type": "Direct", @@ -315,9 +315,9 @@ }, "Nerdbank.GitVersioning": { "type": "Direct", - "requested": "[3.6.133, )", - "resolved": "3.6.133", - "contentHash": "VZWMd5YAeDxpjWjAP/X6bAxnRMiEf6tES/ITN0X5CHJgkWLLeHGmEALivmTAfYM6P+P/3Szy6VCITUAkqjcHVw==" + "requested": "[3.6.139, )", + "resolved": "3.6.139", + "contentHash": "rq0Ub/Jik7PtMtZtLn0tHuJ01Yt36RQ+eeBe+S7qnJ/EFOX6D4T9zuYD3vQPYKGI6Ro4t2iWgFm3fGDgjBrMfg==" }, "Newtonsoft.Json": { "type": "Direct", diff --git a/nanoFirmwareFlasher.Tool/nanoFirmwareFlasher.Tool.csproj b/nanoFirmwareFlasher.Tool/nanoFirmwareFlasher.Tool.csproj index 5b99d8a7..59b39d8b 100644 --- a/nanoFirmwareFlasher.Tool/nanoFirmwareFlasher.Tool.csproj +++ b/nanoFirmwareFlasher.Tool/nanoFirmwareFlasher.Tool.csproj @@ -48,7 +48,7 @@ - + diff --git a/nanoFirmwareFlasher.Tool/packages.lock.json b/nanoFirmwareFlasher.Tool/packages.lock.json index f6dc1b8c..086fbb3c 100644 --- a/nanoFirmwareFlasher.Tool/packages.lock.json +++ b/nanoFirmwareFlasher.Tool/packages.lock.json @@ -27,9 +27,9 @@ }, "Nerdbank.GitVersioning": { "type": "Direct", - "requested": "[3.6.133, )", - "resolved": "3.6.133", - "contentHash": "VZWMd5YAeDxpjWjAP/X6bAxnRMiEf6tES/ITN0X5CHJgkWLLeHGmEALivmTAfYM6P+P/3Szy6VCITUAkqjcHVw==" + "requested": "[3.6.139, )", + "resolved": "3.6.139", + "contentHash": "rq0Ub/Jik7PtMtZtLn0tHuJ01Yt36RQ+eeBe+S7qnJ/EFOX6D4T9zuYD3vQPYKGI6Ro4t2iWgFm3fGDgjBrMfg==" }, "Fody": { "type": "Transitive", From 2296a34240fac7de57a8ecaa972b7d6965ac4652 Mon Sep 17 00:00:00 2001 From: Robin Jones Date: Fri, 14 Jun 2024 19:05:59 +0100 Subject: [PATCH 09/25] let solution restore nugets --- .github/workflows/smoketest-build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/smoketest-build.yml b/.github/workflows/smoketest-build.yml index 48de5cbe..ffa75ec6 100644 --- a/.github/workflows/smoketest-build.yml +++ b/.github/workflows/smoketest-build.yml @@ -23,11 +23,11 @@ jobs: with: dotnet-version: '8.0.x' - - name: Install dependencies - run: dotnet tool install --global nbgv + # - name: Install dependencies + # run: dotnet tool install --global nbgv - - name: Restore NuGet packages - run: dotnet restore + # - name: Restore NuGet packages + # run: dotnet restore - name: Build solution run: dotnet build --configuration Release From e6a477b951c1820e44e028f0ecb4546195721d34 Mon Sep 17 00:00:00 2001 From: Robin Jones Date: Fri, 14 Jun 2024 19:12:34 +0100 Subject: [PATCH 10/25] Handle versioning --- .github/workflows/smoketest-build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/smoketest-build.yml b/.github/workflows/smoketest-build.yml index ffa75ec6..f9c54417 100644 --- a/.github/workflows/smoketest-build.yml +++ b/.github/workflows/smoketest-build.yml @@ -23,11 +23,11 @@ jobs: with: dotnet-version: '8.0.x' - # - name: Install dependencies - # run: dotnet tool install --global nbgv + - name: Restore NuGet packages + run: dotnet restore - # - name: Restore NuGet packages - # run: dotnet restore + - name: Handle versioning + run: nbgv cloud -a -c - name: Build solution run: dotnet build --configuration Release From ead74ff16f310c03dbfe06aaaa6618a0b5985c04 Mon Sep 17 00:00:00 2001 From: Robin Jones Date: Fri, 14 Jun 2024 19:22:36 +0100 Subject: [PATCH 11/25] Add GH token Re-order tasks --- .github/workflows/smoketest-build.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/smoketest-build.yml b/.github/workflows/smoketest-build.yml index f9c54417..31da2971 100644 --- a/.github/workflows/smoketest-build.yml +++ b/.github/workflows/smoketest-build.yml @@ -7,13 +7,18 @@ on: # pull_request: jobs: + build: - runs-on: ${{ matrix.os }} strategy: matrix: os: [windows-latest] #, ubuntu-latest, macos-latest] + runs-on: ${{ matrix.os }} + + env: + GITHUB_TOKEN: ${{ github.token }} + steps: - name: Checkout repository uses: actions/checkout@v4 @@ -23,11 +28,11 @@ jobs: with: dotnet-version: '8.0.x' - - name: Restore NuGet packages - run: dotnet restore + # - name: Restore NuGet packages + # run: dotnet restore - - name: Handle versioning - run: nbgv cloud -a -c + # - name: Handle versioning + # run: nbgv cloud -a -c - name: Build solution run: dotnet build --configuration Release From b0a4c62713a4c8a52e097b973fc10254a29003b5 Mon Sep 17 00:00:00 2001 From: Robin Jones Date: Fri, 14 Jun 2024 19:27:05 +0100 Subject: [PATCH 12/25] Temp uninstall GH versioning. --- .../nanoFirmwareFlasher.Library.csproj | 1 - nanoFirmwareFlasher.Library/packages.lock.json | 12 ------------ .../nanoFirmwareFlasher.Tool.csproj | 1 - nanoFirmwareFlasher.Tool/packages.lock.json | 6 ------ 4 files changed, 20 deletions(-) diff --git a/nanoFirmwareFlasher.Library/nanoFirmwareFlasher.Library.csproj b/nanoFirmwareFlasher.Library/nanoFirmwareFlasher.Library.csproj index 25c8e65d..7453fd98 100644 --- a/nanoFirmwareFlasher.Library/nanoFirmwareFlasher.Library.csproj +++ b/nanoFirmwareFlasher.Library/nanoFirmwareFlasher.Library.csproj @@ -64,7 +64,6 @@ - diff --git a/nanoFirmwareFlasher.Library/packages.lock.json b/nanoFirmwareFlasher.Library/packages.lock.json index b7cac9a4..0886c509 100644 --- a/nanoFirmwareFlasher.Library/packages.lock.json +++ b/nanoFirmwareFlasher.Library/packages.lock.json @@ -45,12 +45,6 @@ "System.IO.Ports": "7.0.0" } }, - "Nerdbank.GitVersioning": { - "type": "Direct", - "requested": "[3.6.139, )", - "resolved": "3.6.139", - "contentHash": "rq0Ub/Jik7PtMtZtLn0tHuJ01Yt36RQ+eeBe+S7qnJ/EFOX6D4T9zuYD3vQPYKGI6Ro4t2iWgFm3fGDgjBrMfg==" - }, "Newtonsoft.Json": { "type": "Direct", "requested": "[13.0.3, )", @@ -313,12 +307,6 @@ "System.IO.Ports": "7.0.0" } }, - "Nerdbank.GitVersioning": { - "type": "Direct", - "requested": "[3.6.139, )", - "resolved": "3.6.139", - "contentHash": "rq0Ub/Jik7PtMtZtLn0tHuJ01Yt36RQ+eeBe+S7qnJ/EFOX6D4T9zuYD3vQPYKGI6Ro4t2iWgFm3fGDgjBrMfg==" - }, "Newtonsoft.Json": { "type": "Direct", "requested": "[13.0.3, )", diff --git a/nanoFirmwareFlasher.Tool/nanoFirmwareFlasher.Tool.csproj b/nanoFirmwareFlasher.Tool/nanoFirmwareFlasher.Tool.csproj index 59b39d8b..cca71c8f 100644 --- a/nanoFirmwareFlasher.Tool/nanoFirmwareFlasher.Tool.csproj +++ b/nanoFirmwareFlasher.Tool/nanoFirmwareFlasher.Tool.csproj @@ -48,7 +48,6 @@ - diff --git a/nanoFirmwareFlasher.Tool/packages.lock.json b/nanoFirmwareFlasher.Tool/packages.lock.json index 086fbb3c..a0079bed 100644 --- a/nanoFirmwareFlasher.Tool/packages.lock.json +++ b/nanoFirmwareFlasher.Tool/packages.lock.json @@ -25,12 +25,6 @@ "System.IO.Ports": "7.0.0" } }, - "Nerdbank.GitVersioning": { - "type": "Direct", - "requested": "[3.6.139, )", - "resolved": "3.6.139", - "contentHash": "rq0Ub/Jik7PtMtZtLn0tHuJ01Yt36RQ+eeBe+S7qnJ/EFOX6D4T9zuYD3vQPYKGI6Ro4t2iWgFm3fGDgjBrMfg==" - }, "Fody": { "type": "Transitive", "resolved": "4.2.1", From bf7bea20ac09941313c5293864d9b01ec774f25c Mon Sep 17 00:00:00 2001 From: Robin Jones Date: Fri, 14 Jun 2024 19:30:24 +0100 Subject: [PATCH 13/25] Run on all platforms --- .github/workflows/smoketest-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/smoketest-build.yml b/.github/workflows/smoketest-build.yml index 31da2971..2fca84b0 100644 --- a/.github/workflows/smoketest-build.yml +++ b/.github/workflows/smoketest-build.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: - os: [windows-latest] #, ubuntu-latest, macos-latest] + os: [windows-latest, ubuntu-latest, macos-latest] runs-on: ${{ matrix.os }} From 72e336a1f58f6ef48b27cbf613dafecc581c41ce Mon Sep 17 00:00:00 2001 From: Robin Jones Date: Fri, 14 Jun 2024 19:51:53 +0100 Subject: [PATCH 14/25] Improve build speed --- azure-pipelines.yml | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 8b712480..3ee81428 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -39,7 +39,7 @@ jobs: ############################## - job: Check_Build_Options pool: - vmImage: 'windows-latest' + vmImage: 'ubuntu-latest' steps: @@ -173,24 +173,16 @@ jobs: ) dependsOn: - Check_Build_Options - strategy: - matrix: - # linux: - # imageName: 'ubuntu-latest' - windows: - imageName: 'windows-latest' - # macos: - # imageName: 'macos-latest' pool: - vmImage: '$(imageName)' + vmImage: 'windows-latest' variables: - group: sign-client-credentials - name: DOTNET_NOLOGO value: true - name: buildPlatform - value: 'x64' + value: 'Any CPU' - name: buildConfiguration value: 'Release' - name: solution From a13595f05642b50b865d9697f83a9096ad4e5a21 Mon Sep 17 00:00:00 2001 From: Robin Jones Date: Fri, 14 Jun 2024 20:01:10 +0100 Subject: [PATCH 15/25] Re-add Nerdbank.GitVersioning to tool --- nanoFirmwareFlasher.Tool/nanoFirmwareFlasher.Tool.csproj | 4 ++++ nanoFirmwareFlasher.Tool/packages.lock.json | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/nanoFirmwareFlasher.Tool/nanoFirmwareFlasher.Tool.csproj b/nanoFirmwareFlasher.Tool/nanoFirmwareFlasher.Tool.csproj index cca71c8f..e0235472 100644 --- a/nanoFirmwareFlasher.Tool/nanoFirmwareFlasher.Tool.csproj +++ b/nanoFirmwareFlasher.Tool/nanoFirmwareFlasher.Tool.csproj @@ -48,6 +48,10 @@ + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/nanoFirmwareFlasher.Tool/packages.lock.json b/nanoFirmwareFlasher.Tool/packages.lock.json index a0079bed..086fbb3c 100644 --- a/nanoFirmwareFlasher.Tool/packages.lock.json +++ b/nanoFirmwareFlasher.Tool/packages.lock.json @@ -25,6 +25,12 @@ "System.IO.Ports": "7.0.0" } }, + "Nerdbank.GitVersioning": { + "type": "Direct", + "requested": "[3.6.139, )", + "resolved": "3.6.139", + "contentHash": "rq0Ub/Jik7PtMtZtLn0tHuJ01Yt36RQ+eeBe+S7qnJ/EFOX6D4T9zuYD3vQPYKGI6Ro4t2iWgFm3fGDgjBrMfg==" + }, "Fody": { "type": "Transitive", "resolved": "4.2.1", From b49b414369b76fe504c9efc3c8e2d696ec1e4e20 Mon Sep 17 00:00:00 2001 From: Robin Jones Date: Fri, 14 Jun 2024 20:25:03 +0100 Subject: [PATCH 16/25] Test copying version file Revert pipeline to x64 --- .github/workflows/smoketest-build.yml | 9 +++------ azure-pipelines.yml | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/smoketest-build.yml b/.github/workflows/smoketest-build.yml index 2fca84b0..02a3be17 100644 --- a/.github/workflows/smoketest-build.yml +++ b/.github/workflows/smoketest-build.yml @@ -28,11 +28,8 @@ jobs: with: dotnet-version: '8.0.x' - # - name: Restore NuGet packages - # run: dotnet restore - - # - name: Handle versioning - # run: nbgv cloud -a -c + - name: Handle versioning + run: cp ./version.json ./nanoFirmwareFlasher.Tool/ - name: Build solution - run: dotnet build --configuration Release + run: dotnet build diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 3ee81428..3ce9eebd 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -182,7 +182,7 @@ jobs: - name: DOTNET_NOLOGO value: true - name: buildPlatform - value: 'Any CPU' + value: 'x64' # TODO: Attempt to aim for Arm64 builds - name: buildConfiguration value: 'Release' - name: solution From cb816783431e8650cb41c588b8fbef5f21121d9b Mon Sep 17 00:00:00 2001 From: Robin Jones Date: Fri, 14 Jun 2024 20:30:42 +0100 Subject: [PATCH 17/25] Use fetch-depth for versioning. --- .github/workflows/smoketest-build.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/smoketest-build.yml b/.github/workflows/smoketest-build.yml index 02a3be17..4ccef092 100644 --- a/.github/workflows/smoketest-build.yml +++ b/.github/workflows/smoketest-build.yml @@ -22,14 +22,16 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 + with: + fetch-depth: '5' - name: Setup .NET uses: actions/setup-dotnet@v4 with: dotnet-version: '8.0.x' - - name: Handle versioning - run: cp ./version.json ./nanoFirmwareFlasher.Tool/ + # - name: Handle versioning + # run: cp ./version.json ./nanoFirmwareFlasher.Tool/ - name: Build solution run: dotnet build From 3eb4a2002acf13f0747393f413e8daf174902e9c Mon Sep 17 00:00:00 2001 From: Robin Jones Date: Fri, 14 Jun 2024 20:33:12 +0100 Subject: [PATCH 18/25] Try a full depth collection. --- .github/workflows/smoketest-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/smoketest-build.yml b/.github/workflows/smoketest-build.yml index 4ccef092..ebcbef3e 100644 --- a/.github/workflows/smoketest-build.yml +++ b/.github/workflows/smoketest-build.yml @@ -23,7 +23,7 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 with: - fetch-depth: '5' + fetch-depth: '0' # Allow all history to be fetched. - name: Setup .NET uses: actions/setup-dotnet@v4 From 36341f816bba2d70a9e222c84a788a1f82972d60 Mon Sep 17 00:00:00 2001 From: Robin Jones Date: Fri, 14 Jun 2024 20:37:14 +0100 Subject: [PATCH 19/25] Re-add versioning to lib. --- .../nanoFirmwareFlasher.Library.csproj | 4 ++++ nanoFirmwareFlasher.Library/packages.lock.json | 12 ++++++++++++ 2 files changed, 16 insertions(+) diff --git a/nanoFirmwareFlasher.Library/nanoFirmwareFlasher.Library.csproj b/nanoFirmwareFlasher.Library/nanoFirmwareFlasher.Library.csproj index c507732f..bc40e163 100644 --- a/nanoFirmwareFlasher.Library/nanoFirmwareFlasher.Library.csproj +++ b/nanoFirmwareFlasher.Library/nanoFirmwareFlasher.Library.csproj @@ -63,6 +63,10 @@ + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/nanoFirmwareFlasher.Library/packages.lock.json b/nanoFirmwareFlasher.Library/packages.lock.json index 2ce9575e..b2cab85b 100644 --- a/nanoFirmwareFlasher.Library/packages.lock.json +++ b/nanoFirmwareFlasher.Library/packages.lock.json @@ -45,6 +45,12 @@ "System.IO.Ports": "7.0.0" } }, + "Nerdbank.GitVersioning": { + "type": "Direct", + "requested": "[3.6.139, )", + "resolved": "3.6.139", + "contentHash": "rq0Ub/Jik7PtMtZtLn0tHuJ01Yt36RQ+eeBe+S7qnJ/EFOX6D4T9zuYD3vQPYKGI6Ro4t2iWgFm3fGDgjBrMfg==" + }, "Newtonsoft.Json": { "type": "Direct", "requested": "[13.0.3, )", @@ -307,6 +313,12 @@ "System.IO.Ports": "7.0.0" } }, + "Nerdbank.GitVersioning": { + "type": "Direct", + "requested": "[3.6.139, )", + "resolved": "3.6.139", + "contentHash": "rq0Ub/Jik7PtMtZtLn0tHuJ01Yt36RQ+eeBe+S7qnJ/EFOX6D4T9zuYD3vQPYKGI6Ro4t2iWgFm3fGDgjBrMfg==" + }, "Newtonsoft.Json": { "type": "Direct", "requested": "[13.0.3, )", From 225a9344dd4b9eaebd53956766d7652bf37cac90 Mon Sep 17 00:00:00 2001 From: Robin Jones Date: Fri, 14 Jun 2024 20:41:20 +0100 Subject: [PATCH 20/25] Revert build option change --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 3ce9eebd..1f9c1d12 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -39,7 +39,7 @@ jobs: ############################## - job: Check_Build_Options pool: - vmImage: 'ubuntu-latest' + vmImage: 'windows-latest' steps: From 18dbd283889cc08859598e80fe190c4d432e86a4 Mon Sep 17 00:00:00 2001 From: Robin Jones Date: Fri, 14 Jun 2024 20:44:13 +0100 Subject: [PATCH 21/25] Improve smoketest CI --- .github/workflows/smoketest-build.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/smoketest-build.yml b/.github/workflows/smoketest-build.yml index ebcbef3e..7dd998dc 100644 --- a/.github/workflows/smoketest-build.yml +++ b/.github/workflows/smoketest-build.yml @@ -3,8 +3,8 @@ name: Smoke-Build on: push: branches: - - test-pipeline-build -# pull_request: + - main + pull_request: jobs: @@ -23,15 +23,12 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 with: - fetch-depth: '0' # Allow all history to be fetched. + fetch-depth: '0' # Allow all history to be fetched (required for versioning). - name: Setup .NET uses: actions/setup-dotnet@v4 with: dotnet-version: '8.0.x' - # - name: Handle versioning - # run: cp ./version.json ./nanoFirmwareFlasher.Tool/ - - name: Build solution run: dotnet build From 46d89c5496c89ad9c68624af871f4ab044daa00b Mon Sep 17 00:00:00 2001 From: Robin Jones Date: Fri, 14 Jun 2024 20:47:07 +0100 Subject: [PATCH 22/25] Remove env --- .github/workflows/smoketest-build.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/smoketest-build.yml b/.github/workflows/smoketest-build.yml index 7dd998dc..20588447 100644 --- a/.github/workflows/smoketest-build.yml +++ b/.github/workflows/smoketest-build.yml @@ -16,9 +16,6 @@ jobs: runs-on: ${{ matrix.os }} - env: - GITHUB_TOKEN: ${{ github.token }} - steps: - name: Checkout repository uses: actions/checkout@v4 From 9d4b1c1b51a5f105b895dfb57a98695ce8c3ff39 Mon Sep 17 00:00:00 2001 From: Robin Jones Date: Fri, 14 Jun 2024 20:56:06 +0100 Subject: [PATCH 23/25] Revert discord webhook pool change. --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 1f9c1d12..251b9360 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -501,7 +501,7 @@ jobs: ) pool: - vmImage: 'ubuntu-latest' + vmImage: 'windows-latest' steps: From 75f21441365acd6f13b39e5fb133f1bdda9e0cb4 Mon Sep 17 00:00:00 2001 From: Robin Jones Date: Fri, 14 Jun 2024 21:05:52 +0100 Subject: [PATCH 24/25] Add build to handle .Net Mono --- .github/workflows/smoketest-build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/smoketest-build.yml b/.github/workflows/smoketest-build.yml index 20588447..55ca5e4d 100644 --- a/.github/workflows/smoketest-build.yml +++ b/.github/workflows/smoketest-build.yml @@ -13,6 +13,7 @@ jobs: strategy: matrix: os: [windows-latest, ubuntu-latest, macos-latest] + dotnet-ver: ['8.0.x', '6.12.0'] # 6.0.x is the latest version available for .Net Mono runs-on: ${{ matrix.os }} @@ -25,7 +26,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v4 with: - dotnet-version: '8.0.x' + dotnet-version: ${{ matrix.dotnet-ver }} - name: Build solution run: dotnet build From 1a485dc6b84882e4534db36d838f94a76c0d7364 Mon Sep 17 00:00:00 2001 From: Robin Jones Date: Fri, 14 Jun 2024 21:09:09 +0100 Subject: [PATCH 25/25] Change matrix for net6 --- .github/workflows/smoketest-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/smoketest-build.yml b/.github/workflows/smoketest-build.yml index 55ca5e4d..7aedf4c5 100644 --- a/.github/workflows/smoketest-build.yml +++ b/.github/workflows/smoketest-build.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: os: [windows-latest, ubuntu-latest, macos-latest] - dotnet-ver: ['8.0.x', '6.12.0'] # 6.0.x is the latest version available for .Net Mono + dotnet-ver: ['8.0.x', '6.0.x'] # 6.0.x is the latest version available for .Net Mono runs-on: ${{ matrix.os }}