1010 branches : [ "main" ]
1111
1212jobs :
13- build-nuget- and-tests :
14- name : Build Nuget and Run Tests
13+ build-and-test :
14+ name : Build and Run Tests
1515 strategy :
1616 fail-fast : false
1717 matrix :
@@ -20,13 +20,13 @@ jobs:
2020 permissions :
2121 checks : write
2222 steps :
23- - uses : actions/checkout@v4
23+ - uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
2424 with :
2525 fetch-depth : 0
2626 - name : Setup .NET
27- uses : actions/setup-dotnet@v4
27+ uses : actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
2828 with :
29- dotnet-version : 9 .0.x
29+ dotnet-version : 10 .0.x
3030 - name : Install and Configure Keyring
3131 if : ${{ matrix.os == 'ubuntu-latest' }}
3232 run : |
@@ -43,36 +43,27 @@ jobs:
4343 run : dotnet restore MSStore.CLI.sln /p:Configuration=Release
4444 - name : Build
4545 run : dotnet build MSStore.CLI.sln --no-restore /p:Configuration=Release
46- - name : Test net9 .0
47- run : dotnet run --project MSStore.CLI.UnitTests -f net9 .0 --no-build -c Release --coverage --coverage-output-format cobertura --report-trx --results-directory ./TestResults
48- - name : Test net9 .0-windows10.0.17763.0
46+ - name : Test net10 .0
47+ run : dotnet run --project MSStore.CLI.UnitTests -f net10 .0 --no-build -c Release --coverage --coverage-output-format cobertura --report-trx --results-directory ./TestResults
48+ - name : Test net10 .0-windows10.0.17763.0
4949 if : ${{ matrix.os == 'windows-latest' }}
50- run : dotnet run --project MSStore.CLI.UnitTests -f net9 .0-windows10.0.17763.0 --no-build -c Release --coverage --coverage-output-format cobertura --report-trx --results-directory ./TestResults
50+ run : dotnet run --project MSStore.CLI.UnitTests -f net10 .0-windows10.0.17763.0 --no-build -c Release --coverage --coverage-output-format cobertura --report-trx --results-directory ./TestResults
5151 - name : Publish test results
5252 if : ${{ !cancelled() }}
53- uses : actions/upload-artifact@v4
53+ uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
5454 with :
5555 name : test-results-${{ matrix.os }}
5656 path : TestResults/*.trx
5757 - name : Install ReportGenerator
58- run : dotnet tool install --global dotnet-reportgenerator-globaltool --version 5.4.11
58+ run : dotnet tool install --global dotnet-reportgenerator-globaltool --version 5.5.1
5959 - name : Merge code coverage files
6060 run : reportgenerator "-reports:${{ github.workspace }}/**/*.cobertura.xml" "-targetdir:${{ github.workspace }}/report" "-reporttypes:Cobertura" "-filefilters:-*GenerationContext*.g.cs"
6161 - name : Publish code coverage results
62- uses : actions/upload-artifact@v4
62+ uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
6363 with :
6464 name : Cobertura-${{ matrix.os }}
6565 path : ${{ github.workspace }}/report/Cobertura.xml
6666 # TODO: Publish github comment with code coverage
67- - name : Pack NuGet
68- if : ${{ matrix.os == 'ubuntu-latest' }}
69- run : dotnet pack MSStore.API --no-build -c Release
70- - name : Upload Artifact - NuGet
71- if : ${{ matrix.os == 'ubuntu-latest' }}
72- uses : actions/upload-artifact@v4
73- with :
74- name : NuGet
75- path : MSStore.API/bin/Release/*.nupkg
7667
7768 build-cli :
7869 strategy :
@@ -84,38 +75,43 @@ jobs:
8475 include :
8576 - os : windows-latest
8677 dotnet-os : win
87- dotnet-framework : net9 .0-windows10.0.17763.0
78+ dotnet-framework : net10 .0-windows10.0.17763.0
8879 - os : ubuntu-latest
8980 dotnet-os : linux
90- dotnet-framework : net9 .0
81+ dotnet-framework : net10 .0
9182 - os : macos-latest
9283 dotnet-os : osx
93- dotnet-framework : net9 .0
84+ dotnet-framework : net10 .0
9485 runs-on : ${{ matrix.os }}
9586
9687 name : Build CLI - ${{ matrix.dotnet-os }}-${{ matrix.dotnet-arch }}
9788
9889 steps :
99- - uses : actions/checkout@v4
90+ - uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
10091 with :
10192 fetch-depth : 0
10293 - name : Setup .NET
103- uses : actions/setup-dotnet@v4
94+ uses : actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
10495 with :
105- dotnet-version : 9 .0.x
96+ dotnet-version : 10 .0.x
10697 - name : Add msbuild to PATH
10798 if : ${{ matrix.os == 'windows-latest' }}
108- uses : microsoft/setup-msbuild@v2
99+ uses : microsoft/setup-msbuild@30375c66a4eea26614e0d39710365f22f8b0af57 # v3.0.0
109100 - name : Install NBGV tool
110101 run : dotnet tool install --tool-path . nbgv
111102 - name : Set Version
112103 run : ./nbgv cloud
113- - name : Restore CLI
114- run : dotnet restore MSStore.CLI -r ${{ matrix.dotnet-os }}-${{ matrix.dotnet-arch }} /p:Configuration=Release /p:PublishReadyToRun=true
115- - name : Build CLI
116- run : dotnet build MSStore.CLI --no-restore --no-self-contained -r ${{ matrix.dotnet-os }}-${{ matrix.dotnet-arch }} -f ${{ matrix.dotnet-framework }} /p:Configuration=Release
104+ - name : Install linux-arm64 NativeAOT toolchain
105+ if : ${{ matrix.os == 'ubuntu-latest' && matrix.dotnet-arch == 'arm64' }}
106+ run : |
107+ sudo apt-get update
108+ sudo apt-get install -y \
109+ clang llvm lld \
110+ binutils-aarch64-linux-gnu \
111+ gcc-aarch64-linux-gnu g++-aarch64-linux-gnu \
112+ libc6-dev-arm64-cross
117113 - name : Publish SelfContained CLI
118- run : dotnet publish MSStore.CLI --no-build --no- self-contained -r ${{ matrix.dotnet-os }}-${{ matrix.dotnet-arch }} -f ${{ matrix.dotnet-framework }} /p:Configuration=Release /p:PublishProfile=${{ matrix.dotnet-os }}-${{ matrix.dotnet-arch }}
114+ run : dotnet publish MSStore.CLI --self-contained -r ${{ matrix.dotnet-os }}-${{ matrix.dotnet-arch }} -f ${{ matrix.dotnet-framework }} /p:Configuration=Release /p:PublishProfile=${{ matrix.dotnet-os }}-${{ matrix.dotnet-arch }}
119115 - run : |
120116 New-Item -ItemType File -Path ".\MSStore.CLI.MSIX\obj\${{ matrix.dotnet-arch }}\appxmanifest.xml" -Force
121117 Copy-Item ".\MSStore.CLI.MSIX\Package.appxmanifest" -Destination ".\MSStore.CLI.MSIX\obj\${{ matrix.dotnet-arch }}\appxmanifest.xml" -Force
@@ -135,13 +131,13 @@ jobs:
135131 run : ."C:\Program Files (x86)\Windows Kits\10\App Certification Kit\SignTool.exe" sign /fd SHA256 /a /f .\MSStore.CLI.MSIX\MSStore.CLI.MSIX_TemporaryKey.pfx ${{ github.workspace }}/MSStore.CLI.MSIX/AppPackages/${{ matrix.dotnet-arch }}/MSStore.CLI.MSIX_${{ env.GitBuildVersionSimple }}.0_${{ matrix.dotnet-arch }}_Test.msix
136132 - name : Upload Artifact - CLI
137133 if : ${{ !env.ACT }}
138- uses : actions/upload-artifact@v4
134+ uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
139135 with :
140136 name : CLI-${{ matrix.dotnet-os }}-${{ matrix.dotnet-arch }}
141137 path : ${{ github.workspace }}/MSStore.CLI/bin/Release/${{ matrix.dotnet-framework }}/${{ matrix.dotnet-os }}-${{ matrix.dotnet-arch }}/publish/**/*
142138 - name : Upload Artifact - MSIX
143139 if : ${{ matrix.os == 'windows-latest' && !env.ACT }}
144- uses : actions/upload-artifact@v4
140+ uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
145141 with :
146142 name : CLI-MSIX-${{ matrix.dotnet-arch }}
147143 path : ${{ github.workspace }}/MSStore.CLI.MSIX/AppPackages/${{ matrix.dotnet-arch }}/MSStore.CLI.MSIX_${{ env.GitBuildVersionSimple }}.0_${{ matrix.dotnet-arch }}_Test.msix
0 commit comments