Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Aragas committed Dec 12, 2024
1 parent a6fc813 commit 28f1c0f
Show file tree
Hide file tree
Showing 5 changed files with 97 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches: [ master ]
paths:
- '.github/workflows/publish.yml'
- '.github/workflows/publish-packages.yml'
- 'src/**'
- 'build/**'

Expand Down
67 changes: 62 additions & 5 deletions .github/workflows/publish-standalone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,24 @@ env:
DOTNET_CLI_TELEMETRY_OPTOUT: true

jobs:
publish-standalone:
create-release:
name: Create Release
runs-on: ubuntu-latest
outputs:
release_id: ${{ steps.create_release.outputs.id }}
steps:
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: true

publish-native:
strategy:
matrix:
data: [
Expand All @@ -24,8 +41,9 @@ jobs:
{ rid: 'osx-x64', os: 'macos-13' },
{ rid: 'osx-arm64', os: 'macos-latest' }
]
name: Publish Standalone ${{ matrix.data.rid }}
name: Publish Native ${{ matrix.data.rid }}
runs-on: ${{ matrix.data.os }}
needs: create-release
steps:
- name: Setup
uses: butr/actions-common-setup@v2
Expand All @@ -40,8 +58,47 @@ jobs:
- name: Run _build
run: >-
dotnet publish src/BUTR.CrashReport.Renderer.ImGui.Standalone/BUTR.CrashReport.Renderer.ImGui.Standalone.csproj --configuration Release -r "${{ matrix.data.rid }}" -o "./pub";
Compress-Archive -Path pub/* -Destination "${{ matrix.data.rid }}-native.zip"
shell: pwsh

- name: Upload Release Assets
id: upload-release-assets
uses: dwenegar/upload-release-assets@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release_id: ${{ needs.create-release.outputs.release_id }}
assets_path: "${{ matrix.data.rid }}-native.zip"

publish-standard:
name: Publish Standard
runs-on: ubuntu-latest
needs: create-release
steps:
- name: Setup
uses: butr/actions-common-setup@v2
with:
github-token: ${{secrets.GITHUB_TOKEN}}

- uses: actions/upload-artifact@v4
- name: Setup .NET 9
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.x.x

- name: Run _build
run: >-
dotnet publish src/BUTR.CrashReport.Renderer.ImGui.Standalone/BUTR.CrashReport.Renderer.ImGui.Standalone.csproj --configuration Release -p:Runtime=true -o "./pub";
Compress-Archive -Path pub/* -Destination "${{ matrix.data.rid }}-net9.zip"
dotnet publish src/BUTR.CrashReport.Renderer.ImGui.Standalone/BUTR.CrashReport.Renderer.ImGui.Standalone.csproj --configuration Release -p:RuntimeSingleFile=true -o "./pub2";
Compress-Archive -Path pub2/* -Destination "${{ matrix.data.rid }}-net9-single-file.zip"
shell: pwsh

- name: Upload Release Assets
id: upload-release-assets
uses: dwenegar/upload-release-assets@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: ${{ matrix.data.rid }}
path: "./pub"
release_id: ${{ needs.create-release.outputs.release_id }}
assets_path: "${{ matrix.data.rid }}-net9-single-file.zip"
Original file line number Diff line number Diff line change
Expand Up @@ -9,32 +9,29 @@

<InvariantGlobalization>true</InvariantGlobalization>
<InvariantTimezone>true</InvariantTimezone>
<OptimizationPreference>Size</OptimizationPreference>

<PublishTrimmed>true</PublishTrimmed>
<TrimMode>full</TrimMode>
<EnableAggressiveTrimming>true</EnableAggressiveTrimming>

<TrimmerRemoveSymbols>true</TrimmerRemoveSymbols>

<CopyOutputSymbolsToPublishDirectory>false</CopyOutputSymbolsToPublishDirectory>

<!--
-->

<!-- 8MB .exe with native .dll -->
<CopyOutputSymbolsToPublishDirectory>false</CopyOutputSymbolsToPublishDirectory>
</PropertyGroup>
<PropertyGroup Condition="$(Runtime) == '' AND $(RuntimeSingleFile) == ''">
<PublishAot>true</PublishAot>
<OptimizationPreference>Size</OptimizationPreference>
</PropertyGroup>

<PropertyGroup Condition="$(Runtime) == 'true'">

</PropertyGroup>

<!-- 14MB .exe -->
<!--
<SelfContained>true</SelfContained>
<PropertyGroup Condition="$(RuntimeSingleFile) == 'true'">
<PublishSingleFile>true</PublishSingleFile>
<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>
<IncludeAllContentForSelfExtract>true</IncludeAllContentForSelfExtract>
<PublishTrimmed>true</PublishTrimmed>
<TrimMode>full</TrimMode>
<PublishReadyToRun>false</PublishReadyToRun>
-->
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@
<ItemGroup>
<PackageReference Include="ImGui.NET" Version="$(ImGuiVersion)" />
<PackageReference Include="ImGui.NET.SourceBuild" Version="$(ImGuiSourceVersion)" />


<PackageReference Include="System.Buffers" Version="4.6.0" />
<PackageReference Include="System.Numerics.Vectors" Version="4.6.0" />
</ItemGroup>

<ItemGroup>
Expand Down
23 changes: 19 additions & 4 deletions src/BUTR.CrashReport.sln
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BUTR.CrashReport", "BUTR.Cr
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{A3D68C79-7883-4B81-AE9A-E926FE80F65B}"
ProjectSection(SolutionItems) = preProject
..\.github\workflows\publish.yml = ..\.github\workflows\publish.yml
..\.github\workflows\publish-packages.yml = ..\.github\workflows\publish-packages.yml
..\.github\workflows\publish-wasm.yml = ..\.github\workflows\publish-wasm.yml
..\.github\workflows\publish-wasm-deploy.yml = ..\.github\workflows\publish-wasm-deploy.yml
..\.github\workflows\publish-standalone.yml = ..\.github\workflows\publish-standalone.yml
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{8013DEFB-F940-4891-9F74-BFE1A8106506}"
Expand Down Expand Up @@ -93,6 +94,14 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Renderers", "Renderers", "{71872CAF-7D4F-4A1E-A372-5382B4B24DA6}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "resources", "resources", "{2E968F29-FADB-49F1-9542-AA1CB5F9288D}"
ProjectSection(SolutionItems) = preProject
..\resources\CascadiaCode.ttf = ..\resources\CascadiaCode.ttf
..\resources\CascadiaCode.ttf.compressed = ..\resources\CascadiaCode.ttf.compressed
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Standalone", "Standalone", "{F324D64B-B62F-440F-A766-A4EC343A5F17}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BUTR.CrashReport.Renderer.ImGui.Standalone", "BUTR.CrashReport.Renderer.ImGui.Standalone\BUTR.CrashReport.Renderer.ImGui.Standalone.csproj", "{304D6A99-EF3B-45A1-AC3A-372C04E5842B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down Expand Up @@ -212,6 +221,10 @@ Global
{BCAF0EFF-2150-4A5F-A97F-B5B7578D9889}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BCAF0EFF-2150-4A5F-A97F-B5B7578D9889}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BCAF0EFF-2150-4A5F-A97F-B5B7578D9889}.Release|Any CPU.Build.0 = Release|Any CPU
{304D6A99-EF3B-45A1-AC3A-372C04E5842B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{304D6A99-EF3B-45A1-AC3A-372C04E5842B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{304D6A99-EF3B-45A1-AC3A-372C04E5842B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{304D6A99-EF3B-45A1-AC3A-372C04E5842B}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -239,17 +252,19 @@ Global
{087BC952-D8BC-4075-8C7C-17D5A4AF68B7} = {FF1A2EB5-6C39-4E70-AC7F-1D41AD4F54CB}
{71872CAF-7D4F-4A1E-A372-5382B4B24DA6} = {8013DEFB-F940-4891-9F74-BFE1A8106506}
{4FE11F43-B2CC-43C3-A947-5231050F8AA5} = {71872CAF-7D4F-4A1E-A372-5382B4B24DA6}
{36A642D2-9075-470D-B5B4-40EA20E0C16C} = {71872CAF-7D4F-4A1E-A372-5382B4B24DA6}
{62EDA4D7-1DF2-4D63-8FD5-E0EFF813650D} = {71872CAF-7D4F-4A1E-A372-5382B4B24DA6}
{B73A9FC8-B1D3-4BAD-864F-1404FD56F2D9} = {71872CAF-7D4F-4A1E-A372-5382B4B24DA6}
{BCAF0EFF-2150-4A5F-A97F-B5B7578D9889} = {71872CAF-7D4F-4A1E-A372-5382B4B24DA6}
{38A40917-CB4D-49E6-B08A-751BD330852E} = {71872CAF-7D4F-4A1E-A372-5382B4B24DA6}
{B2E732BE-17B2-4014-95A8-C588C6F624D4} = {71872CAF-7D4F-4A1E-A372-5382B4B24DA6}
{1464F441-48F8-4CB5-B944-1683F0ACBC3E} = {71872CAF-7D4F-4A1E-A372-5382B4B24DA6}
{B63FD775-79E8-48A2-AECA-1F7D73643024} = {71872CAF-7D4F-4A1E-A372-5382B4B24DA6}
{5B6FC58F-DD17-4E1D-9E54-8D0B3089325D} = {71872CAF-7D4F-4A1E-A372-5382B4B24DA6}
{559FAD6D-9906-47AE-90A6-78C14FF4629A} = {71872CAF-7D4F-4A1E-A372-5382B4B24DA6}
{CCA2F514-2028-47E4-8BDD-0C46B371836B} = {71872CAF-7D4F-4A1E-A372-5382B4B24DA6}
{F4E2D353-AD2D-455B-81B6-F743E0CAD7DF} = {8013DEFB-F940-4891-9F74-BFE1A8106506}
{F324D64B-B62F-440F-A766-A4EC343A5F17} = {8013DEFB-F940-4891-9F74-BFE1A8106506}
{38A40917-CB4D-49E6-B08A-751BD330852E} = {F324D64B-B62F-440F-A766-A4EC343A5F17}
{36A642D2-9075-470D-B5B4-40EA20E0C16C} = {F324D64B-B62F-440F-A766-A4EC343A5F17}
{B2E732BE-17B2-4014-95A8-C588C6F624D4} = {F324D64B-B62F-440F-A766-A4EC343A5F17}
{304D6A99-EF3B-45A1-AC3A-372C04E5842B} = {F324D64B-B62F-440F-A766-A4EC343A5F17}
EndGlobalSection
EndGlobal

0 comments on commit 28f1c0f

Please sign in to comment.