Skip to content

Commit ed7d8a7

Browse files
authored
Merge pull request #573 from SteveL-MSFT/update-crates
Update crates and remove dependency on node for building
2 parents 28c626b + 8796398 commit ed7d8a7

File tree

35 files changed

+49990
-3853
lines changed

35 files changed

+49990
-3853
lines changed

.pipelines/DSC-Official.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ variables:
1919
BuildConfiguration: 'release'
2020
PackageRoot: '$(System.ArtifactsDirectory)/Packages'
2121
# LinuxContainerImage: 'mcr.microsoft.com/onebranch/cbl-mariner/build:2.0'
22-
LinuxContainerImage: 'onebranch.azurecr.io/linux/ubuntu-2204:latest'
2322
WindowsContainerImage: 'onebranch.azurecr.io/windows/ltsc2022/vse2022:latest'
23+
Codeql.TSAEnabled: true
2424

2525
resources:
2626
repositories:
@@ -228,6 +228,7 @@ extends:
228228
- job: BuildLinux
229229
dependsOn: SetPackageVersion
230230
variables:
231+
LinuxContainerImage: 'onebranch.azurecr.io/linux/ubuntu-2204:latest'
231232
PackageVersion: $[ dependencies.SetPackageVersion.outputs['Package.Version'] ]
232233
ob_outputDirectory: '$(Build.ArtifactStagingDirectory)'
233234
displayName: Linux-x64-gnu
@@ -252,11 +253,13 @@ extends:
252253
- job: BuildLinuxArm64
253254
dependsOn: SetPackageVersion
254255
variables:
256+
LinuxContainerImage: 'onebranch.azurecr.io/linux/ubuntu-2004-arm64:latest'
255257
PackageVersion: $[ dependencies.SetPackageVersion.outputs['Package.Version'] ]
256258
ob_outputDirectory: '$(Build.ArtifactStagingDirectory)'
257259
displayName: Linux-ARM64-gnu
258260
pool:
259261
type: linux
262+
hostArchitecture: arm64
260263
steps:
261264
- task: RustInstaller@1
262265
inputs:
@@ -269,6 +272,9 @@ extends:
269272
- pwsh: |
270273
apt update
271274
apt -y install gcc-aarch64-linux-gnu
275+
if ((openssl version -d) -match 'OPENSSLDIR: "(?<dir>.*?)"') {
276+
$env:OPENSSL_LIB_DIR = $matches['dir']
277+
}
272278
./build.ps1 -Release -Architecture aarch64-unknown-linux-gnu
273279
./build.ps1 -PackageType tgz -Architecture aarch64-unknown-linux-gnu -Release
274280
Copy-Item ./bin/*.tar.gz "$(ob_outputDirectory)"
@@ -278,6 +284,7 @@ extends:
278284
- job: BuildLinuxMusl
279285
dependsOn: SetPackageVersion
280286
variables:
287+
LinuxContainerImage: 'onebranch.azurecr.io/linux/ubuntu-2204:latest'
281288
PackageVersion: $[ dependencies.SetPackageVersion.outputs['Package.Version'] ]
282289
ob_outputDirectory: '$(Build.ArtifactStagingDirectory)'
283290
displayName: Linux-x64-musl
@@ -304,11 +311,13 @@ extends:
304311
- job: BuildLinuxArm64Musl
305312
dependsOn: SetPackageVersion
306313
variables:
314+
LinuxContainerImage: 'onebranch.azurecr.io/linux/ubuntu-2004-arm64:latest'
307315
PackageVersion: $[ dependencies.SetPackageVersion.outputs['Package.Version'] ]
308316
ob_outputDirectory: '$(Build.ArtifactStagingDirectory)'
309317
displayName: Linux-ARM64-musl
310318
pool:
311319
type: linux
320+
hostArchitecture: arm64
312321
steps:
313322
- task: RustInstaller@1
314323
inputs:
@@ -327,7 +336,12 @@ extends:
327336
apt -y install llvm
328337
apt -y install musl-tools
329338
apt -y install gcc-multilib
339+
apt -y install libssl-dev
340+
apt -y install pkg-config
330341
rustup default stable-aarch64-unknown-linux-musl
342+
if ((openssl version -d) -match 'OPENSSLDIR: "(?<dir>.*?)"') {
343+
$env:OPENSSL_LIB_DIR = $matches['dir']
344+
}
331345
./build.ps1 -Release -Architecture aarch64-unknown-linux-musl
332346
./build.ps1 -PackageType tgz -Architecture aarch64-unknown-linux-musl -Release
333347
Copy-Item ./bin/*.tar.gz "$(ob_outputDirectory)"

NOTICE.txt

Lines changed: 48625 additions & 0 deletions
Large diffs are not rendered by default.

build.ps1

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ param(
1414
[switch]$SkipLinkCheck,
1515
[switch]$UseX64MakeAppx,
1616
[switch]$UseCratesIO,
17-
[switch]$UpdateLockFile
17+
[switch]$UpdateLockFile,
18+
[switch]$Audit
1819
)
1920

2021
if ($GetPackageVersion) {
@@ -32,6 +33,7 @@ $filesForWindowsPackage = @(
3233
'echo.dsc.resource.json',
3334
'assertion.dsc.resource.json',
3435
'group.dsc.resource.json',
36+
'NOTICE.txt',
3537
'powershell.dsc.resource.json',
3638
'psDscAdapter/',
3739
'reboot_pending.dsc.resource.json',
@@ -53,6 +55,7 @@ $filesForLinuxPackage = @(
5355
'apt.dsc.resource.json',
5456
'apt.dsc.resource.sh',
5557
'group.dsc.resource.json',
58+
'NOTICE.txt',
5659
'powershell.dsc.resource.json',
5760
'psDscAdapter/',
5861
'RunCommandOnSet.dsc.resource.json',
@@ -67,6 +70,7 @@ $filesForMacPackage = @(
6770
'brew.dsc.resource.json',
6871
'brew.dsc.resource.sh',
6972
'group.dsc.resource.json',
73+
'NOTICE.txt',
7074
'powershell.dsc.resource.json',
7175
'psDscAdapter/',
7276
'RunCommandOnSet.dsc.resource.json',
@@ -222,7 +226,8 @@ if (!$SkipBuild) {
222226
"runcommandonset",
223227
"tools/dsctest",
224228
"tools/test_group_resource",
225-
"y2j"
229+
"y2j",
230+
"."
226231
)
227232
$pedantic_unclean_projects = @()
228233
$clippy_unclean_projects = @("tree-sitter-dscexpression")
@@ -252,6 +257,14 @@ if (!$SkipBuild) {
252257
cargo generate-lockfile
253258
}
254259
else {
260+
if ($Audit) {
261+
if ($null -eq (Get-Command cargo-audit -ErrorAction Ignore)) {
262+
cargo install cargo-audit --features=fix
263+
}
264+
265+
cargo audit fix
266+
}
267+
255268
./build.ps1
256269
}
257270
}
@@ -276,6 +289,14 @@ if (!$SkipBuild) {
276289
cargo generate-lockfile
277290
}
278291
else {
292+
if ($Audit) {
293+
if ($null -eq (Get-Command cargo-audit -ErrorAction Ignore)) {
294+
cargo install cargo-audit --features=fix
295+
}
296+
297+
cargo audit fix
298+
}
299+
279300
cargo build @flags
280301
}
281302
}

copy_files.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
NOTICE.txt

0 commit comments

Comments
 (0)