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
191 changes: 191 additions & 0 deletions .github/workflows/studio-private-preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
name: Studio Ubuntu and Windows ARM64 Private Preview

on:
workflow_dispatch:
pull_request:
branches: [main]
paths:
- '.github/workflows/studio-private-preview.yml'
- 'sqlsim/**'
- 'sqlpysim/**'
- 'sqlsimstudio/**'
- 'release/**'
- '.github/skills/sqlsimstudio/**'
push:
branches: [main]
paths:
- '.github/workflows/studio-private-preview.yml'
- 'sqlsim/**'
- 'sqlpysim/**'
- 'sqlsimstudio/**'
- 'release/**'
- '.github/skills/sqlsimstudio/**'

permissions:
contents: read

jobs:
build:
name: Native build and extracted kit (${{ matrix.runtime }})
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-24.04
runtime: linux-x64
python: x64
- os: windows-11-arm
runtime: win-arm64
python: arm64
runs-on: ${{ matrix.os }}
defaults:
run:
shell: pwsh
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: '3.11'
architecture: ${{ matrix.python }}
- uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
with:
dotnet-version: '10.0.x'
- name: Linux build prerequisites
if: runner.os == 'Linux'
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y build-essential cmake unixodbc-dev pandoc libltdl7
- name: Windows manual prerequisite
if: runner.os == 'Windows'
uses: pandoc/actions/setup@86321b6dd4675f5014c611e05088e10d4939e09e # v1
with:
version: '3.5'
- name: Native Python driver
working-directory: sqlpysim
run: |
python -m pip install --only-binary=:all: -r requirements.txt
if ($LASTEXITCODE -ne 0) { throw 'Native pinned Python driver installation failed.' }
- name: Build matching native engine
working-directory: sqlsim
run: |
if ($IsWindows) {
if ([Runtime.InteropServices.RuntimeInformation]::OSArchitecture -ne 'Arm64') {
throw 'Windows validation requires native ARM64 hardware.'
}
./build.ps1
} else {
bash ./build-linux.sh --clean
}
if ($LASTEXITCODE -ne 0) { throw 'Native engine build failed.' }
- name: Build Studio
working-directory: sqlsimstudio
run: |
if ($IsWindows) { ./build.ps1 -Runtime win-arm64 }
else { bash ./build-linux.sh linux-x64 }
if ($LASTEXITCODE -ne 0) { throw 'Studio build failed.' }
- name: Assemble Private Preview tester kit
env:
PREVIEW_COMMIT: ${{ github.sha }}
PREVIEW_BUILD: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
run: |
./release/build-studio-preview-kit.ps1 `
-StudioRoot 'sqlsimstudio/build/${{ matrix.runtime }}' `
-Runtime '${{ matrix.runtime }}' -Commit $env:PREVIEW_COMMIT -BuildUrl $env:PREVIEW_BUILD `
-OutputDirectory '${{ runner.temp }}/studio-kit'
- name: Archive and re-extract kit
run: |
$out = '${{ runner.temp }}/preview-archives'
$verify = '${{ runner.temp }}/extracted-kit'
New-Item -ItemType Directory -Path $out, $verify | Out-Null
$name = 'sqlsimstudio-${{ matrix.runtime }}-private-preview-tester-kit'
if ($IsWindows) {
$archive = Join-Path $out "$name.zip"
tar -a -cf $archive -C '${{ runner.temp }}/studio-kit' .
if ($LASTEXITCODE -ne 0) { throw 'Windows archive creation failed.' }
} else {
$archive = Join-Path $out "$name.tar.gz"
tar -czf $archive -C '${{ runner.temp }}/studio-kit' .
if ($LASTEXITCODE -ne 0) { throw 'Linux archive creation failed.' }
}
tar -xf $archive -C $verify
if ($LASTEXITCODE -ne 0) { throw 'Archive extraction failed.' }
$hash = (Get-FileHash -LiteralPath $archive -Algorithm SHA256).Hash.ToLowerInvariant()
"$hash $(Split-Path $archive -Leaf)" | Set-Content (Join-Path $out 'SHA256SUMS') -Encoding ascii
Copy-Item '${{ runner.temp }}/studio-kit/BUILD-INFO.json' $out
- name: Validate extracted kit and safety gates
timeout-minutes: 15
run: |
./release/test-studio-preview-kit.ps1 -KitRoot '${{ runner.temp }}/extracted-kit' `
-ValidationDirectory '${{ runner.temp }}/studio-validation'
if ($LASTEXITCODE -ne 0) { throw 'Extracted kit validation failed.' }
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
if: always()
with:
name: studio-preview-results-${{ matrix.runtime }}
path: ${{ runner.temp }}/studio-validation/offline-results/
if-no-files-found: ignore
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: studio-preview-input-${{ matrix.runtime }}
path: ${{ runner.temp }}/preview-archives/
if-no-files-found: error

ubuntu-26:
name: Same Linux archive on Ubuntu 26.04
needs: build
runs-on: ubuntu-26.04
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: '3.11'
architecture: x64
- name: Runtime prerequisites
run: |
sudo apt-get update
sudo apt-get install -y unixodbc libltdl7 file
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
with:
name: studio-preview-input-linux-x64
path: ${{ runner.temp }}/preview-input
- name: Verify and extract unchanged Ubuntu 24.04 archive
run: |
cd "$RUNNER_TEMP/preview-input"
sha256sum -c SHA256SUMS
mkdir "$RUNNER_TEMP/extracted-kit"
tar -xzf sqlsimstudio-linux-x64-private-preview-tester-kit.tar.gz -C "$RUNNER_TEMP/extracted-kit"
python -m pip install --only-binary=:all: -r "$RUNNER_TEMP/extracted-kit/sqlsimstudio/sqlpysim/requirements.txt"
- name: Validate extracted kit on Ubuntu 26.04
timeout-minutes: 15
shell: pwsh
run: |
./release/test-studio-preview-kit.ps1 -KitRoot '${{ runner.temp }}/extracted-kit' `
-ValidationDirectory '${{ runner.temp }}/studio-validation'
if ($LASTEXITCODE -ne 0) { throw 'Ubuntu 26.04 kit validation failed.' }
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
if: always()
with:
name: studio-preview-results-ubuntu-26
path: ${{ runner.temp }}/studio-validation/offline-results/
if-no-files-found: ignore

candidate:
name: Validated Private Preview candidate
needs: [build, ubuntu-26]
runs-on: ubuntu-24.04
steps:
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
with:
pattern: studio-preview-input-*
path: ${{ runner.temp }}/candidate
- name: Verify both platform checksums
run: |
for platform in linux-x64 win-arm64; do
(cd "$RUNNER_TEMP/candidate/studio-preview-input-$platform" && sha256sum -c SHA256SUMS)
done
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: sqlsimstudio-ubuntu-windows-arm64-private-preview
path: ${{ runner.temp }}/candidate/
if-no-files-found: error
32 changes: 32 additions & 0 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,38 @@ run the macOS workflow. The long-term live-testing backend is deliberately
undecided; see [MACOS-SUPPORT-PLAN.md](MACOS-SUPPORT-PLAN.md) for the maintained
platform plan and promotion gates.

### Studio Ubuntu x64 and Windows ARM64 Private Preview kits

The [Studio preview workflow](.github/workflows/studio-private-preview.yml)
builds with the existing sqlsim and Studio scripts on Ubuntu 24.04 x64 and a
native Windows 11 ARM64 runner. Both use native Python 3.11 and the pinned
`mssql-python` wheel, not Python emulation. It runs on relevant PR/main changes
and can also be dispatched:

```powershell
gh workflow run studio-private-preview.yml --repo microsoft/sqlsimtools --ref main
```

The final `sqlsimstudio-ubuntu-windows-arm64-private-preview` artifact is uploaded
only after native architecture/layout checks, runner refusal/failure-report
tests, and extracted-kit offline checks pass on both targets, plus an unchanged
Ubuntu 24.04-built archive passes on Ubuntu 26.04. Its platform subdirectories
contain a self-contained tester kit, `SHA256SUMS`, and `BUILD-INFO.json`.
Windows uses ZIP; Ubuntu uses tar.gz so executable permissions survive.

The [kit README](release/studio-preview-tester-README.md) covers setup, examples,
manual browser checks, explicit live/load consent, credential files, and reports.
These platforms remain **Private Preview - testing only**, outside public release
assets. Artifacts require GitHub sign-in and expire; they are not confidential.
Use an existing Private Preview request issue for testing assistance and feedback.

Maintainers own these repeatable native build and offline package gates. Before
promotion, separately record maintainer-controlled live smoke/full results,
authentication/SQL-target coverage, real browser and clean-install evidence,
and signing/distribution decisions. As with the [macOS support plan](MACOS-SUPPORT-PLAN.md),
volunteers supplement rather than replace maintainer validation. No live backend,
credentials, or infrastructure is selected or provisioned by this workflow.

## Prepare for source testing

After building sqlsim and preparing sqlpysim, run the shared test preflight
Expand Down
4 changes: 4 additions & 0 deletions release/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ as evidence that a release artifact is correct.
| `build-macos-tester-kit.ps1` | Assembles a self-contained macOS test installation from validated candidate packages and canonical suites |
| `run-macos-tests.ps1` | Tester-kit runner; defaults to offline checks, gates live/load testing, and writes JSON plus logs |
| `macos-tester-README.md` | Instructions shipped as the tester kit's README |
| `build-studio-preview-kit.ps1` | Stages Ubuntu x64/Windows ARM64 Studio Private Preview kits from existing publisher output and canonical Studio suites |
| `run-studio-preview-tests.ps1` | Native-platform Studio tester runner with offline defaults, live/load consent, credential files, and JSON/log reports |
| `test-studio-preview-kit.ps1` | Validates extracted Studio preview kit architecture, safety gates, failure reports, and complete offline results |
| `studio-preview-tester-README.md` | Private Preview testing and feedback instructions shipped in both Studio kits |
| `validate-package-layout.ps1` | Validates an extracted tool package and its documented entry points |
| `check-release-version.ps1` | Confirms version parity across every shipped tool |
| `stage-release-assets.ps1` | Stages the five versioned public release assets; the README links to the latest release page |
Expand Down
45 changes: 45 additions & 0 deletions release/build-studio-preview-kit.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#!/usr/bin/env pwsh

[CmdletBinding()]
param(
[Parameter(Mandatory)][string]$StudioRoot,
[Parameter(Mandatory)][ValidateSet('linux-x64', 'win-arm64')][string]$Runtime,
[Parameter(Mandatory)][string]$Commit,
[Parameter(Mandatory)][string]$BuildUrl,
[Parameter(Mandatory)][string]$OutputDirectory
)

$ErrorActionPreference = 'Stop'
$repository = Split-Path -Parent $PSScriptRoot
if (Test-Path -LiteralPath $OutputDirectory) { throw 'Tester kit output must be a new directory.' }
$source = (Resolve-Path -LiteralPath $StudioRoot).Path
$output = [IO.Path]::GetFullPath($OutputDirectory)
$extension = if ($Runtime -eq 'win-arm64') { '.exe' } else { '' }
foreach ($relative in @("sqlsimstudio$extension", "sqlsim/sqlsim$extension", 'sqlpysim/sqlpysim.py',
'sqlpysim/requirements.txt', 'LICENSE', 'THIRD-PARTY-NOTICES.md', 'sqlsimstudio.md',
'sqlsimstudio.html', 'CONFIGURATION.md', 'examples/README.md', '.github/skills/sqlsimstudio/SKILL.md')) {
if (-not (Test-Path -LiteralPath (Join-Path $source $relative))) {
throw "Studio build is missing $relative"
}
}
New-Item -ItemType Directory -Path $output | Out-Null
$studio = Join-Path $output 'sqlsimstudio'
Copy-Item -LiteralPath $source -Destination $studio -Recurse -Force
foreach ($suite in @('smoke-test.ps1', 'full-test-suite.ps1')) {
Copy-Item -LiteralPath (Join-Path $repository "sqlsimstudio/$suite") -Destination (Join-Path $studio $suite)
}
$fixtures = Join-Path $output 'sqlsim/testing'
New-Item -ItemType Directory -Path $fixtures -Force | Out-Null
Copy-Item -LiteralPath (Join-Path $repository 'sqlsim/testing/replay-test-data.xml') -Destination $fixtures
Copy-Item -LiteralPath (Join-Path $PSScriptRoot 'run-studio-preview-tests.ps1') -Destination (Join-Path $output 'run-tests.ps1')
Copy-Item -LiteralPath (Join-Path $PSScriptRoot 'studio-preview-tester-README.md') -Destination (Join-Path $output 'README.md')
Copy-Item -LiteralPath (Join-Path $repository 'LICENSE') -Destination $output
[ordered]@{
schemaVersion = 1
runtime = $Runtime
releaseStage = 'Private Preview'
commit = $Commit
buildUrl = $BuildUrl
validation = 'Offline only; live SQL and real-machine browser testing remain required.'
} | ConvertTo-Json | Set-Content -LiteralPath (Join-Path $output 'BUILD-INFO.json') -Encoding utf8
Write-Host "Private Preview tester kit staged: $output"
Loading
Loading