|
11 | 11 |
|
12 | 12 | jobs: |
13 | 13 | build-and-test: |
14 | | - runs-on: ubuntu-latest |
| 14 | + name: Build ${{ matrix.name }} |
| 15 | + runs-on: ${{ matrix.os }} |
| 16 | + timeout-minutes: 5 |
15 | 17 |
|
16 | 18 | permissions: |
17 | 19 | contents: read |
18 | 20 | attestations: read |
19 | 21 |
|
20 | | - timeout-minutes: 5 |
| 22 | + strategy: |
| 23 | + fail-fast: true |
| 24 | + matrix: |
| 25 | + include: |
| 26 | + - { os: ubuntu-24.04, name: linux-x64, ext: so, arch: 'x64' } |
| 27 | + - { os: ubuntu-24.04-arm, name: linux-arm64, ext: so, arch: 'arm64' } |
| 28 | + - { os: windows-2025, name: win-x64, ext: dll, arch: 'x64' } |
| 29 | + - { os: windows-2025, name: win-x86, ext: dll, arch: 'x86' } |
| 30 | + - { os: windows-11-arm, name: win-arm64, ext: dll, arch: 'arm64' } |
| 31 | + - { os: macos-15, name: osx-arm64, ext: dylib, arch: 'arm64' } |
| 32 | + - { os: macos-15-intel, name: osx-x64, ext: dylib, arch: 'x64' } |
| 33 | + |
21 | 34 | steps: |
22 | 35 | - name: Checkout |
23 | 36 | uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
24 | 37 |
|
25 | 38 | - name: Setup .NET SDK |
| 39 | + if: ${{ matrix.name != 'win-x86' }} |
26 | 40 | uses: actions/setup-dotnet@baa11fbfe1d6520db94683bd5c7a3818018e4309 # v5.1.0 |
27 | 41 | with: |
28 | 42 | dotnet-version: '10.0.x' |
29 | 43 |
|
| 44 | + - name: Install dotnet x86 |
| 45 | + if: ${{ matrix.name == 'win-x86' }} |
| 46 | + run: | |
| 47 | + iwr -Uri https://dot.net/v1/dotnet-install.ps1 -OutFile dotnet-install.ps1 -UseBasicParsing |
| 48 | + ./dotnet-install.ps1 -Channel 10.0 -Architecture x86 -InstallDir "C:/Program Files (x86)/dotnet" |
| 49 | +
|
| 50 | + - name: Show info |
| 51 | + run: dotnet --info |
| 52 | + |
30 | 53 | - name: Install dependencies |
31 | | - run: dotnet restore |
| 54 | + run: | |
| 55 | + dotnet restore ./ZstdNet/ZstdNet.csproj --runtime ${{ matrix.name }} |
| 56 | + dotnet restore ./ZstdNet.Tests/ZstdNet.Tests.csproj --runtime ${{ matrix.name }} |
32 | 57 |
|
33 | 58 | - name: Download native libs |
34 | 59 | uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 |
35 | 60 | with: |
36 | 61 | github-token: ${{ secrets.GITHUB_TOKEN }} |
37 | 62 | run-id: 22015842187 # https://github.com/skbkontur/ZstdNet/actions/runs/22015842187 |
38 | 63 | merge-multiple: true |
| 64 | + name: ${{ matrix.name }} |
39 | 65 | path: ./ZstdNet/ |
40 | 66 |
|
41 | 67 | - name: Check attestation |
42 | 68 | env: |
43 | 69 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 70 | + GH_FORCE_TTY: '100%' |
44 | 71 | run: | |
45 | | - find ./ZstdNet/runtimes -path "*/native/libzstd.*" -type f -print -exec gh attestation verify {} --repo skbkontur/ZstdNet ';' |
| 72 | + gh attestation verify ./ZstdNet/runtimes/${{ matrix.name }}/native/libzstd.${{ matrix.ext }} --repo skbkontur/ZstdNet |
46 | 73 |
|
47 | 74 | - name: Build |
48 | | - run: dotnet build --configuration Release --no-restore |
| 75 | + run: | |
| 76 | + dotnet build ./ZstdNet/ZstdNet.csproj --no-restore --runtime ${{ matrix.name }} |
| 77 | + dotnet build ./ZstdNet.Tests/ZstdNet.Tests.csproj --no-restore --runtime ${{ matrix.name }} |
49 | 78 |
|
50 | 79 | - name: Test |
51 | | - run: dotnet test --configuration Release --no-build |
| 80 | + run: dotnet test ./ZstdNet.Tests/ZstdNet.Tests.csproj --no-build --runtime ${{ matrix.name }} |
0 commit comments