Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
tgiphil committed May 15, 2024
1 parent c0f5cbc commit ecc8988
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 12 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ jobs:
with:
name: windows-build-artifact
path: bin
compression-level: 9
- name: Create Package - Mosa.Tools.Package
run: nuget pack Source\Mosa.Packages\Mosa.Tools.Package.nuspec -Tool -OutputDirectory bin\nupkg -Version ${{ env.BUILD_VERSION }}
- name: Create Package - Mosa.Tools.Package.Qemu
Expand Down Expand Up @@ -139,6 +140,7 @@ jobs:
with:
name: linux-build-artifact
path: bin
compression-level: 9

macos-build:
name: MacOS Build
Expand Down Expand Up @@ -168,6 +170,7 @@ jobs:
with:
name: macos-build-artifact
path: bin
compression-level: 9

windows-unit-testing:
strategy:
Expand All @@ -191,12 +194,13 @@ jobs:
- name: Make Artifact Folder
run: mkdir artifact
- name: Unit Test
run: bin\Mosa.Utility.UnitTests.exe -check -o${{ matrix.optimization }} -counters artifact\counters-unittests-o${{ matrix.optimization }}.txt
run: bin\Mosa.Utility.UnitTests.exe -check -o${{ matrix.optimization }} -counters artifact\counters-windows-unittests-o${{ matrix.optimization }}.txt
- name: Store Counter Artifact
uses: actions/upload-artifact@v4
with:
name: counters-windows-unittests-o${{ matrix.optimization }}
path: artifact
retention-days: 2

linux-unit-testing:
strategy:
Expand Down Expand Up @@ -234,6 +238,7 @@ jobs:
with:
name: counters-linux-unittests-o${{ matrix.optimization }}
path: artifact
retention-days: 2

macos-unit-testing:
strategy:
Expand Down Expand Up @@ -269,6 +274,7 @@ jobs:
with:
name: counters-macos-unittests-o${{ matrix.optimization }}
path: artifact
retention-days: 2

windows-demo-testing:
strategy:
Expand Down Expand Up @@ -459,3 +465,5 @@ jobs:
with:
name: counters-unit-tests
pattern: counters-*
compression-level: 9

4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ permissions:
contents: write

env:
BUILD_VERSION: 2.5.1.${{ github.run_number }}
BUILD_VERSION: 2.6.0.${{ github.run_number }}

jobs:

Expand All @@ -26,7 +26,7 @@ jobs:
with:
python-version: '3.11'
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive
- name: Update package repository
Expand Down
8 changes: 4 additions & 4 deletions Source/Mosa.Compiler.Framework/Compiler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ private MosaMethod CompileMethod(MosaMethod method, int threadID)

public void ExecuteCompile(int maxThreads)
{
GlobalCounters.Update("Compiler.MaxThreads", maxThreads);
GlobalCounters.Set("Compiler.MaxThreads", maxThreads);

PostEvent(CompilerEvent.CompilingMethodsStart);

Expand Down Expand Up @@ -504,7 +504,7 @@ private void CompilePass()
internal void Finalization()
{
CompileTime.Stop();
GlobalCounters.Update("Elapsed.Total.Milliseconds", (int)CompileTime.ElapsedMilliseconds);
GlobalCounters.Set("Elapsed.Total.Milliseconds", (int)CompileTime.ElapsedMilliseconds);

PostEvent(CompilerEvent.FinalizationStart);

Expand Down Expand Up @@ -537,8 +537,8 @@ internal void Finalization()
}

TotalCompileTime.Stop();
GlobalCounters.Update("Elapsed.TotalCompile.Milliseconds", (int)TotalCompileTime.ElapsedMilliseconds);
GlobalCounters.Update("Compiler.TotalMethods", MethodScheduler.TotalMethods);
GlobalCounters.Set("Elapsed.TotalCompile.Milliseconds", (int)TotalCompileTime.ElapsedMilliseconds);
GlobalCounters.Set("Compiler.TotalMethods", MethodScheduler.TotalMethods);

MethodScanner.Complete();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ protected override void Finalization()

Compiler.LinkerTime.Reset();

Compiler.GlobalCounters.Update("Linker.Text", (int)Linker.Sections[(int)SectionKind.Text].Size);
Compiler.GlobalCounters.Update("Linker.Data", (int)Linker.Sections[(int)SectionKind.Data].Size);
Compiler.GlobalCounters.Update("Linker.ROData", (int)Linker.Sections[(int)SectionKind.ROData].Size);
Compiler.GlobalCounters.Update("Linker.BSS", (int)Linker.Sections[(int)SectionKind.BSS].Size);
Compiler.GlobalCounters.Set("Linker.Text", (int)Linker.Sections[(int)SectionKind.Text].Size);
Compiler.GlobalCounters.Set("Linker.Data", (int)Linker.Sections[(int)SectionKind.Data].Size);
Compiler.GlobalCounters.Set("Linker.ROData", (int)Linker.Sections[(int)SectionKind.ROData].Size);
Compiler.GlobalCounters.Set("Linker.BSS", (int)Linker.Sections[(int)SectionKind.BSS].Size);
}
}
3 changes: 2 additions & 1 deletion Source/Mosa.sln
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{624E8284-4F0A-4C3F-B5F2-271105E48ECF}"
ProjectSection(SolutionItems) = preProject
..\.github\workflows\builds.yml = ..\.github\workflows\builds.yml
..\.github\workflows\docs.yml = ..\.github\workflows\docs.yml
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Data", "Data", "{A406F567-5C89-45AB-88CE-E20616B28FFD}"
Expand Down Expand Up @@ -252,7 +253,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Template", "Template", "{A1
TemplateLibrary.txt = TemplateLibrary.txt
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mosa.Tool.Explorer.Avalonia", "Mosa.Tool.Explorer.Avalonia\Mosa.Tool.Explorer.Avalonia.csproj", "{763FDCF2-2501-4756-A7A1-62813D610B00}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mosa.Tool.Explorer.Avalonia", "Mosa.Tool.Explorer.Avalonia\Mosa.Tool.Explorer.Avalonia.csproj", "{763FDCF2-2501-4756-A7A1-62813D610B00}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down

0 comments on commit ecc8988

Please sign in to comment.