-
Notifications
You must be signed in to change notification settings - Fork 29
114 lines (114 loc) · 3.83 KB
/
windows.yml
File metadata and controls
114 lines (114 loc) · 3.83 KB
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
103
104
105
106
107
108
109
110
111
112
113
114
name: Windows
on:
push:
branches:
- master
- fluent-package-v5
- fluent-package-v6
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.head_ref || github.sha }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
build:
name: Build
timeout-minutes: 90
strategy:
fail-fast: false
runs-on: windows-2022
steps:
- name: Set up Ruby
uses: ruby/setup-ruby@3ff19f5e2baf30647122352b96108b1fbe250c64 # v1.299.0
with:
ruby-version: 3.2
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: cache msi
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
id: cache-msi
with:
path: fluent-package/msi/repositories
key: ${{ runner.os }}-cache-windows-${{ hashFiles('**/config.rb', '**/Rakefile', '**/Gemfile*', 'fluent-package/msi/assets/*', 'fluent-package/msi/source.wxs', 'fluent-package/msi/parameters.wxi.erb', 'fluent-package/msi/localization-en-us.wxl', 'fluent-package/msi/exclude-files.xslt', 'fluent-package/msi/Dockerfile') }}
- name: Ensure availability of Docker
shell: pwsh
run: |
Start-Service docker
1..3 | ForEach-Object {
try {
docker version
Write-Host "Docker is ready"
exit 0
} catch {
Write-Host "Waiting for Docker..."
Start-Sleep -Seconds 10
}
}
- name: Build
if: ${{ ! steps.cache-msi.outputs.cache-hit }}
run: |
gem install serverspec
gem install bundler:2.2.9 --no-document
rake msi:build
- name: Upload td-agent msi
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: packages-windows-x86_64
path: fluent-package/msi/repositories
check_package_size:
name: Check Package Size
needs: build
runs-on: windows-2022
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: packages-windows-x86_64
path: fluent-package/msi/repositories
- name: Check Package Size
shell: pwsh
run: |
powershell -ExecutionPolicy Bypass -Command ".\fluent-package\msi\pkgsize-test.ps1"
test:
name: Test ${{ matrix.test }}
needs: build
runs-on: windows-2022
strategy:
fail-fast: false
matrix:
test:
- "install-test.ps1"
- "install-test-with-install-path-including-space.ps1"
- "update-from-v4-test.ps1"
- "update-from-v4-test.ps1 -ViaV5"
- "update-from-v5-test.ps1"
- "serverspec-test.ps1"
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: packages-windows-x86_64
path: fluent-package/msi/repositories
- name: Ensure availability of Docker
shell: pwsh
run: |
Start-Service docker
1..3 | ForEach-Object {
try {
docker version
Write-Host "Docker is ready"
exit 0
} catch {
Write-Host "Waiting for Docker..."
Start-Sleep -Seconds 10
}
}
- name: Installation Test
shell: pwsh
run: |
mkdir -p .bundle
docker run `
--rm `
--tty `
--volume ${PWD}:C:\fluentd:ro `
mcr.microsoft.com/dotnet/framework/runtime:3.5 `
powershell -ExecutionPolicy Bypass -Command "C:\fluentd\fluent-package\msi\${{ matrix.test }}"