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
146 changes: 0 additions & 146 deletions .github/workflows/rust.new.yml

This file was deleted.

169 changes: 122 additions & 47 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,58 +14,133 @@ on:
env:
CARGO_TERM_COLOR: always

jobs:
# build-linux:

# runs-on: ubuntu-latest

# steps:
# - uses: actions/checkout@v3
# - name: Build
# shell: pwsh
# run: ./build.ps1 -clippy
# - name: Run tests
# shell: pwsh
# run: ./build.ps1 -test

build-linux:
defaults:
run:
shell: pwsh

jobs:
linux-build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- run: rustup target add x86_64-unknown-linux-musl
- name: Install musl build tools
run: sudo apt update && sudo apt install musl-tools -y
- name: Build
shell: pwsh
run: ./build.ps1 -clippy -target x86_64-unknown-linux-musl
- name: Run tests
shell: pwsh
run: ./build.ps1 -test -target x86_64-unknown-linux-musl

build-windows:

runs-on: windows-latest

- 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:
matrix:
group: [dsc, adapters, extensions, resources]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build
shell: pwsh
run: ./build.ps1 -clippy
- name: Run tests
shell: pwsh
run: ./build.ps1 -test

build-macos:
- 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:
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:
matrix:
group: [dsc, adapters, extensions, resources]
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Build
shell: pwsh
run: ./build.ps1 -clippy
- name: Run tests
shell: pwsh
run: ./build.ps1 -test
- 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}}