Merge pull request #1211 from Gijsreyn/gh-57/main/add-last-function #3287
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Rust | |
| on: | |
| push: | |
| branches: [ "main", "release/*" ] | |
| pull_request: | |
| branches: [ "main", "release/*" ] | |
| paths-ignore: | |
| - "docs/**" | |
| - "*.md" | |
| - ".vscode/*.json" | |
| - ".github/ISSUE_TEMPLATE/**" | |
| env: | |
| CARGO_TERM_COLOR: always | |
| defaults: | |
| run: | |
| shell: pwsh | |
| jobs: | |
| docs: | |
| strategy: | |
| matrix: | |
| platform: [ubuntu-latest, macos-latest, windows-latest] | |
| runs-on: ${{matrix.platform}} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install prerequisites | |
| run: ./build.new.ps1 -SkipBuild -Clippy -Verbose | |
| - name: Generate documentation | |
| run: ./build.new.ps1 -RustDocs -Verbose | |
| - name: Test documentation | |
| run: |- | |
| $testParams = @{ | |
| SkipBuild = $true | |
| RustDocs = $true | |
| Test = $true | |
| ExcludeRustTests = $true | |
| ExcludePesterTests = $true | |
| Verbose = $true | |
| } | |
| ./build.new.ps1 @testParams | |
| linux-build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install prerequisites | |
| run: ./build.new.ps1 -SkipBuild -Clippy -Verbose | |
| - name: Build | |
| run: ./build.new.ps1 -Clippy -Verbose | |
| - name: Run rust tests | |
| run: ./build.new.ps1 -SkipBuild -Test -ExcludePesterTests -Verbose | |
| - name: Prepare build artifact | |
| run: tar -cvf bin.tar bin/ | |
| - name: Upload build artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: linux-bin | |
| path: bin.tar | |
| linux-pester: | |
| needs: linux-build | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| group: [dsc, adapters, extensions, resources] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Download build artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: linux-bin | |
| - name: Expand build artifact | |
| run: tar -xvf bin.tar | |
| - name: Test ${{matrix.group}} | |
| run: |- | |
| $params = @{ | |
| SkipBuild = $true | |
| Test = $true | |
| ExcludeRustTests = $true | |
| Verbose = $true | |
| } | |
| ./build.new.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 | |
| - name: Build | |
| run: ./build.new.ps1 -Clippy -Verbose | |
| - name: Run rust tests | |
| run: ./build.new.ps1 -SkipBuild -Test -ExcludePesterTests -Verbose | |
| - name: Prepare build artifact | |
| run: tar -cvf bin.tar bin/ | |
| - name: Upload build artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: macos-bin | |
| path: bin.tar | |
| macos-pester: | |
| needs: macos-build | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| group: [dsc, adapters, extensions, resources] | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Download build artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: macos-bin | |
| - name: Expand build artifact | |
| run: tar -xvf bin.tar | |
| - name: Test ${{matrix.group}} | |
| run: |- | |
| $params = @{ | |
| SkipBuild = $true | |
| Test = $true | |
| ExcludeRustTests = $true | |
| Verbose = $true | |
| } | |
| ./build.new.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 | |
| - name: Build | |
| run: ./build.new.ps1 -Clippy -Verbose | |
| - name: Run rust tests | |
| run: ./build.new.ps1 -SkipBuild -Test -ExcludePesterTests -Verbose | |
| - name: List bin folder files | |
| run: Get-ChildItem bin | |
| - name: Prepare build artifact | |
| run: tar -cvf bin.tar bin | |
| - name: Upload build artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: windows-bin | |
| path: bin.tar | |
| windows-pester: | |
| needs: windows-build | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| group: [dsc, adapters, extensions, resources] | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Download build artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: windows-bin | |
| - name: Expand build artifact | |
| run: tar -xvf bin.tar | |
| - name: Test ${{matrix.group}} | |
| run: |- | |
| $params = @{ | |
| SkipBuild = $true | |
| Test = $true | |
| ExcludeRustTests = $true | |
| Verbose = $true | |
| } | |
| ./build.new.ps1 @params -PesterTestGroup ${{matrix.group}} |