|
14 | 14 | env: |
15 | 15 | CARGO_TERM_COLOR: always |
16 | 16 |
|
17 | | -jobs: |
18 | | - # build-linux: |
19 | | - |
20 | | - # runs-on: ubuntu-latest |
21 | | - |
22 | | - # steps: |
23 | | - # - uses: actions/checkout@v3 |
24 | | - # - name: Build |
25 | | - # shell: pwsh |
26 | | - # run: ./build.ps1 -clippy |
27 | | - # - name: Run tests |
28 | | - # shell: pwsh |
29 | | - # run: ./build.ps1 -test |
30 | | - |
31 | | - build-linux: |
| 17 | +defaults: |
| 18 | + run: |
| 19 | + shell: pwsh |
32 | 20 |
|
| 21 | +jobs: |
| 22 | + linux-build: |
33 | 23 | runs-on: ubuntu-latest |
34 | | - |
35 | 24 | steps: |
36 | | - - uses: actions/checkout@v3 |
37 | | - - run: rustup target add x86_64-unknown-linux-musl |
38 | | - - name: Install musl build tools |
39 | | - run: sudo apt update && sudo apt install musl-tools -y |
40 | | - - name: Build |
41 | | - shell: pwsh |
42 | | - run: ./build.ps1 -clippy -target x86_64-unknown-linux-musl |
43 | | - - name: Run tests |
44 | | - shell: pwsh |
45 | | - run: ./build.ps1 -test -target x86_64-unknown-linux-musl |
46 | | - |
47 | | - build-windows: |
48 | | - |
49 | | - runs-on: windows-latest |
50 | | - |
| 25 | + - uses: actions/checkout@v5 |
| 26 | + - name: Install prerequisites |
| 27 | + run: ./build.new.ps1 -SkipBuild -Clippy -Verbose |
| 28 | + - name: Build |
| 29 | + run: ./build.new.ps1 -Clippy -Verbose |
| 30 | + - name: Run rust tests |
| 31 | + run: ./build.new.ps1 -SkipBuild -Test -ExcludePesterTests -Verbose |
| 32 | + - name: Prepare build artifact |
| 33 | + run: tar -cvf bin.tar bin/ |
| 34 | + - name: Upload build artifact |
| 35 | + uses: actions/upload-artifact@v4 |
| 36 | + with: |
| 37 | + name: linux-bin |
| 38 | + path: bin.tar |
| 39 | + linux-pester: |
| 40 | + needs: linux-build |
| 41 | + strategy: |
| 42 | + matrix: |
| 43 | + group: [dsc, adapters, extensions, resources] |
| 44 | + runs-on: ubuntu-latest |
51 | 45 | steps: |
52 | | - - uses: actions/checkout@v3 |
53 | | - - name: Build |
54 | | - shell: pwsh |
55 | | - run: ./build.ps1 -clippy |
56 | | - - name: Run tests |
57 | | - shell: pwsh |
58 | | - run: ./build.ps1 -test |
59 | | - |
60 | | - build-macos: |
| 46 | + - uses: actions/checkout@v5 |
| 47 | + - name: Download build artifact |
| 48 | + uses: actions/download-artifact@v4 |
| 49 | + with: |
| 50 | + name: linux-bin |
| 51 | + - name: Expand build artifact |
| 52 | + run: tar -xvf bin.tar |
| 53 | + - name: Test ${{matrix.group}} |
| 54 | + run: |- |
| 55 | + $params = @{ |
| 56 | + SkipBuild = $true |
| 57 | + Test = $true |
| 58 | + ExcludeRustTests = $true |
| 59 | + Verbose = $true |
| 60 | + } |
| 61 | + ./build.new.ps1 @params -PesterTestGroup ${{matrix.group}} |
61 | 62 |
|
| 63 | + macos-build: |
| 64 | + runs-on: macos-latest |
| 65 | + steps: |
| 66 | + - uses: actions/checkout@v5 |
| 67 | + - name: Install prerequisites |
| 68 | + run: ./build.new.ps1 -SkipBuild -Clippy -Verbose |
| 69 | + - name: Build |
| 70 | + run: ./build.new.ps1 -Clippy -Verbose |
| 71 | + - name: Run rust tests |
| 72 | + run: ./build.new.ps1 -SkipBuild -Test -ExcludePesterTests -Verbose |
| 73 | + - name: Prepare build artifact |
| 74 | + run: tar -cvf bin.tar bin/ |
| 75 | + - name: Upload build artifact |
| 76 | + uses: actions/upload-artifact@v4 |
| 77 | + with: |
| 78 | + name: macos-bin |
| 79 | + path: bin.tar |
| 80 | + macos-pester: |
| 81 | + needs: macos-build |
| 82 | + strategy: |
| 83 | + matrix: |
| 84 | + group: [dsc, adapters, extensions, resources] |
62 | 85 | runs-on: macos-latest |
| 86 | + steps: |
| 87 | + - uses: actions/checkout@v5 |
| 88 | + - name: Download build artifact |
| 89 | + uses: actions/download-artifact@v4 |
| 90 | + with: |
| 91 | + name: macos-bin |
| 92 | + - name: Expand build artifact |
| 93 | + run: tar -xvf bin.tar |
| 94 | + - name: Test ${{matrix.group}} |
| 95 | + run: |- |
| 96 | + $params = @{ |
| 97 | + SkipBuild = $true |
| 98 | + Test = $true |
| 99 | + ExcludeRustTests = $true |
| 100 | + Verbose = $true |
| 101 | + } |
| 102 | + ./build.new.ps1 @params -PesterTestGroup ${{matrix.group}} |
63 | 103 |
|
| 104 | + # Windows |
| 105 | + windows-build: |
| 106 | + runs-on: windows-latest |
| 107 | + steps: |
| 108 | + - uses: actions/checkout@v5 |
| 109 | + - name: Install prerequisites |
| 110 | + run: ./build.new.ps1 -SkipBuild -Clippy -Verbose |
| 111 | + - name: Build |
| 112 | + run: ./build.new.ps1 -Clippy -Verbose |
| 113 | + - name: Run rust tests |
| 114 | + run: ./build.new.ps1 -SkipBuild -Test -ExcludePesterTests -Verbose |
| 115 | + - name: List bin folder files |
| 116 | + run: Get-ChildItem bin |
| 117 | + - name: Prepare build artifact |
| 118 | + run: tar -cvf bin.tar bin |
| 119 | + - name: Upload build artifact |
| 120 | + uses: actions/upload-artifact@v4 |
| 121 | + with: |
| 122 | + name: windows-bin |
| 123 | + path: bin.tar |
| 124 | + windows-pester: |
| 125 | + needs: windows-build |
| 126 | + strategy: |
| 127 | + matrix: |
| 128 | + group: [dsc, adapters, extensions, resources] |
| 129 | + runs-on: windows-latest |
64 | 130 | steps: |
65 | | - - uses: actions/checkout@v3 |
66 | | - - name: Build |
67 | | - shell: pwsh |
68 | | - run: ./build.ps1 -clippy |
69 | | - - name: Run tests |
70 | | - shell: pwsh |
71 | | - run: ./build.ps1 -test |
| 131 | + - uses: actions/checkout@v5 |
| 132 | + - name: Download build artifact |
| 133 | + uses: actions/download-artifact@v4 |
| 134 | + with: |
| 135 | + name: windows-bin |
| 136 | + - name: Expand build artifact |
| 137 | + run: tar -xvf bin.tar |
| 138 | + - name: Test ${{matrix.group}} |
| 139 | + run: |- |
| 140 | + $params = @{ |
| 141 | + SkipBuild = $true |
| 142 | + Test = $true |
| 143 | + ExcludeRustTests = $true |
| 144 | + Verbose = $true |
| 145 | + } |
| 146 | + ./build.new.ps1 @params -PesterTestGroup ${{matrix.group}} |
0 commit comments