Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
144 changes: 78 additions & 66 deletions .github/instructions/instructions.md

Large diffs are not rendered by default.

30 changes: 15 additions & 15 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ jobs:
steps:
- uses: actions/checkout@v5
- name: Install prerequisites
run: ./build.new.ps1 -SkipBuild -Clippy -Verbose
run: ./build.ps1 -SkipBuild -Clippy -Verbose
- name: Generate documentation
run: ./build.new.ps1 -RustDocs -Verbose
run: ./build.ps1 -RustDocs -Verbose
- name: Test documentation
run: |-
$testParams = @{
Expand All @@ -40,17 +40,17 @@ jobs:
ExcludePesterTests = $true
Verbose = $true
}
./build.new.ps1 @testParams
./build.ps1 @testParams
linux-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Install prerequisites
run: ./build.new.ps1 -SkipBuild -Clippy -Verbose
run: ./build.ps1 -SkipBuild -Clippy -Verbose
- name: Build
run: ./build.new.ps1 -Clippy -Verbose
run: ./build.ps1 -Clippy -Verbose
- name: Run rust tests
run: ./build.new.ps1 -SkipBuild -Test -ExcludePesterTests -Verbose
run: ./build.ps1 -SkipBuild -Test -ExcludePesterTests -Verbose
- name: Prepare build artifact
run: tar -cvf bin.tar bin/
- name: Upload build artifact
Expand Down Expand Up @@ -81,18 +81,18 @@ jobs:
ExcludeRustTests = $true
Verbose = $true
}
./build.new.ps1 @params -PesterTestGroup ${{matrix.group}}
./build.ps1 @params -PesterTestGroup ${{matrix.group}}

macos-build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v5
- name: Install prerequisites
run: ./build.new.ps1 -SkipBuild -Clippy -Verbose
run: ./build.ps1 -SkipBuild -Clippy -Verbose
- name: Build
run: ./build.new.ps1 -Clippy -Verbose
run: ./build.ps1 -Clippy -Verbose
- name: Run rust tests
run: ./build.new.ps1 -SkipBuild -Test -ExcludePesterTests -Verbose
run: ./build.ps1 -SkipBuild -Test -ExcludePesterTests -Verbose
- name: Prepare build artifact
run: tar -cvf bin.tar bin/
- name: Upload build artifact
Expand Down Expand Up @@ -123,19 +123,19 @@ jobs:
ExcludeRustTests = $true
Verbose = $true
}
./build.new.ps1 @params -PesterTestGroup ${{matrix.group}}
./build.ps1 @params -PesterTestGroup ${{matrix.group}}

# Windows
windows-build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v5
- name: Install prerequisites
run: ./build.new.ps1 -SkipBuild -Clippy -Verbose
run: ./build.ps1 -SkipBuild -Clippy -Verbose
- name: Build
run: ./build.new.ps1 -Clippy -Verbose
run: ./build.ps1 -Clippy -Verbose
- name: Run rust tests
run: ./build.new.ps1 -SkipBuild -Test -ExcludePesterTests -Verbose
run: ./build.ps1 -SkipBuild -Test -ExcludePesterTests -Verbose
- name: List bin folder files
run: Get-ChildItem bin
- name: Prepare build artifact
Expand Down Expand Up @@ -168,4 +168,4 @@ jobs:
ExcludeRustTests = $true
Verbose = $true
}
./build.new.ps1 @params -PesterTestGroup ${{matrix.group}}
./build.ps1 @params -PesterTestGroup ${{matrix.group}}
24 changes: 12 additions & 12 deletions .pipelines/DSC-Official.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ extends:
- checkout: self
- pwsh: |
Write-Verbose -Verbose (Get-ChildItem '$(repoRoot)' | Out-String)
$packageVersion = $(repoRoot)/build.ps1 -GetPackageVersion
$packageVersion = $(repoRoot)/packaging.ps1 -GetPackageVersion
$vstsCommandString = "vso[task.setvariable variable=Version;isoutput=true]$packageVersion"
Write-Host ("sending " + $vstsCommandString)
Write-Host "##$vstsCommandString"
Expand Down Expand Up @@ -181,7 +181,7 @@ extends:
$null = New-Item -ItemType Directory -Path "./bin/msix" -Force -ErrorAction Ignore
Copy-Item "$(Pipeline.Workspace)/drop_BuildAndSign_BuildWin_x64/*.msix" ./bin/msix -Verbose
Copy-Item "$(Pipeline.Workspace)/drop_BuildAndSign_BuildWin_arm64/*.msix" ./bin/msix -Verbose
./build.ps1 -PackageType msixbundle
./packaging.ps1 -PackageType msixbundle
Copy-Item "$(System.DefaultWorkingDirectory)/DSC/bin/*.msixbundle" "$(ob_outputDirectory)"
displayName: 'Create msixbundle'
condition: succeeded()
Expand Down Expand Up @@ -323,10 +323,10 @@ extends:
$header = "Bearer $(AzToken)"
$env:CARGO_REGISTRIES_POWERSHELL_TOKEN = $header
$env:CARGO_REGISTRIES_POWERSHELL_CREDENTIAL_PROVIDER = 'cargo:token'
./build.ps1 -Release -Architecture x86_64-unknown-linux-musl
./build.ps1 -PackageType tgz -Architecture x86_64-unknown-linux-musl -Release
./build.ps1 -PackageType rpm -Architecture x86_64-unknown-linux-musl -Release
./build.ps1 -PackageType deb -Architecture x86_64-unknown-linux-musl -Release
./packaging.ps1 -Release -Architecture x86_64-unknown-linux-musl
./packaging.ps1 -PackageType tgz -Architecture x86_64-unknown-linux-musl -Release
./packaging.ps1 -PackageType rpm -Architecture x86_64-unknown-linux-musl -Release
./packaging.ps1 -PackageType deb -Architecture x86_64-unknown-linux-musl -Release
Copy-Item ./bin/*.tar.gz "$(ob_outputDirectory)"
Copy-Item ./bin/*.rpm "$(ob_outputDirectory)"
Copy-Item ./bin/*.deb "$(ob_outputDirectory)"
Expand Down Expand Up @@ -386,10 +386,10 @@ extends:
$header = "Bearer $(AzToken)"
$env:CARGO_REGISTRIES_POWERSHELL_TOKEN = $header
$env:CARGO_REGISTRIES_POWERSHELL_CREDENTIAL_PROVIDER = 'cargo:token'
./build.ps1 -Release -Architecture aarch64-unknown-linux-musl
./build.ps1 -PackageType tgz -Architecture aarch64-unknown-linux-musl -Release
./build.ps1 -PackageType rpm -Architecture aarch64-unknown-linux-musl -Release
./build.ps1 -PackageType deb -Architecture aarch64-unknown-linux-musl -Release
./packaging.ps1 -Release -Architecture aarch64-unknown-linux-musl
./packaging.ps1 -PackageType tgz -Architecture aarch64-unknown-linux-musl -Release
./packaging.ps1 -PackageType rpm -Architecture aarch64-unknown-linux-musl -Release
./packaging.ps1 -PackageType deb -Architecture aarch64-unknown-linux-musl -Release
Copy-Item ./bin/*.tar.gz "$(ob_outputDirectory)"
Copy-Item ./bin/*.rpm "$(ob_outputDirectory)"
Copy-Item ./bin/*.deb "$(ob_outputDirectory)"
Expand Down Expand Up @@ -436,8 +436,8 @@ extends:
$env:CARGO_REGISTRIES_POWERSHELL_TOKEN = $header
$env:CARGO_REGISTRIES_POWERSHELL_CREDENTIAL_PROVIDER = 'cargo:token'
Write-Verbose -Verbose "Building for $(buildName)"
./build.ps1 -Release -Architecture $(buildName)
./build.ps1 -PackageType tgz -Architecture $(buildName) -Release
./packaging.ps1 -Release -Architecture $(buildName)
./packaging.ps1 -PackageType tgz -Architecture $(buildName) -Release
Copy-Item ./bin/*.tar.gz "$(ob_outputDirectory)"
Write-Host "##vso[artifact.upload containerfolder=release;artifactname=release]$(ob_outputDirectory)/DSC-$(PackageVersion)-$(buildName).tar.gz"
displayName: 'Build $(buildName)'
Expand Down
6 changes: 3 additions & 3 deletions .pipelines/DSC-Windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ steps:
$env:PATH += ";$LLVMBIN"
write-verbose -verbose (gcm clang.exe | out-string)
Write-Verbose -Verbose "Building for ${{ parameters.buildName }}"
./build.ps1 -Release -Architecture ${{ parameters.buildName }} -SkipLinkCheck
./packaging.ps1 -Release -Architecture ${{ parameters.buildName }} -SkipLinkCheck
displayName: 'Build ${{ parameters.buildName }}'
env:
ob_restore_phase: true
Expand Down Expand Up @@ -95,13 +95,13 @@ steps:
OverWrite: true
- pwsh: |
Set-Location "$(Build.SourcesDirectory)/DSC"
./build.ps1 -PackageType zip -Architecture ${{ parameters.buildName }} -Release
./packaging.ps1 -PackageType zip -Architecture ${{ parameters.buildName }} -Release
Copy-Item ./bin/*.zip "$(Build.ArtifactStagingDirectory)" -Verbose
displayName: 'Zip ${{ parameters.buildName }}'
condition: succeeded()
- pwsh: |
Set-Location "$(Build.SourcesDirectory)/DSC"
./build.ps1 -PackageType msix -Architecture ${{ parameters.buildName }} -Release -UseX64MakeAppx
./packaging.ps1 -PackageType msix -Architecture ${{ parameters.buildName }} -Release -UseX64MakeAppx
Copy-Item ./bin/msix/*.msix "$(Build.ArtifactStagingDirectory)" -Verbose
displayName: 'Create msix for ${{ parameters.buildName }}'
condition: succeeded()
2 changes: 1 addition & 1 deletion .vscode/schemas/definitions.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"$defs": {
"BuildDataFile": {
"title": "Build Data",
"markdownDescription": "Defines metadata required for building, testing, and packaging DSC and all related projects with the `build.new.ps1` build script.",
"markdownDescription": "Defines metadata required for building, testing, and packaging DSC and all related projects with the `build.ps1` build script.",
"type": "object",
"required": ["PackageFiles", "Projects"],
"unevaluatedProperties": false,
Expand Down
6 changes: 3 additions & 3 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"label": "DSC: Build",
"detail": "Compiles the Rust crates and copies all build artifacts into the `bin` folder.",
"type": "shell",
"command": "${workspaceFolder}/build.new.ps1",
"command": "${workspaceFolder}/build.ps1",
"args": [
"-Clippy:${input:Clippy}",
"-Verbose",
Expand All @@ -22,7 +22,7 @@
"label": "DSC: Test (All)",
"detail": "Tests every project with optional skipping of building the projects, Clippy linting, Rust tests, and Pester tests.",
"type": "shell",
"command": "${workspaceFolder}/build.new.ps1",
"command": "${workspaceFolder}/build.ps1",
"args": [
"-SkipBuild:${input:SkipBuild}",
"-Test",
Expand All @@ -40,7 +40,7 @@
"label": "DSC: Test Rust",
"detail": "Tests the Rust projects with optional skipping of building the projects and Clippy linting.",
"type": "shell",
"command": "${workspaceFolder}/build.new.ps1",
"command": "${workspaceFolder}/build.ps1",
"args": [
"-SkipBuild:${input:SkipBuild}",
"-Test",
Expand Down
24 changes: 12 additions & 12 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ For more information, see [Contributor License Agreements][01].
Building the DSC project requires PowerShell 7.2 or later to execute the build script. For more
information about installing PowerShell, see [Install PowerShell on Windows, Linux, and macOS][02].

DSC requires other tools for building the project. The build script (`build.new.ps1`) installs the
DSC requires other tools for building the project. The build script (`build.ps1`) installs the
tools in the following table if they aren't already installed on your system:

| Tool | Version | Platforms | Projects |
Expand Down Expand Up @@ -118,16 +118,16 @@ tools in the following table if they aren't already installed on your system:

```powershell
# Build the project
./build.new.ps1
./build.ps1

# Build with linting (recommended)
./build.new.ps1 -Clippy
./build.ps1 -Clippy

# Build and run all tests
./build.new.ps1 -Clippy -Test
./build.ps1 -Clippy -Test

# Build in release mode (optimized)
./build.new.ps1 -Release
./build.ps1 -Release
```

#### Running tests
Expand All @@ -136,16 +136,16 @@ DSCv3 includes Rust unit tests and PowerShell Pester tests:

```powershell
# Run all tests
./build.new.ps1 -Test
./build.ps1 -Test

# Run only Rust tests
./build.new.ps1 -Test -ExcludePesterTests
./build.ps1 -Test -ExcludePesterTests

# Run only Pester tests
./build.new.ps1 -Test -ExcludeRustTests
./build.ps1 -Test -ExcludeRustTests

# Run specific Pester test groups
./build.new.ps1 -SkipBuild -Test -ExcludeRustTests -PesterTestGroup dsc
./build.ps1 -SkipBuild -Test -ExcludeRustTests -PesterTestGroup dsc
```

Available Pester test groups include:
Expand All @@ -163,13 +163,13 @@ for other platforms and architectures with the `-Architecture` parameter:

```powershell
# Windows ARM
./build.new.ps1 -Architecture aarch64-pc-windows-msvc
./build.ps1 -Architecture aarch64-pc-windows-msvc

# macOS Apple Silicon
./build.new.ps1 -Architecture aarch64-apple-darwin
./build.ps1 -Architecture aarch64-apple-darwin

# Linux x64
./build.new.ps1 -Architecture x86_64-unknown-linux-gnu
./build.ps1 -Architecture x86_64-unknown-linux-gnu
```

#### Additional Information
Expand Down
Loading