Skip to content

Commit

Permalink
upgrade to .net 9
Browse files Browse the repository at this point in the history
  • Loading branch information
brettfo committed Apr 12, 2024
1 parent be6c658 commit 9c5dfeb
Show file tree
Hide file tree
Showing 15 changed files with 39 additions and 29 deletions.
5 changes: 3 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@
},
"features": {
"ghcr.io/devcontainers/features/dotnet:2": {
"version": "7.0"
"version": "9.0",
"additionalVersions": "7.0"
},
"ghcr.io/devcontainers/features/go:1": {
"version": "1.19"
},
"ghcr.io/devcontainers/features/node:1": {
"version": "18"
"version": "20"
}
},
"containerEnv": {
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ jobs:
matrix:
value: [{ os: windows-latest, architecture: x64 }, { os: windows-latest, architecture: arm64 }, { os: ubuntu-latest, architecture: x64 }]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-dotnet@v3
- uses: actions/setup-node@v3
- uses: actions/setup-dotnet@v4
- uses: actions/setup-node@v4
with:
node-version: 18
- uses: actions/setup-go@v3
node-version: 20
- uses: actions/setup-go@v5
with:
go-version: 1.19
- name: promote version suffix
Expand All @@ -42,12 +42,12 @@ jobs:
shell: pwsh
run: ./build-and-test.ps1 -configuration Release -architecture ${{ matrix.value.architecture }}
- name: publish artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ env.artifact_name }}
path: ${{ env.artifact_path }}
- name: publish secondary artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: env.secondary_artifact_name != ''
with:
name: ${{ env.secondary_artifact_name }}
Expand All @@ -57,7 +57,7 @@ jobs:
runs-on: ubuntu-latest
needs: create-version-suffix
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: devcontainers/[email protected]
Expand All @@ -75,12 +75,12 @@ jobs:
Write-Output "$name=$updated" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
}
- name: publish artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ env.artifact_name }}
path: ${{ env.artifact_path }}
- name: publish secondary artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: env.secondary_artifact_name != ''
with:
name: ${{ env.secondary_artifact_name }}
Expand All @@ -90,21 +90,21 @@ jobs:
runs-on: ubuntu-latest
needs: [build, cross_compile]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
path: src
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
path: artifacts
- name: create package feed data
run: ./src/create-package-feeds.sh --deb-dir artifacts/deb --deb-feed-path artifacts/deb-feed.tar.gz --win-dir artifacts/win --win-feed-path artifacts/win-feed.tar.gz
- name: publish deb package feed artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: deb-feed
path: artifacts/deb-feed.tar.gz
- name: publish win package feed artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: win-feed
path: artifacts/win-feed.tar.gz
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${workspaceFolder}/artifacts/bin/bcad/Debug/net7.0/bcad.exe",
"program": "${workspaceFolder}/artifacts/bin/bcad/Debug/net9.0/bcad.exe",
"args": [],
"cwd": "${workspaceFolder}/artifacts/bin/bcad/Debug/net7.0",
"cwd": "${workspaceFolder}/artifacts/bin/bcad/Debug/net9.0",
"console": "internalConsole",
"stopAtEntry": false
},
Expand Down
5 changes: 5 additions & 0 deletions build-and-test.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ try {
Push-Location "$PSScriptRoot/src/javascript-client"
npm i
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
if ($IsLinux -And $architecture -eq "arm64") {
# when cross-compiling for linux arm64, we specifically need the x64 version of icon-gen
npm install --platform=linux --arch=x64 icon-gen
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
}
npm run compile
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
Pop-Location
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "7.0.100",
"version": "9.0.100-preview.3.24204.13",
"rollForward": "latestMinor"
}
}
1 change: 1 addition & 0 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<Import Project="Packages.props" />

<PropertyGroup>
<AppTargetFramework>net9.0</AppTargetFramework>
<AssemblySearchPaths>{HintPathFromItem};{TargetFrameworkDirectory};{RawFileName}</AssemblySearchPaths>
<RepoRoot>$(MSBuildThisFileDirectory)..</RepoRoot>
<_VersionSuffix>$(VERSION_SUFFIX)</_VersionSuffix>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>$(AppTargetFramework)</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>$(AppTargetFramework)</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/IxMilia.BCad.Core.Test/IxMilia.BCad.Core.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>$(AppTargetFramework)</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>$(AppTargetFramework)</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>$(AppTargetFramework)</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/IxMilia.BCad.Lisp.Test/IxMilia.BCad.Lisp.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>$(AppTargetFramework)</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/IxMilia.BCad.Rpc.Test/IxMilia.BCad.Rpc.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>$(AppTargetFramework)</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/IxMilia.BCad.Rpc/IxMilia.BCad.Rpc.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>$(AppTargetFramework)</TargetFramework>
<NoWarn>VSTHRD200;$(NoWarn)</NoWarn><!-- Use "Async" suffix in names of methods that return an awaitable type. -->
</PropertyGroup>

Expand Down
7 changes: 5 additions & 2 deletions src/bcad/bcad.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>$(AppTargetFramework)</TargetFramework>
<ApplicationIcon>$(MSBuildThisFileDirectory)..\javascript-client\out\app.ico</ApplicationIcon>
<NoWarn>$(NoWarn);IL2026</NoWarn> <!-- {0}: Using member '{1}}' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. -->
<NoWarn>$(NoWarn);IL2104</NoWarn> <!-- Assembly '{0}}' produced trim warnings. -->
<NoWarn>$(NoWarn);IL3000</NoWarn> <!-- {0}: 'System.Reflection.Assembly.Location.get' always returns an empty string for assemblies embedded in a single-file app. If the path to the app directory is needed, consider calling 'System.AppContext.BaseDirectory'. -->
<NoWarn>$(NoWarn);IL3053</NoWarn> <!-- Assembly '{0}' produced AOT analysis warnings. -->
<OutputType Condition="'$(OS)' == 'Windows_NT'">WinExe</OutputType>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<PublishAot>true</PublishAot>
<StripSymbols>true</StripSymbols>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit 9c5dfeb

Please sign in to comment.