external/firebird: Drop -fno-rtti from sanitizer builds
[LibreOffice.git] / .configurations / user_steps.dsc.yaml
blob741ffcbbc050dd216ff1f05e120cd12a14689867
1 # yaml-language-server: $schema=https://aka.ms/configuration-dsc-schema/0.2
3 # configuration to setup the dependencies in ~/lo and add make, jom and clang-format to ~/bin
4 # and install a wsl distro with the required packages
5 # this configuration is meant to be applied as the build user, and after the admin_java_and_deps one
6 # has been applied. It also creates a ~/lo/autogen.input with some sensible defaults that can be
7 # used as a template for own modifications
9 properties:
10   assertions:
11     - resource: xPSDesiredStateConfiguration/xScript
12       id: prerequisitecheck
13       directives:
14         description: check that everything had been downloaded by the admin-step
15       settings:
16         GetScript: return $false
17         SetSCript: return $false
18         # the empty string element is so that each file can be specified with trailing comma
19         TestScript: |
20           $files = @(
21               "apache-ant-1.10.15-bin.zip",
22               "clang-format-5.0.0-win.exe",
23               "jom_1_1_4.zip",
24               "junit-4.10.jar",
25               "make-4.2.1-msvc.exe",
26               "strawberry-perl-5.40.0.1-64bit-portable.zip",
27           "")
28           !(($files | foreach {Test-Path "$env:PUBLIC/Downloads/$_"}) -contains $false)
29     - resource: xPSDesiredStateConfiguration/xScript
30       id: wsl-check
31       directives:
32         description: check that wsl utility is available/working - i.e. whether wsl is installed
33       settings:
34         TestScript: wsl.exe --status ; return ![bool]$LASTEXITCODE
35         GetScript: return $false
36         SetScript: return $false
37   resources:
38     - resource: xPSDesiredStateConfiguration/xScript
39       id: bindir
40       directives:
41         description: create the ~/bin directory
42       settings:
43         TestScript: Test-Path -Path "$env:UserProfile/bin" -PathType "Container"
44         GetScript:  Test-Path -Path "$env:UserProfile/bin" -PathType "Container"
45         SetScript: New-Item -ItemType "directory" -Path "$env:UserProfile" -Name "bin"
46     - resource: xPSDesiredStateConfiguration/xScript
47       id: lodir
48       directives:
49         description: create the ~/lo directory
50       settings:
51         TestScript: Test-Path -Path "$env:UserProfile/lo" -PathType "Container"
52         GetScript:  Test-Path -Path "$env:UserProfile/lo" -PathType "Container"
53         SetScript: New-Item -ItemType "directory" -Path "$env:UserProfile" -Name "lo"
54     - resource: xPSDesiredStateConfiguration/xScript
55       id: make
56       dependsOn:
57         - bindir
58       directives:
59         description: copy make.exe to the ~/bin directory
60       settings:
61         TestScript: Test-Path -Path "$env:USERPROFILE/bin/make.exe"
62         GetScript:  Test-Path -Path "$env:USERPROFILE/bin/make.exe"
63         SetScript: Copy-Item -Path "$env:PUBLIC/Downloads/make-4.2.1-msvc.exe" -Destination "$env:USERPROFILE/bin/make.exe"
64     - resource: xPSDesiredStateConfiguration/xScript
65       id: clang-format
66       dependsOn:
67         - bindir
68       directives:
69         description: copy clang-format.exe to the ~/bin directory
70       settings:
71         TestScript: Test-Path -Path "$env:USERPROFILE/bin/clang-format.exe"
72         GetScript:  Test-Path -Path "$env:USERPROFILE/bin/clang-format.exe"
73         SetScript: Copy-Item -LiteralPath "$env:PUBLIC/Downloads/clang-format-5.0.0-win.exe" -Destination "$env:USERPROFILE/bin/clang-format.exe"
74     - resource: xPSDesiredStateConfiguration/xScript
75       id: junit
76       dependsOn:
77         - lodir
78       directives:
79         description: copy junit to the ~/lo directory
80       settings:
81         TestScript: Test-Path -Path "$env:USERPROFILE/lo/junit-4.10.jar"
82         GetScript:  Test-Path -Path "$env:USERPROFILE/lo/junit-4.10.jar"
83         SetScript: Copy-Item -LiteralPath "$env:PUBLIC/Downloads/junit-4.10.jar" -Destination "$env:USERPROFILE/lo/junit-4.10.jar"
84     # the DSC Archive module doesn't operate with $env:FOO / would need hardcoded paths
85     - resource: xPSDesiredStateConfiguration/xScript
86       id: ant-extract
87       dependsOn:
88         - lodir
89       directives:
90         description: extract ant to the ~/lo directory
91       settings:
92         TestScript: Test-Path -Path "$env:USERPROFILE/lo/apache-ant-1.10.15/bin/ant"
93         GetScript:  Test-Path -Path "$env:USERPROFILE/lo/apache-ant-1.10.15/bin/ant"
94         SetScript: Expand-Archive -LiteralPath "$env:PUBLIC/Downloads/apache-ant-1.10.15-bin.zip" -Destination "$env:USERPROFILE/lo/"
95     - resource: xPSDesiredStateConfiguration/xScript
96       id: spp-extract
97       dependsOn:
98         - lodir
99       directives:
100         description: extract strawberry-perl-portable to the ~/lo directory
101       settings:
102         TestScript: Test-Path -Path "$env:USERPROFILE/lo/spp/perl/bin/perl.exe"
103         GetScript:  Test-Path -Path "$env:USERPROFILE/lo/spp/perl/bin/perl.exe"
104         SetScript: Expand-Archive -LiteralPath "$env:PUBLIC/Downloads/strawberry-perl-5.40.0.1-64bit-portable.zip" -Destination "$env:USERPROFILE/lo/spp"
105     - resource: xPSDesiredStateConfiguration/xScript
106       id: spp-install-font-ttf
107       dependsOn:
108         - spp-extract
109       directives:
110         description: install perl-font-TTF to spp via cpan
111       settings:
112         TestScript: Test-Path -Path "$env:USERPROFILE/lo/spp/perl/site/lib/Font/TTF.pm"
113         GetScript:  Test-Path -Path "$env:USERPROFILE/lo/spp/perl/site/lib/Font/TTF.pm"
114         SetScript: |
115           $env:Path = "$env:USERPROFILE/lo/spp/c/bin;$env:USERPROFILE/lo/spp/perl/bin;$env:path"
116           cpanm Font::TTF
117     - resource: xPSDesiredStateConfiguration/xScript
118       id: jom
119       dependsOn:
120         - bindir
121         - lodir
122       directives:
123         description: extract and copy jom to the ~/bin directory
124       settings:
125         TestScript: Test-Path -Path "$env:USERPROFILE/bin/jom.exe"
126         GetScript:  Test-Path -Path "$env:USERPROFILE/bin/jom.exe"
127         SetScript: |
128           Expand-Archive -LiteralPath "$env:PUBLIC/Downloads/jom_1_1_4.zip" -Destination "$env:USERPROFILE/lo/jom_unpack"
129           Copy-Item -LiteralPath "$env:USERPROFILE/lo/jom_unpack/jom.exe" -Destination "$env:USERPROFILE/bin/jom.exe"
130           Remove-Item -LiteralPath "$env:USERPROFILE/lo/jom_unpack" -Recurse
131     - resource: xPSDesiredStateConfiguration/xScript
132       id: gitsettings
133       directives:
134         description: configure git to use protocol.version 2 and core.autocrlf false
135       settings:
136         TestScript: return $false
137         GetScript:  return $false
138         SetScript: |
139           git config --global core.autocrlf false
140           git config --global protocol.version 2
141     - resource: xPSDesiredStateConfiguration/xScript
142       id: autogensnippet
143       dependsOn:
144         - lodir
145       directives:
146         description: create an autogen.input snippet with some sensible defaults
147       settings:
148         TestScript: Test-Path -Path "$env:USERPROFILE/lo/autogen.input"
149         GetScript:  Test-Path -Path "$env:USERPROFILE/lo/autogen.input"
150         SetScript: |
151           New-Item -Path "$env:USERPROFILE/lo" -Name "autogen.input" -ItemType "file" -Value "# adjust to your needs
152           --host=x86_64-pc-cygwin
153           #--host=i686-pc-cygwin
154           --disable-ccache
155           --with-visual-studio=2022
156           --enable-python=fully-internal
157           --without-lxml
158           --disable-online-update
159           --with-external-tar=$env:USERPROFILE\lo\lo-externaltar
160           --with-strawberry-perl-portable=$env:USERPROFILE\lo\spp
161           --with-ant-home=$env:USERPROFILE\lo\apache-ant-1.10.15
162           --with-junit=$env:USERPROFILE\lo\junit-4.10.jar
163           --with-doxygen=$env:USERPROFILE\lo\spp\c\bin\doxygen.exe
164           #--enable-odk
165           #--disable-dependency-tracking
166           #--enable-dbgutil
167           #--with-lang=fr ja
168           "
169     - resource: xPSDesiredStateConfiguration/xScript
170       id: cloud-init-dir
171       directives:
172         description: create the ~/.cloud-init directory
173       settings:
174         TestScript: Test-Path -Path "$env:UserProfile/.cloud-init" -PathType "Container"
175         GetScript:  Test-Path -Path "$env:UserProfile/.cloud-init" -PathType "Container"
176         SetScript: New-Item -ItemType "directory" -Path "$env:UserProfile" -Name ".cloud-init"
177     - resource: xPSDesiredStateConfiguration/xScript
178       id: cloud-init-config
179       dependsOn:
180         - cloud-init-dir
181       directives:
182         description: create a cloud-init configuration to automate the installation of Ubuntu 24.04
183       settings:
184         TestScript: Test-Path -Path "$env:USERPROFILE/.cloud-init/Ubuntu-24.04.user-data"
185         GetScript:  Test-Path -Path "$env:USERPROFILE/.cloud-init/Ubuntu-24.04.user-data"
186         SetScript: |
187           New-Item -Path "$env:USERPROFILE/.cloud-init" -Name "Ubuntu-24.04.user-data" -ItemType "file" -Value '#cloud-config
188           users:
189             - name: ubuntu
190               # ubuntu
191               password: "$6$exDY1mhS4KUYCE/2$zmn9ToZwTKLhCw.b4/b.ZRTIZM30JZ4QrOQ2aOXJ8yk96xpcCof0kxKwuX1kqLG/ygbJ1f8wxED22bTL4F46P0"
192               groups: [user, adm, dialout, cdrom, floppy, sudo, audio, dip, video, plugdev, netdev]
193               shell: /bin/bash
195           write_files:
196           - path: /etc/wsl.conf
197             append: true
198             content: |
199               [user]
200               default=ubuntu
202           packages: [pkg-config, automake, make, gperf, bison, nasm, flex, zip, libfont-ttf-perl]
203           '
204     - resource: xPSDesiredStateConfiguration/xScript
205       id: install-Ubuntu
206       dependsOn:
207         - cloud-init-config
208       directives:
209         description: installs Ubuntu with help of the cloud-init file
210       settings:
211         TestScript: wsl.exe --list ; return ![bool]$LASTEXITCODE
212         GetScript:  wsl.exe --list ; return ![bool]$LASTEXITCODE
213         SetScript: |
214           wsl.exe --install --no-launch --distribution Ubuntu-24.04
215           ubuntu2404.exe install --root
216           ubuntu2404.exe run cloud-init status --wait
217   configurationVersion: 0.2.0