Repository navigation
115 lines (99 loc) · 3.75 KB
/
Copy pathci.yml
File metadata and controls
115 lines (99 loc) · 3.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
permissions:
contents: read
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
POWERSHELL_TELEMETRY_OPTOUT: '1'
DOTNET_CLI_TELEMETRY_OPTOUT: '1'
DOTNET_NOLOGO: '1'
jobs:
build-and-test:
name: Build & Test MSI Packages (PowerShell 7)
runs-on: windows-latest
timeout-minutes: 25
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
persist-credentials: false
- name: Verify Documentation & Relative Link Health
shell: pwsh
run: |
$broken = 0
Get-ChildItem -Recurse -Filter *.md | Where-Object { $_.FullName -notmatch '\\.git\\' } | ForEach-Object {
$file = $_.FullName
$content = [System.IO.File]::ReadAllText($file)
$dir = Split-Path -Parent $file
$matches = [regex]::Matches($content, '\[.*?\]\((?!https?://|mailto:|#)([^\)]+)\)')
foreach ($m in $matches) {
$rawTarget = $m.Groups[1].Value.Split('#')[0].Trim()
if ($rawTarget) {
$resolved = [System.IO.Path]::GetFullPath((Join-Path $dir $rawTarget))
if (-not (Test-Path -LiteralPath $resolved)) {
Write-Host "::error file=$($_.Name)::Broken relative link: $rawTarget"
$broken++
}
}
}
}
if ($broken -gt 0) {
Write-Host "Found $broken broken relative links in markdown documentation."
exit 1
}
Write-Host "All markdown relative documentation links verified successfully."
- name: Run Automated Security & Adversarial Test Suite (PowerShell 7)
shell: pwsh
run: |
.\tests\Test-JvmSecurity.ps1 -Detailed
- name: Setup .NET SDK
uses: actions/setup-dotnet@87b7050bc53ea08284295505d98d2aa94301e852 # v4.2.0
with:
dotnet-version: '8.0.x'
- name: Install WiX Toolset v4
shell: pwsh
run: |
dotnet tool install --global wix --version 4.0.6
wix extension add --global WixToolset.Util.wixext/4.0.6
"$HOME/.dotnet/tools" | Out-File -FilePath $env:GITHUB_PATH -Append -Encoding utf8
wix --version
- name: Build Standalone MSIs (x64 & arm64)
shell: pwsh
run: |
.\packages\msi\build-msi.ps1 -Arch all
- name: Run Integration Test Suite (x64)
shell: pwsh
run: |
$ver = if ((Get-Content "jvm.bat" -Raw) -match 'set "JVM_VERSION=([^"]+)"') { $Matches[1].Trim() } else { "1.0.1" }
.\packages\msi\test-msi.ps1 -MsiPath "packages/msi/jvm-windows-$ver-x64.msi"
- name: Verify Chocolatey Package Build
shell: pwsh
run: |
.\packages\choco\build-choco.ps1
- name: Upload CI Artifacts
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
with:
name: msi-packages-ci
path: packages/msi/jvm-windows-*.msi
if-no-files-found: error
retention-days: 7
test-windows-powershell:
name: Security & Adversarial Test Suite (Windows PowerShell 5.1)
runs-on: windows-latest
timeout-minutes: 25
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
persist-credentials: false
- name: Run Automated Security & Adversarial Test Suite (Windows PowerShell 5.1)
shell: powershell
run: |
.\tests\Test-JvmSecurity.ps1 -Detailed