-
-
Notifications
You must be signed in to change notification settings - Fork 294
102 lines (79 loc) · 3.05 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
name: Build
on:
push:
branches: [ '**' ]
tags-ignore: [ '**' ]
pull_request:
jobs:
build:
runs-on: windows-2022
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
strategy:
fail-fast: false
matrix:
platform: [x86, x64, arm64]
steps:
- run: |
ls C:\Windows\Web
ls C:\Windows\Web\Wallpaper
ls C:\Windows\Web\Wallpaper\Windows
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- uses: microsoft/setup-msbuild@v2
- run: echo ${{ secrets.ENV_FILE }} | base64 --decode > .env
shell: bash
- run: scripts\version.ps1
- run: dotnet restore src\WinDynamicDesktop.sln
- run: dotnet publish src\WinDynamicDesktop.csproj -a ${{ matrix.platform }} -c Release --no-restore --self-contained -p:EnableCompressionInSingleFile=$env:EnableCompressionInSingleFile -p:IncludeNativeLibrariesForSelfExtract=$env:IncludeNativeLibrariesForSelfExtract -p:PublishSingleFile=$env:PublishSingleFile
env:
EnableCompressionInSingleFile: true
IncludeNativeLibrariesForSelfExtract: true
PublishSingleFile: true
- uses: actions/upload-artifact@v4
with:
name: exe-${{ matrix.platform }}
path: src\bin\Release\net8.0-windows10.0.19041.0\win-${{ matrix.platform }}\publish\*.exe
- run: msbuild uwp\WinDynamicDesktop.Package.wapproj /v:m /p:AppxBundle=$env:AppxBundle /p:Configuration=$env:Configuration /p:Platform=$env:Platform /p:UapAppxPackageBuildMode=$env:UapAppxPackageBuildMode /p:UseTemporarySignCert=$env:UseTemporarySignCert
env:
AppxBundle: Never
Configuration: Release
Platform: ${{ matrix.platform }}
UapAppxPackageBuildMode: SideloadOnly
UseTemporarySignCert: true
- uses: actions/upload-artifact@v4
with:
name: msix-${{ matrix.platform }}
path: uwp\AppPackages\*\*.msix
test:
runs-on: windows-2025
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
needs: build
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- run: |
cp .env.example .env
dotnet restore src\WinDynamicDesktop.sln
- name: Unit Tests
run: dotnet test --filter type!=system --verbosity normal
working-directory: test
- run: |
npm install -g appium
Start-Process -FilePath "C:\Program Files (x86)\Windows Application Driver\WinAppDriver.exe"
Start-Sleep -Seconds 5
- uses: actions/download-artifact@v4
with:
name: exe-x64
path: test\bin
- name: System Tests
run: dotnet test --filter type=system --verbosity normal
working-directory: test
- uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: test-dir
path: test/