From 3185d1fccfffab010990d57f3a3f0c0fa14a297a Mon Sep 17 00:00:00 2001 From: Michael Croes Date: Sun, 23 Jul 2023 22:48:52 +0200 Subject: [PATCH 1/6] fix: Revert Ubuntu target back to 20.04 for snap7 ppa availability --- .github/workflows/dotnet.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 16e7a337..15b16f7a 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -71,14 +71,14 @@ jobs: artifacts: ${{ github.workspace }}/artifacts strategy: matrix: - os: [windows-latest, ubuntu-22.04, macos-latest] + os: [windows-latest, ubuntu-20.04, macos-latest] test-framework: [net6.0, net7.0] include: - - os: ubuntu-22.04 + - os: ubuntu-20.04 test-framework: net6.0 installSnap7: true dotnet-sdk: '6.x' - - os: ubuntu-22.04 + - os: ubuntu-20.04 test-framework: net7.0 installSnap7: true dotnet-sdk: '7.x' From 7558b9a691aff643d6f68532457da9ab30709f8b Mon Sep 17 00:00:00 2001 From: Michael Croes Date: Sun, 23 Jul 2023 22:53:11 +0200 Subject: [PATCH 2/6] fix: Retarget test project to net462, net6.0 and net7.0 These are the frameworks currently used in the GitHub workflow, when missing the tests aren't executed and the job will succeed nonetheless. --- S7.Net.UnitTest/S7.Net.UnitTest.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/S7.Net.UnitTest/S7.Net.UnitTest.csproj b/S7.Net.UnitTest/S7.Net.UnitTest.csproj index eb63e48c..3a67af5a 100644 --- a/S7.Net.UnitTest/S7.Net.UnitTest.csproj +++ b/S7.Net.UnitTest/S7.Net.UnitTest.csproj @@ -1,7 +1,7 @@  - net452;netcoreapp3.1;net5.0 + net462;net6.0;net7.0 true Properties\S7.Net.snk From 53f651a482ce80fa84af3c692ec5d80d6162658e Mon Sep 17 00:00:00 2001 From: Michael Croes Date: Sun, 23 Jul 2023 22:58:37 +0200 Subject: [PATCH 3/6] fix: Constrain dotnet restore to matrix runtime --- .github/workflows/dotnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 15b16f7a..64d1ba57 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -131,7 +131,7 @@ jobs: ${{ runner.os }}-${{ matrix.test-framework }}-nuget - name: Restore - run: dotnet restore S7.Net.UnitTest + run: dotnet restore --runtime ${{ matrix.test-framework }} S7.Net.UnitTest - name: Test run: dotnet test --no-restore --nologo --verbosity normal --logger GitHubActions --framework ${{ matrix.test-framework }} From 18402604d109b82a78ba1bcf9742b39944b24f2e Mon Sep 17 00:00:00 2001 From: Michael Croes Date: Sun, 23 Jul 2023 23:04:03 +0200 Subject: [PATCH 4/6] feat: Add net462, net6.0 and net7.0 targeting to S7NetPlus This should be the actual baseline, which is also what the test project targets now. --- S7.Net/S7.Net.csproj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/S7.Net/S7.Net.csproj b/S7.Net/S7.Net.csproj index d41f08fe..bfe62f93 100644 --- a/S7.Net/S7.Net.csproj +++ b/S7.Net/S7.Net.csproj @@ -1,7 +1,7 @@  - net452;netstandard2.0;netstandard1.3;net5.0 + net452;net462;netstandard2.0;netstandard1.3;net5.0;net6.0;net7.0 true Properties\S7.Net.snk S7.Net.UnitTest @@ -23,11 +23,11 @@ true - + NET_FULL - + From 12ea40276980bf02f586bd30bbf20662de197ea6 Mon Sep 17 00:00:00 2001 From: Michael Croes Date: Sun, 23 Jul 2023 23:10:21 +0200 Subject: [PATCH 5/6] fix: Remove separate restore step --- .github/workflows/dotnet.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 64d1ba57..d974cfc9 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -129,12 +129,9 @@ jobs: key: ${{ runner.os }}-${{ matrix.test-framework }}-nuget-${{ hashFiles('**/packages.lock.json') }} restore-keys: | ${{ runner.os }}-${{ matrix.test-framework }}-nuget - - - name: Restore - run: dotnet restore --runtime ${{ matrix.test-framework }} S7.Net.UnitTest - name: Test - run: dotnet test --no-restore --nologo --verbosity normal --logger GitHubActions --framework ${{ matrix.test-framework }} + run: dotnet test --nologo --verbosity normal --logger GitHubActions --framework ${{ matrix.test-framework }} deploy: # Publish only when creating a GitHub Release From aa151451849ea8abe45edc75b5348510e8df2516 Mon Sep 17 00:00:00 2001 From: Michael Croes Date: Sun, 23 Jul 2023 23:15:30 +0200 Subject: [PATCH 6/6] fix: Install dotnet 7.x always --- .github/workflows/dotnet.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index d974cfc9..433f5d26 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -119,7 +119,9 @@ jobs: - name: Setup Dotnet uses: actions/setup-dotnet@v1 with: - dotnet-version: ${{ matrix.dotnet-sdk }} + dotnet-version: | + ${{ matrix.dotnet-sdk }} + 7.x - name: Nuget Cache uses: actions/cache@v2