Skip to content

Commit

Permalink
Also build for net8.0 (#332)
Browse files Browse the repository at this point in the history
* Also build for net8.0
* Make GHA workflow run .NET 6 and 8
* Update setup-dotnet action

v2.1.0 was still trying to build against win7-x32 runtimes, which are no
longer offered in .NET 8. If we're using recent .NET, we need a recent
setup-dotnet version.

* Fix RuntimeIdentifiers
* Suppress WiX validation as per WiX docs
* Ignore flaky test on Linux, too

The GitHub Actions runners are apparently slow to deliver filesystem
notifications, which is exactly the scenario that makes this test
useless. It's already disabled on Windows; there's no reason for it to
cause the CI build to fail all the time when it's the only failing test.
  • Loading branch information
rmunn authored Mar 20, 2024
1 parent 04eda79 commit 04e1e28
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 7 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/ci+cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,18 @@ jobs:
fetch-depth: 0 # fetch full history for GitVersion

- name: Setup .NET
uses: actions/setup-dotnet@c0d4ad69d8bd405d234f1c9166d383b7a4f69ed8 # v2.1.0
uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 # v4.0.0
with:
dotnet-version: 6.0.x
dotnet-version: |
6.0.x
8.0.x
- name: Restore
run: dotnet restore

- name: Build
run: dotnet build --no-restore -c Release

- name: Install python2 for test execution
run: sudo apt-get install python2
if: matrix.os == 'ubuntu-latest'
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ See full changelog at https://github.com/sillsdev/chorus/blob/master/CHANGELOG.m
RuntimeIdentifiers when building with .NET 5 on AppVeyor. Otherwise the build
fails with an error that there is no target for'net461/win7-x86'. -->
<PlatformTarget>AnyCPU</PlatformTarget>
<RuntimeIdentifiers>win7-x86;win7-x64</RuntimeIdentifiers>
<RuntimeIdentifiers>win-x86;win-x64</RuntimeIdentifiers>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion src/ChorusMerge/ChorusMerge.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<AssemblyTitle>ChorusMerge</AssemblyTitle>
<PackageId>SIL.Chorus.ChorusMerge</PackageId>
<OutputType>Exe</OutputType>
<TargetFrameworks>net461;net6.0</TargetFrameworks>
<TargetFrameworks>net461;net6.0;net8.0</TargetFrameworks>
<RepositoryUrl>https://github.com/sillsdev/chorus.git</RepositoryUrl>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>
Expand Down
2 changes: 2 additions & 0 deletions src/Installer/ChorusMergeModule.wixproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
<DefineConstants>ProductVersion=$(ProductVersion)</DefineConstants>
<DefineConstants Condition="'$(Configuration)' == 'Debug'">Debug;$(DefineConstants)</DefineConstants>
<SuppressPdbOutput>True</SuppressPdbOutput>
<!-- Per https://wixtoolset.org/docs/tools/validation/, validation doesn't work in CIs like GitHub Actions -->
<SuppressValidation>true</SuppressValidation>
</PropertyGroup>
<ItemGroup>
<Compile Include="GeneratedMercurial.wxs" />
Expand Down
2 changes: 1 addition & 1 deletion src/LibChorusTests/LibChorus.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<RootNamespace>LibChorus.Tests</RootNamespace>
<AssemblyTitle>LibChorus.Tests</AssemblyTitle>
<Description>Unit tests for LibChorus.dll</Description>
<TargetFrameworks>net461;net6.0</TargetFrameworks>
<TargetFrameworks>net461;net6.0;net8.0</TargetFrameworks>
<IsTestProject>true</IsTestProject>
<IsPackable>false</IsPackable>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/LibChorusTests/notes/AnnotationRepositoryTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ public void AddAnnotation_NotifiesIndices()
// the setup of the watcher or the code in Save that tries to prevent the notifications at all,
// which is more than half the code this test wants to exercise.
[Test]
[Platform(Exclude = "Win", Reason = "flaky (on both platforms)")]
[Ignore("flaky (on both platforms)")]
public void ExternalFileModification_NotifiesIndices_ButSaveDoesNot()
{
const int SleepTime = 25; // milliseconds
Expand Down

0 comments on commit 04e1e28

Please sign in to comment.