Skip to content

Commit e7c86ad

Browse files
authored
Merge branch 'main' into copilot/create-rpm-package
2 parents 969ba76 + f8b3429 commit e7c86ad

File tree

144 files changed

+9141
-1679
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

144 files changed

+9141
-1679
lines changed

.cargo/config.toml

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,33 @@ POWERSHELL = { index = "sparse+https://pkgs.dev.azure.com/powershell/PowerShell/
88
[registry]
99
global-credential-providers = ["cargo:token"]
1010

11-
# Enable Control Flow Guard (needed for OneBranch's post-build analysis).
11+
# Avoid linking with vcruntime140.dll by statically linking everything,
12+
# and then explicitly linking with ucrtbase.dll dynamically.
13+
# We do this, because vcruntime140.dll is an optional Windows component.
1214
[target.x86_64-pc-windows-msvc]
13-
rustflags = ["-Ccontrol-flow-guard", "-Ctarget-feature=+crt-static", "-Clink-args=/DYNAMICBASE /CETCOMPAT"]
15+
rustflags = [
16+
"-Ccontrol-flow-guard",
17+
"-Ctarget-feature=+crt-static",
18+
"-Clink-args=/DEFAULTLIB:ucrt.lib",
19+
"-Clink-args=/NODEFAULTLIB:vcruntime.lib",
20+
"-Clink-args=/NODEFAULTLIB:msvcrt.lib",
21+
"-Clink-args=/NODEFAULTLIB:libucrt.lib",
22+
"-Clink-args=/DYNAMICBASE",
23+
"-Clink-args=/CETCOMPAT",
24+
"-Dwarnings"
25+
]
1426

1527
[target.aarch64-windows-msvc]
16-
rustflags = ["-Ccontrol-flow-guard", "-Ctarget-feature=+crt-static", "-Clink-args=/DYNAMICBASE"]
28+
rustflags = [
29+
"-Ccontrol-flow-guard",
30+
"-Ctarget-feature=+crt-static",
31+
"-Clink-args=/DEFAULTLIB:ucrt.lib",
32+
"-Clink-args=/NODEFAULTLIB:vcruntime.lib",
33+
"-Clink-args=/NODEFAULTLIB:msvcrt.lib",
34+
"-Clink-args=/NODEFAULTLIB:libucrt.lib",
35+
"-Clink-args=/DYNAMICBASE",
36+
"-Dwarnings"
37+
]
1738

1839
# The following is only needed for release builds
1940
[source.crates-io]

.github/ISSUE_TEMPLATE/Feature_Request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ body:
1414
new feature would solve. Try formulating it in user story style
1515
(if applicable).
1616
placeholder: >-
17-
'As a user I want X so that Y...' with X being the being the
17+
'As a user I want X so that Y...' with X being the
1818
action and Y being the value of the action.
1919
validations:
2020
required: true

.github/workflows/rust.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,28 @@ defaults:
1919
shell: pwsh
2020

2121
jobs:
22+
docs:
23+
strategy:
24+
matrix:
25+
platform: [ubuntu-latest, macos-latest, windows-latest]
26+
runs-on: ${{matrix.platform}}
27+
steps:
28+
- uses: actions/checkout@v5
29+
- name: Install prerequisites
30+
run: ./build.new.ps1 -SkipBuild -Clippy -Verbose
31+
- name: Generate documentation
32+
run: ./build.new.ps1 -RustDocs -Verbose
33+
- name: Test documentation
34+
run: |-
35+
$testParams = @{
36+
SkipBuild = $true
37+
RustDocs = $true
38+
Test = $true
39+
ExcludeRustTests = $true
40+
ExcludePesterTests = $true
41+
Verbose = $true
42+
}
43+
./build.new.ps1 @testParams
2244
linux-build:
2345
runs-on: ubuntu-latest
2446
steps:
@@ -39,6 +61,7 @@ jobs:
3961
linux-pester:
4062
needs: linux-build
4163
strategy:
64+
fail-fast: false
4265
matrix:
4366
group: [dsc, adapters, extensions, resources]
4467
runs-on: ubuntu-latest
@@ -80,6 +103,7 @@ jobs:
80103
macos-pester:
81104
needs: macos-build
82105
strategy:
106+
fail-fast: false
83107
matrix:
84108
group: [dsc, adapters, extensions, resources]
85109
runs-on: macos-latest
@@ -124,6 +148,7 @@ jobs:
124148
windows-pester:
125149
needs: windows-build
126150
strategy:
151+
fail-fast: false
127152
matrix:
128153
group: [dsc, adapters, extensions, resources]
129154
runs-on: windows-latest

.pipelines/DSC-Official.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,7 @@ extends:
585585
throw "PackageVersion variable is not set. Cannot proceed with publishing Universal Package."
586586
}
587587
Write-Verbose -Verbose "Universal Package version: $packageVersion"
588-
az artifacts universal publish --organization https://dev.azure.com//PowerShell --project PowerShell --feed PowerShell-Universal --name microsoft.dsc-linux --version $packageVersion --description "Microsoft Desired State Configuration (DSC) - Universal Package" --path "$(LinuxDirectory)" --scope project --verbose
588+
az artifacts universal publish --organization https://dev.azure.com/PowerShell --project PowerShell --feed PowerShell-Universal --name microsoft.dsc-linux --version $packageVersion --description "Microsoft Desired State Configuration (DSC) - Universal Package" --path "$(LinuxDirectory)" --scope project --verbose
589589
condition: succeeded()
590590

591591
- task: AzureCLI@2

.vscode/schemas/build.data.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"$ref": "./definitions.json#/$defs/BuildDataFile"
4+
}

.vscode/schemas/definitions.json

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

.vscode/schemas/project.data.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"$ref": "./definitions.json#/$defs/ProjectDataFile"
4+
}

.vscode/settings.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@
44
{
55
"fileMatch": ["**/*.dsc.resource.json"],
66
"url": "/schemas/v3/bundled/resource/manifest.vscode.json"
7+
},
8+
{
9+
"fileMatch": ["build.data.json"],
10+
"url": "./.vscode/schemas/build.data.json"
11+
},
12+
{
13+
"fileMatch": ["**/.project.data.json"],
14+
"url": "./.vscode/schemas/project.data.json"
715
}
816
],
917
"yaml.schemas": {

.vscode/tasks.json

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
{
2+
// See https://go.microsoft.com/fwlink/?LinkId=733558
3+
// for the documentation about the tasks.json format
4+
"version": "2.0.0",
5+
"tasks": [
6+
{
7+
"label": "DSC: Build",
8+
"detail": "Compiles the Rust crates and copies all build artifacts into the `bin` folder.",
9+
"type": "shell",
10+
"command": "${workspaceFolder}/build.new.ps1",
11+
"args": [
12+
"-Clippy:${input:Clippy}",
13+
"-Verbose",
14+
],
15+
"group": {
16+
"kind": "build",
17+
"isDefault": true,
18+
},
19+
"problemMatcher": [],
20+
},
21+
{
22+
"label": "DSC: Test (All)",
23+
"detail": "Tests every project with optional skipping of building the projects, Clippy linting, Rust tests, and Pester tests.",
24+
"type": "shell",
25+
"command": "${workspaceFolder}/build.new.ps1",
26+
"args": [
27+
"-SkipBuild:${input:SkipBuild}",
28+
"-Test",
29+
"-Clippy:${input:Clippy}",
30+
"-ExcludePesterTests:${input:ExcludePesterTests}",
31+
"-ExcludeRustTests:${input:ExcludeRustTests}",
32+
"-Verbose",
33+
],
34+
"group": {
35+
"kind": "test",
36+
"isDefault": true,
37+
},
38+
},
39+
{
40+
"label": "DSC: Test Rust",
41+
"detail": "Tests the Rust projects with optional skipping of building the projects and Clippy linting.",
42+
"type": "shell",
43+
"command": "${workspaceFolder}/build.new.ps1",
44+
"args": [
45+
"-SkipBuild:${input:SkipBuild}",
46+
"-Test",
47+
"-Clippy:${input:Clippy}",
48+
"-ExcludePesterTests",
49+
"-Verbose",
50+
],
51+
"group": "test"
52+
},
53+
],
54+
"inputs": [
55+
{
56+
"id": "SkipBuild",
57+
"description": "SkipBuild: Defines whether to skip building the projects.",
58+
"type": "pickString",
59+
"default": "$false",
60+
"options": ["$true", "$false"]
61+
},
62+
{
63+
"id": "Clippy",
64+
"description": "Clippy: Defines whether to lint Rust projects with clippy.",
65+
"type": "pickString",
66+
"default": "$true",
67+
"options": ["$true", "$false"]
68+
},
69+
{
70+
"id": "ExcludePesterTests",
71+
"description": "ExcludePesterTests: Defines whether to test without invoking Pester.",
72+
"type": "pickString",
73+
"default": "$false",
74+
"options": ["$true", "$false"]
75+
},
76+
{
77+
"id": "ExcludeRustTests",
78+
"description": "ExcludePesterTests: Defines whether to test without invoking `cargo test`.",
79+
"type": "pickString",
80+
"default": "$false",
81+
"options": ["$true", "$false"]
82+
},
83+
]
84+
}

0 commit comments

Comments
 (0)