Skip to content

Update for SDK 2.1.0 #62

Update for SDK 2.1.0

Update for SDK 2.1.0 #62

Workflow file for this run

name: Build
on: [push, pull_request]
jobs:
Test-Scripts:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Test scripts
shell: pwsh
run: |
$pesterConfig = @{
Run = @{
Path = ".\tests\common.Tests.ps1"
Exit = $true
}
TestResult = @{
Enabled = $true
OutputPath = "testResults.xml"
OutputFormat = "NUnitXML"
}
Output = @{
Verbosity = "Detailed"
}
}
Invoke-Pester -Configuration $pesterConfig
- name: Upload test results
uses: actions/upload-artifact@v4
with:
name: Pester-Test-Results
path: testResults.xml
Build:
runs-on: windows-latest
needs: Test-Scripts
strategy:
fail-fast: false
matrix:
config: [x64, x64-standalone]
build-type: [system]
include:
- { config: x64-standalone, build-type: user }
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup MSYS2
uses: msys2/setup-msys2@v2
- name: Check OpenOCD repository
shell: pwsh
run: .\packages\common\build-id.ps1 openocd .\config\${{ matrix.config }}.json >> $env:GITHUB_ENV
- name: Cache OpenOCD build
uses: actions/cache@v4
with:
path: build/openocd-install
key: ${{ env.OPENOCD_BUILD_ID }}
- name: Check riscv-gnu-toolchain repository
shell: pwsh
run: .\packages\common\build-id.ps1 riscv-gnu-toolchain .\config\${{ matrix.config }}.json >> $env:GITHUB_ENV
- name: Cache riscv-gnu-toolchain build
uses: actions/cache@v4
with:
path: build/riscv-gnu-toolchain-install
key: ${{ env.RISCV-GNU-TOOLCHAIN_BUILD_ID }}
- name: Build ${{ matrix.config }} (${{ matrix.build-type }})
shell: pwsh
run: |
Set-StrictMode -Version Latest
$ErrorActionPreference = 'Stop'
$ProgressPreference = 'SilentlyContinue'
subst P: .
P:
.\build.ps1 .\config\${{ matrix.config }}.json -MSYS2Path (msys2 -c 'cygpath -m /').TrimEnd('\/') -SkipSigning -Compression zlib -BuildType ${{ matrix.build-type }}
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: Package-${{ matrix.config }}-${{ matrix.build-type }}
path: bin/
Test-Installer:
runs-on: windows-${{ matrix.winver }}
needs: Build
strategy:
fail-fast: false
matrix:
winver: ['2022']
config: [x64, x64-standalone]
build-type: [system]
include:
- { winver: '2022', config: x64-standalone, build-type: user }
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download installer artifact
uses: actions/download-artifact@v4
with:
name: Package-${{ matrix.config }}-${{ matrix.build-type }}
path: bin
- name: Test ${{ matrix.config }} (${{ matrix.build-type }})
shell: pwsh
run: docker run --rm -v "$(Get-Location):C:\repo" mcr.microsoft.com/windows/servercore:ltsc${{ matrix.winver }}
powershell -NoProfile -NonInteractive -ExecutionPolicy Bypass -Command "cd C:\repo; .\tests\setup.ps1"
- name: Upload installer logs
uses: actions/upload-artifact@v4
with:
name: Installer-Logs-Windows-${{ matrix.winver }}-${{ matrix.config }}-${{ matrix.build-type }}
path: logs/