Skip to content

Commit

Permalink
Switch to .Net9
Browse files Browse the repository at this point in the history
  • Loading branch information
notgiven688 authored Nov 17, 2024
1 parent 6d094eb commit 264a62e
Show file tree
Hide file tree
Showing 11 changed files with 39 additions and 26 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ jobs:
name: Build and deploy documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
cache: npm
Expand All @@ -27,7 +27,7 @@ jobs:
# Popular action to deploy to GitHub Pages:
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# Build output to publish to the `gh-pages` branch:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/jitter-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ jobs:
working-directory: ./src/JitterTests

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
dotnet-version: 9.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
Expand All @@ -36,7 +36,7 @@ jobs:
#run: dotnet test -c Release --no-restore --test-adapter-path:. --logger:"junit;LogFilePath=test-result.xml;MethodFormat=Class;FailureBodyFormat=Verbose"

- name: TestReport
uses: dorny/test-reporter@v1
uses: dorny/test-reporter@v4
if: success() || failure() # run this step even if previous step failed
with:
name: JitterTests # Name of the check run which will be created
Expand Down
27 changes: 18 additions & 9 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,15 @@ jobs:
working-directory: ./src/Jitter2

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Get all history to allow automatic versioning using MinVer

# Install the .NET SDK indicated in the global.json file
- name: Setup .NET
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x

- run: dotnet add package MinVer

Expand All @@ -49,7 +51,7 @@ jobs:
- run: dotnet pack --configuration Release --output ${{ env.NuGetDirectory }}

# Publish the NuGet package as an artifact, so they can be used in the following jobs
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: nuget
if-no-files-found: error
Expand All @@ -63,10 +65,12 @@ jobs:
steps:
# Install the .NET SDK indicated in the global.json file
- name: Setup .NET
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x

# Download the NuGet package created in the previous job
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: nuget
path: ${{ env.NuGetDirectory }}
Expand All @@ -89,9 +93,12 @@ jobs:
working-directory: ./src/Jitter2

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x

- name: Run tests
run: dotnet test --configuration Release

Expand All @@ -104,14 +111,16 @@ jobs:
needs: [ validate_nuget, run_test ]
steps:
# Download the NuGet package created in the previous job
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: nuget
path: ${{ env.NuGetDirectory }}

# Install the .NET SDK indicated in the global.json file
- name: Setup .NET Core
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x

# Publish all NuGet packages to NuGet.org
# Use --skip-duplicate to prevent errors if a package with the same version already exists.
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ jobs:
name: Build documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
cache: npm
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Jitter is cross-platform. The `src` directory contains four projects:

To run the demo scenes:

- Install [.NET 8.0](https://dotnet.microsoft.com/download/dotnet/8.0)
- Install [.NET 9.0](https://dotnet.microsoft.com/download/dotnet/9.0)
- `git clone https://github.com/notgiven688/jitterphysics2.git`
- `cd ./jitterphysics2/src/JitterDemo && dotnet run -c Release`

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/01_quickstart/00-project-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ sidebar_position: 1

### Requirements

Install the [.NET 8.0 SDK](https://dotnet.microsoft.com/download/dotnet/8.0).
Install the [.NET 9.0 SDK](https://dotnet.microsoft.com/download/dotnet/9.0).

Ensure that dotnet is correctly set up by executing the following command:

Expand Down
6 changes: 6 additions & 0 deletions src/Jitter2.slnx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<Solution>
<Project Path="Jitter2\Jitter2.csproj" />
<Project Path="JitterBenchmark\JitterBenchmark.csproj" />
<Project Path="JitterDemo\JitterDemo.csproj" />
<Project Path="JitterTests\JitterTests.csproj" />
</Solution>
2 changes: 1 addition & 1 deletion src/Jitter2/Jitter2.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>net7.0;net8.0;net9.0</TargetFrameworks>
<ImplicitUsings>disable</ImplicitUsings>
<Nullable>enable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
Expand Down
2 changes: 1 addition & 1 deletion src/JitterBenchmark/JitterBenchmark.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<TargetFramework>net9.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
3 changes: 1 addition & 2 deletions src/JitterDemo/JitterDemo.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
<OutputType Condition="'$(IsLinux)'=='true'">Exe</OutputType>
<OutputType Condition="'$(IsWindows)'=='true'">WinExe</OutputType>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<TargetFramework>net7.0</TargetFramework>
<DefineConstants>UNSAFE</DefineConstants>
</PropertyGroup>

Expand Down Expand Up @@ -65,7 +64,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>disable</ImplicitUsings>
<Nullable>enable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
Expand Down
3 changes: 1 addition & 2 deletions src/JitterTests/JitterTests.csproj
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

<IsPackable>false</IsPackable>
</PropertyGroup>

Expand Down

0 comments on commit 264a62e

Please sign in to comment.