Skip to content

Windows Release Validation #16

Windows Release Validation

Windows Release Validation #16

# =============================================================================
# Windows Release Validation Workflow
# =============================================================================
# Purpose:
# Pre-flight check for Windows compatibility during release preparation.
# Called by release.py prepare script BEFORE tags are created.
# Development is done on macOS; this workflow ensures Windows compatibility.
#
# Triggers:
# - Manual dispatch only (called by release.py prepare)
# - Can also be triggered manually from GitHub Actions UI for testing
#
# Tests:
# - Library builds on Windows
# - All unit tests pass on Windows
# - All integration tests pass on Windows
# =============================================================================
name: Windows Release Validation
on:
workflow_dispatch:
inputs:
version:
description: 'Version being validated (e.g., 1.0.0)'
required: false
default: 'dev'
ref:
description: 'Git ref to checkout (branch, tag, or SHA)'
required: false
default: ''
jobs:
windows-validation:
name: Windows Build & Test
runs-on: windows-latest
steps:
# -----------------------------------------------------------------------
# Checkout
# -----------------------------------------------------------------------
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.ref || github.ref }}
submodules: recursive
# -----------------------------------------------------------------------
# Setup Alire
# -----------------------------------------------------------------------
- name: Setup Alire
uses: alire-project/setup-alire@v3
with:
version: 2.0.2
# -----------------------------------------------------------------------
# Replace local pins with GitHub URL pins for CI
# -----------------------------------------------------------------------
- name: Update dependency pins for CI
shell: bash
run: |
# Replace local path pins with GitHub URL pins
sed -i "s|functional = { path = '../functional' }|functional = { url = \"https://github.com/abitofhelp/functional.git\", commit = \"5ef5b46d9dce871edebec5aefcb3d24d35eb9026\" }|" alire.toml
sed -i "s|tzif = { path = '../tzif' }|tzif = { url = \"https://github.com/abitofhelp/tzif_ada.git\", commit = \"f585c7a1625b26aaa768f8162b641d657a71e012\" }|" alire.toml
echo "Updated pins to use GitHub URLs"
echo "=== alire.toml pins ==="
grep -A5 '^\[\[pins\]\]' alire.toml || true
# -----------------------------------------------------------------------
# Build library
# -----------------------------------------------------------------------
- name: Build library
shell: bash
run: |
echo "Building zoneinfo library for Windows..."
alr build -- -j4
echo "Library build complete"
# -----------------------------------------------------------------------
# Build unit tests
# -----------------------------------------------------------------------
- name: Build unit tests
shell: bash
run: |
echo "Building unit tests..."
alr exec -- gprbuild -P test/unit/unit_tests.gpr -p -j4 -XTZIF_OS=windows
echo "Unit tests build complete"
# -----------------------------------------------------------------------
# Build integration tests
# -----------------------------------------------------------------------
- name: Build integration tests
shell: bash
run: |
echo "Building integration tests..."
alr exec -- gprbuild -P test/integration/integration_tests.gpr -p -j4 -XTZIF_OS=windows
echo "Integration tests build complete"
# -----------------------------------------------------------------------
# Run unit tests
# -----------------------------------------------------------------------
- name: Run unit tests
shell: bash
run: |
echo "========================================"
echo "Running Unit Tests"
echo "========================================"
./test/bin/unit_runner.exe
echo "Unit tests complete"
# -----------------------------------------------------------------------
# Run integration tests
# -----------------------------------------------------------------------
- name: Run integration tests
shell: bash
run: |
echo "========================================"
echo "Running Integration Tests"
echo "========================================"
# Use pwd for clean forward-slash path (avoids github.workspace backslash issues)
export TZIF_DATA_PATH="$(pwd)/data/tzif/20251105T093308Z"
echo "TZIF_DATA_PATH=$TZIF_DATA_PATH"
ls -la "$TZIF_DATA_PATH" | head -5
./test/bin/integration_runner.exe
echo "Integration tests complete"
# -----------------------------------------------------------------------
# Summary
# -----------------------------------------------------------------------
- name: Test Summary
if: always()
shell: bash
run: |
echo "========================================"
echo "Windows Release Validation Complete"
echo "========================================"
echo "Version: ${{ github.event.inputs.version || 'dev' }}"
echo "Ref: ${{ github.event.inputs.ref || github.ref }}"
echo "Platform: windows-latest"
echo "Alire: 2.0.2"