Skip to content

Commit 19fa6ef

Browse files
committed
chore: Update build script and copyrights
1 parent 28d926b commit 19fa6ef

9 files changed

Lines changed: 160 additions & 144 deletions

File tree

.github/workflows/dotnet-core.yml

Lines changed: 139 additions & 137 deletions
Original file line numberDiff line numberDiff line change
@@ -1,142 +1,144 @@
11
name: .NET Core - Release
22

33
on:
4-
push:
5-
branches: [ new-analysis, development ]
6-
pull_request:
7-
branches: [ new-analysis, development ]
8-
workflow_dispatch:
4+
push:
5+
branches: [ new-analysis, development ]
6+
pull_request:
7+
branches: [ new-analysis, development ]
8+
workflow_dispatch:
99

1010
jobs:
11-
release-net9:
12-
strategy:
13-
matrix:
14-
runtimeIdentifier: [linux-x64, linux-arm64, osx-x64, osx-arm64, win-x64, win-arm64]
15-
project: [Cpp2IL]
16-
name: Build Single-File Artifact
17-
runs-on: ubuntu-latest
18-
steps:
19-
- uses: actions/checkout@v4
20-
- uses: actions/setup-dotnet@v4.1.0
21-
with:
22-
dotnet-version: 9.x
23-
- id: git-vars
24-
name: Get git branch information
25-
shell: bash
26-
run: |
27-
echo "##[set-output name=git_branch;]$(echo $GITHUB_REF)"
28-
echo "::set-output name=git_hash::$(git rev-parse --short HEAD)"
29-
- id: set-vars
30-
uses: actions/github-script@v7
31-
with:
32-
script: |
33-
core.setOutput("extension", "${{ matrix.runtimeIdentifier }}" === "win-x64" ? ".exe" : "");
34-
35-
let gitHash = "${{ steps.git-vars.outputs.git_hash }}";
36-
let runNumber = "${{ github.run_number }}";
37-
let rawGitRef = "${{ steps.git-vars.outputs.git_branch }}";
38-
console.log("rawGitRef: " + rawGitRef);
39-
let gitRef = rawGitRef.replace(/^refs\/heads\//, "");
40-
if(gitRef.indexOf("refs/pull/") === 0) {
41-
gitRef = "pr-" + gitRef.substring(10, gitRef.lastIndexOf("/"));
42-
}
43-
var versString = `${gitRef}.${runNumber}+${gitHash}`;
44-
console.log(versString);
45-
core.setOutput("versionString", versString);
46-
- name: Restore
47-
run: dotnet restore -r ${{ matrix.runtimeIdentifier }} /p:VersionSuffix=${{ steps.set-vars.outputs.versionString }}
48-
- name: Build
49-
working-directory: ./${{ matrix.project }}/
50-
run: dotnet publish -c Release -f net9.0 -r ${{ matrix.runtimeIdentifier }} /p:VersionSuffix=${{ steps.set-vars.outputs.versionString }} --no-restore --self-contained
51-
- name: Upload Executable
52-
uses: actions/upload-artifact@v4
53-
with:
54-
name: ${{ matrix.project }}-net9-${{ matrix.runtimeIdentifier }}
55-
path: ./${{ matrix.project }}/bin/Release/net9.0/${{ matrix.runtimeIdentifier }}/publish/${{ matrix.project }}${{ steps.set-vars.outputs.extension }}
56-
release-netframework:
57-
name: Build - Windows .NET Framework Zip
58-
runs-on: ubuntu-latest
59-
steps:
60-
- uses: actions/checkout@v4
61-
- uses: actions/setup-dotnet@v4.1.0
62-
with:
63-
dotnet-version: 9.x
64-
- name: Install dependencies
65-
run: dotnet restore -r win-x64
66-
- name: Build
67-
working-directory: ./Cpp2IL/
68-
run: dotnet publish -c Release -f net472 --no-restore -r win-x64
69-
- name: Upload
70-
uses: actions/upload-artifact@v4
71-
with:
72-
name: Cpp2IL-Netframework472-Windows
73-
path: ./Cpp2IL/bin/Release/net472/win-x64/publish/
74-
tests:
75-
name: Run Tests & Publish Dev Package
76-
runs-on: ubuntu-latest
77-
if: github.repository == 'SamboyCoding/Cpp2IL'
78-
steps:
79-
- uses: actions/checkout@v4
80-
- uses: actions/setup-dotnet@v4.1.0
81-
with:
82-
dotnet-version: 9.x
83-
- id: git-vars
84-
name: Set up environment
85-
shell: bash
86-
run: |
87-
echo "##[set-output name=git_branch;]$(echo $GITHUB_REF)"
88-
echo "::set-output name=git_hash::$(git rev-parse --short HEAD)"
89-
- id: set-vars
90-
uses: actions/github-script@v7
91-
with:
92-
script: |
93-
let gitHash = "${{ steps.git-vars.outputs.git_hash }}";
94-
let runNumber = "${{ github.run_number }}";
95-
let rawGitRef = "${{ steps.git-vars.outputs.git_branch }}";
96-
console.log("rawGitRef: " + rawGitRef);
97-
let gitRef = rawGitRef.replace(/^refs\/heads\//, "");
98-
if(gitRef.indexOf("refs/pull/") === 0) {
99-
gitRef = "pr-" + gitRef.substring(10, gitRef.lastIndexOf("/"));
100-
}
101-
var versString = `${gitRef}.${runNumber}+${gitHash}`;
102-
console.log(versString);
103-
core.setOutput("versionString", versString);
104-
- name: Install dependencies
105-
run: dotnet restore /p:VersionSuffix=${{ steps.set-vars.outputs.versionString }}
106-
- name: Build all
107-
run: dotnet build -c Release /p:VersionSuffix=${{ steps.set-vars.outputs.versionString }}
108-
- name: Run Tests
109-
run: dotnet test -c Release /p:VersionSuffix=${{ steps.set-vars.outputs.versionString }} --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=lcov /p:CoverletOutput='./lcov.info' /p:ExcludeByAttribute="LibCpp2IL.Coverage.NoCoverageAttribute"
110-
- name: Upload Coverage
111-
uses: coverallsapp/github-action@v2.3.4
112-
with:
113-
github-token: ${{ secrets.GITHUB_TOKEN }}
114-
files: ./Cpp2IL.Core.Tests/lcov.info ./LibCpp2ILTests/lcov.info
115-
- name: Publish StableNameDotNet
116-
if: github.event_name == 'push'
117-
run: dotnet nuget push -s https://nuget.samboy.dev/v3/index.json -k ${{ secrets.NUGET_KEY }} ./StableNameDotNet/bin/Release/*.nupkg
118-
- name: Publish WasmDisassembler
119-
if: github.event_name == 'push'
120-
run: dotnet nuget push -s https://nuget.samboy.dev/v3/index.json -k ${{ secrets.NUGET_KEY }} ./WasmDisassembler/bin/Release/*.nupkg
121-
- name: Publish LibCpp2IL
122-
if: github.event_name == 'push'
123-
run: dotnet nuget push -s https://nuget.samboy.dev/v3/index.json -k ${{ secrets.NUGET_KEY }} ./LibCpp2IL/bin/Release/*.nupkg
124-
- name: Publish Cpp2IL.Core
125-
if: github.event_name == 'push'
126-
run: dotnet nuget push -s https://nuget.samboy.dev/v3/index.json -k ${{ secrets.NUGET_KEY }} ./Cpp2IL.Core/bin/Release/*.nupkg
127-
- name: Publish Cpp2IL.Plugin.BuildReport
128-
if: github.event_name == 'push'
129-
run: dotnet nuget push -s https://nuget.samboy.dev/v3/index.json -k ${{ secrets.NUGET_KEY }} ./Cpp2IL.Plugin.BuildReport/bin/Release/*.nupkg
130-
- name: Publish Cpp2IL.Plugin.ControlFlowGraph
131-
if: github.event_name == 'push'
132-
run: dotnet nuget push -s https://nuget.samboy.dev/v3/index.json -k ${{ secrets.NUGET_KEY }} ./Cpp2IL.Plugin.ControlFlowGraph/bin/Release/*.nupkg
133-
- name: Publish Cpp2IL.Plugin.OrbisPkg
134-
if: github.event_name == 'push'
135-
run: dotnet nuget push -s https://nuget.samboy.dev/v3/index.json -k ${{ secrets.NUGET_KEY }} ./Cpp2IL.Plugin.OrbisPkg/bin/Release/*.nupkg
136-
- name: Publish Cpp2IL.Plugin.Pdb
137-
if: github.event_name == 'push'
138-
run: dotnet nuget push -s https://nuget.samboy.dev/v3/index.json -k ${{ secrets.NUGET_KEY }} ./Cpp2IL.Plugin.Pdb/bin/Release/*.nupkg
139-
- name: Publish Cpp2IL.Plugin.StrippedCodeRegSupport
140-
if: github.event_name == 'push'
141-
run: dotnet nuget push -s https://nuget.samboy.dev/v3/index.json -k ${{ secrets.NUGET_KEY }} ./Cpp2IL.Plugin.StrippedCodeRegSupport/bin/Release/*.nupkg
142-
11+
release-net9:
12+
strategy:
13+
matrix:
14+
runtimeIdentifier: [ linux-x64, linux-arm64, osx-x64, osx-arm64, win-x64, win-arm64 ]
15+
project: [ Cpp2IL ]
16+
name: Build Single-File Artifact
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
- uses: actions/setup-dotnet@v4.1.0
21+
with:
22+
dotnet-version: 9.x
23+
- id: git-vars
24+
name: Get git branch information
25+
shell: bash
26+
run: |
27+
echo "##[set-output name=git_branch;]$(echo $GITHUB_REF)"
28+
echo "::set-output name=git_hash::$(git rev-parse --short HEAD)"
29+
- id: set-vars
30+
uses: actions/github-script@v7
31+
with:
32+
script: |
33+
core.setOutput("extension", "${{ matrix.runtimeIdentifier }}" === "win-x64" ? ".exe" : "");
34+
35+
let gitHash = "${{ steps.git-vars.outputs.git_hash }}";
36+
let runNumber = "${{ github.run_number }}";
37+
let rawGitRef = "${{ steps.git-vars.outputs.git_branch }}";
38+
console.log("rawGitRef: " + rawGitRef);
39+
let gitRef = rawGitRef.replace(/^refs\/heads\//, "");
40+
if(gitRef.indexOf("refs/pull/") === 0) {
41+
gitRef = "pr-" + gitRef.substring(10, gitRef.lastIndexOf("/"));
42+
}
43+
var versString = `${gitRef}.${runNumber}+${gitHash}`;
44+
console.log(versString);
45+
core.setOutput("versionString", versString);
46+
- name: Restore
47+
run: dotnet restore -r ${{ matrix.runtimeIdentifier }} /p:VersionSuffix=${{ steps.set-vars.outputs.versionString }}
48+
- name: Build
49+
working-directory: ./${{ matrix.project }}/
50+
run: dotnet publish -c Release -f net9.0 -r ${{ matrix.runtimeIdentifier }} /p:VersionSuffix=${{ steps.set-vars.outputs.versionString }} --no-restore --self-contained
51+
- name: Upload Executable
52+
uses: actions/upload-artifact@v4
53+
with:
54+
name: ${{ matrix.project }}-net9-${{ matrix.runtimeIdentifier }}
55+
path: ./${{ matrix.project }}/bin/Release/net9.0/${{ matrix.runtimeIdentifier }}/publish/${{ matrix.project }}${{ steps.set-vars.outputs.extension }}
56+
release-netframework:
57+
name: Build - Windows .NET Framework Zip
58+
runs-on: ubuntu-latest
59+
steps:
60+
- uses: actions/checkout@v4
61+
- uses: actions/setup-dotnet@v4.1.0
62+
with:
63+
dotnet-version: 9.x
64+
- name: Install dependencies
65+
run: dotnet restore -r win-x64
66+
- name: Build
67+
working-directory: ./Cpp2IL/
68+
run: dotnet publish -c Release -f net472 --no-restore -r win-x64
69+
- name: Upload
70+
uses: actions/upload-artifact@v4
71+
with:
72+
name: Cpp2IL-Netframework472-Windows
73+
path: ./Cpp2IL/bin/Release/net472/win-x64/publish/
74+
tests:
75+
name: Run Tests & Publish Dev Package
76+
runs-on: ubuntu-latest
77+
if: github.repository == 'SamboyCoding/Cpp2IL'
78+
steps:
79+
- uses: actions/checkout@v4
80+
- uses: actions/setup-dotnet@v4.1.0
81+
with:
82+
dotnet-version: 9.x
83+
- id: git-vars
84+
name: Set up environment
85+
shell: bash
86+
run: |
87+
echo "##[set-output name=git_branch;]$(echo $GITHUB_REF)"
88+
echo "::set-output name=git_hash::$(git rev-parse --short HEAD)"
89+
- id: set-vars
90+
uses: actions/github-script@v7
91+
with:
92+
script: |
93+
let gitHash = "${{ steps.git-vars.outputs.git_hash }}";
94+
let runNumber = "${{ github.run_number }}";
95+
let rawGitRef = "${{ steps.git-vars.outputs.git_branch }}";
96+
console.log("rawGitRef: " + rawGitRef);
97+
let gitRef = rawGitRef.replace(/^refs\/heads\//, "");
98+
if(gitRef.indexOf("refs/pull/") === 0) {
99+
gitRef = "pr-" + gitRef.substring(10, gitRef.lastIndexOf("/"));
100+
}
101+
var versString = `${gitRef}.${runNumber}+${gitHash}`;
102+
console.log(versString);
103+
core.setOutput("versionString", versString);
104+
- name: Install dependencies
105+
run: dotnet restore /p:VersionSuffix=${{ steps.set-vars.outputs.versionString }}
106+
- name: Build all
107+
run: dotnet build -c Release /p:VersionSuffix=${{ steps.set-vars.outputs.versionString }}
108+
- name: Run Tests
109+
run: dotnet test -c Release /p:VersionSuffix=${{ steps.set-vars.outputs.versionString }} --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=lcov /p:CoverletOutput='./lcov.info' /p:ExcludeByAttribute="LibCpp2IL.Coverage.NoCoverageAttribute"
110+
- name: Upload Coverage
111+
uses: coverallsapp/github-action@v2.3.4
112+
with:
113+
github-token: ${{ secrets.GITHUB_TOKEN }}
114+
files: ./Cpp2IL.Core.Tests/lcov.info ./LibCpp2ILTests/lcov.info
115+
- name: Publish StableNameDotNet
116+
if: github.event_name == 'push'
117+
run: dotnet nuget push -s https://nuget.samboy.dev/v3/index.json -k ${{ secrets.NUGET_KEY }} ./StableNameDotNet/bin/Release/*.nupkg
118+
- name: Publish WasmDisassembler
119+
if: github.event_name == 'push'
120+
run: dotnet nuget push -s https://nuget.samboy.dev/v3/index.json -k ${{ secrets.NUGET_KEY }} ./WasmDisassembler/bin/Release/*.nupkg
121+
- name: Publish LibCpp2IL
122+
if: github.event_name == 'push'
123+
run: dotnet nuget push -s https://nuget.samboy.dev/v3/index.json -k ${{ secrets.NUGET_KEY }} ./LibCpp2IL/bin/Release/*.nupkg
124+
- name: Publish Cpp2IL.Core
125+
if: github.event_name == 'push'
126+
run: dotnet nuget push -s https://nuget.samboy.dev/v3/index.json -k ${{ secrets.NUGET_KEY }} ./Cpp2IL.Core/bin/Release/*.nupkg
127+
- name: Publish Cpp2IL.Plugin.BuildReport
128+
if: github.event_name == 'push'
129+
run: dotnet nuget push -s https://nuget.samboy.dev/v3/index.json -k ${{ secrets.NUGET_KEY }} ./Cpp2IL.Plugin.BuildReport/bin/Release/*.nupkg
130+
- name: Publish Cpp2IL.Plugin.ControlFlowGraph
131+
if: github.event_name == 'push'
132+
run: dotnet nuget push -s https://nuget.samboy.dev/v3/index.json -k ${{ secrets.NUGET_KEY }} ./Cpp2IL.Plugin.ControlFlowGraph/bin/Release/*.nupkg
133+
- name: Publish Cpp2IL.Plugin.OrbisPkg
134+
if: github.event_name == 'push'
135+
run: dotnet nuget push -s https://nuget.samboy.dev/v3/index.json -k ${{ secrets.NUGET_KEY }} ./Cpp2IL.Plugin.OrbisPkg/bin/Release/*.nupkg
136+
- name: Publish Cpp2IL.Plugin.Pdb
137+
if: github.event_name == 'push'
138+
run: dotnet nuget push -s https://nuget.samboy.dev/v3/index.json -k ${{ secrets.NUGET_KEY }} ./Cpp2IL.Plugin.Pdb/bin/Release/*.nupkg
139+
- name: Publish Cpp2IL.Plugin.StrippedCodeRegSupport
140+
if: github.event_name == 'push'
141+
run: dotnet nuget push -s https://nuget.samboy.dev/v3/index.json -k ${{ secrets.NUGET_KEY }} ./Cpp2IL.Plugin.StrippedCodeRegSupport/bin/Release/*.nupkg
142+
- name: Publish Cpp2IL.Plugin.Mfuscator
143+
if: github.event_name == 'push'
144+
run: dotnet nuget push -s https://nuget.samboy.dev/v3/index.json -k ${{ secrets.NUGET_KEY }} ./Cpp2IL.Plugin.Mfuscator/bin/Release/*.nupkg

Cpp2IL.Core/Cpp2IL.Core.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<PropertyGroup>
33
<Authors>Sam Byass (Samboy063)</Authors>
44
<Company>N/A</Company>
5-
<Copyright>Copyright © Samboy063 2019-2023</Copyright>
5+
<Copyright>Copyright © Samboy063 2019-2026</Copyright>
66
<DebugType>embedded</DebugType>
77
<Description>Reverses Unity's IL2CPP Build Process</Description>
88
<EmbedUntrackedSources>true</EmbedUntrackedSources>

Cpp2IL.Plugin.BuildReport/Cpp2IL.Plugin.BuildReport.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<PropertyGroup>
1111
<Authors>Sam Byass (Samboy063)</Authors>
1212
<ContinuousIntegrationBuild Condition="'$(GITHUB_ACTIONS)' == 'true'">true</ContinuousIntegrationBuild>
13-
<Copyright>Copyright © Samboy063 2022-2025</Copyright>
13+
<Copyright>Copyright © Samboy063 2022-2026</Copyright>
1414
<Description>Plugin for Cpp2IL</Description>
1515
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
1616
<PackageId>Samboy063.$(MSBuildProjectName)</PackageId>

Cpp2IL.Plugin.ControlFlowGraph/Cpp2IL.Plugin.ControlFlowGraph.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<PropertyGroup>
1414
<Authors>Sam Byass (Samboy063)</Authors>
1515
<ContinuousIntegrationBuild Condition="'$(GITHUB_ACTIONS)' == 'true'">true</ContinuousIntegrationBuild>
16-
<Copyright>Copyright © Samboy063 2024-2025</Copyright>
16+
<Copyright>Copyright © Samboy063 2024-2026</Copyright>
1717
<Description>Plugin for Cpp2IL</Description>
1818
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
1919
<PackageId>Samboy063.$(MSBuildProjectName)</PackageId>

Cpp2IL.Plugin.Mfuscator/Cpp2IL.Plugin.Mfuscator.csproj

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,20 @@
77
<Nullable>enable</Nullable>
88
</PropertyGroup>
99

10+
<PropertyGroup>
11+
<Authors>Sam Byass (Samboy063)</Authors>
12+
<ContinuousIntegrationBuild Condition="'$(GITHUB_ACTIONS)' == 'true'">true</ContinuousIntegrationBuild>
13+
<Copyright>Copyright © Samboy063 2024-2026</Copyright>
14+
<Description>Plugin for Cpp2IL</Description>
15+
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
16+
<PackageId>Samboy063.$(MSBuildProjectName)</PackageId>
17+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
18+
<PackageProjectUrl>https://github.com/SamboyCoding/Cpp2IL</PackageProjectUrl>
19+
<PublishRepositoryUrl>true</PublishRepositoryUrl>
20+
<Title>$(MSBuildProjectName)</Title>
21+
<VersionPrefix>2022.1.0</VersionPrefix>
22+
</PropertyGroup>
23+
1024
<ItemGroup>
1125
<ProjectReference Include="..\Cpp2IL.Core\Cpp2IL.Core.csproj" Private="false" />
1226
<ProjectReference Include="..\LibCpp2IL\LibCpp2IL.csproj" Private="false" />

Cpp2IL.Plugin.OrbisPkg/Cpp2IL.Plugin.OrbisPkg.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<PropertyGroup>
1212
<Authors>Sam Byass (Samboy063)</Authors>
1313
<ContinuousIntegrationBuild Condition="'$(GITHUB_ACTIONS)' == 'true'">true</ContinuousIntegrationBuild>
14-
<Copyright>Copyright © Samboy063 2022-2024</Copyright>
14+
<Copyright>Copyright © Samboy063 2022-2026</Copyright>
1515
<Description>Plugin for Cpp2IL</Description>
1616
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
1717
<PackageId>Samboy063.$(MSBuildProjectName)</PackageId>

Cpp2IL/Cpp2IL.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<Company>Samboy063</Company>
4-
<Copyright>Copyright © Samboy063 2019-2023</Copyright>
4+
<Copyright>Copyright © Samboy063 2019-2026</Copyright>
55
<Configurations>Debug;Release</Configurations>
66
<DebugType>embedded</DebugType>
77
<EnableCompressionInSingleFile>true</EnableCompressionInSingleFile>

LibCpp2IL/LibCpp2IL.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<PackageId>Samboy063.LibCpp2IL</PackageId>
88
<Title>LibCpp2IL</Title>
99
<Authors>Samboy063</Authors>
10-
<Copyright>Copyright © Samboy063 2019-2023</Copyright>
10+
<Copyright>Copyright © Samboy063 2019-2026</Copyright>
1111
<Company>Samboy063</Company>
1212
<VersionPrefix>2022.1.0</VersionPrefix>
1313
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>

StableNameDotNet/StableNameDotNet.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<Authors>Samboy063</Authors>
55
<Company>Samboy063</Company>
6-
<Copyright>Copyright © Samboy063 2022-2023</Copyright>
6+
<Copyright>Copyright © Samboy063 2022-2026</Copyright>
77
<DebugType>embedded</DebugType>
88
<Description>Library for generating somewhat stable names for obfuscated types, based on their content.</Description>
99
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>

0 commit comments

Comments
 (0)