Skip to content

Cross-platform CI pipeline #43

@Sstark97

Description

@Sstark97

Phase 6: E2E and Polish

Create GitHub Actions workflow for cross-platform build, test, and AOT binary publishing.

Workflow File

.github/workflows/ci.yml

Jobs Required

1. Build and Test (Matrix)

Run on: macOS, Linux (Ubuntu), Windows

  • .NET 10 SDK installation
  • dotnet restore
  • dotnet build --configuration Release
  • dotnet test --no-build --verbosity normal
  • Upload test results

2. Publish AOT Binaries (Matrix)

For each Runtime Identifier:

  • osx-x64 (macOS Intel)
  • osx-arm64 (macOS Apple Silicon)
  • linux-x64 (Linux x64)
  • linux-arm64 (Linux ARM64)
  • win-x64 (Windows x64)
  • win-arm64 (Windows ARM64)

Commands:

dotnet publish -c Release -r $RID \
  -p:PublishAot=true \
  -p:StripSymbols=true \
  -o ./publish/$RID

Artifact naming:

  • devsweep-osx-x64
  • devsweep-osx-arm64
  • devsweep-linux-x64
  • devsweep-linux-arm64
  • devsweep-win-x64.exe
  • devsweep-win-arm64.exe

3. E2E Tests (Post-Publish)

  • Run smoke tests on each platform's published binary
  • Verify binary size (~10-15MB target)
  • Verify cold start time (<100ms)

4. Release (on tag)

When tag pushed (e.g., v2.0.0):

  • Create GitHub release
  • Upload all 6 AOT binaries as release assets
  • Generate checksums (SHA256)
  • Auto-generate release notes from conventional commits

CI Triggers

on:
  push:
    branches: [main, feature/*]
  pull_request:
    branches: [main]
  release:
    types: [published]

Quality Gates

  • All tests must pass on all platforms
  • Build must succeed on all platforms
  • Code coverage report (coverlet)
  • AOT compilation must succeed without warnings

Caching

  • NuGet packages cache
  • Restore cache across builds

Example Workflow Structure

name: CI

jobs:
  build-test:
    strategy:
      matrix:
        os: [ubuntu-latest, macos-latest, windows-latest]
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-dotnet@v4
        with:
          dotnet-version: '10.0.x'
      - run: dotnet test
      
  publish-aot:
    needs: build-test
    strategy:
      matrix:
        include:
          - os: macos-latest
            rid: osx-arm64
          - os: ubuntu-latest
            rid: linux-x64
          # ... more combinations
    # ...

Definition of Done

  • CI workflow runs on all platforms
  • All tests pass on macOS, Linux, Windows
  • AOT binaries published for all 6 RIDs
  • E2E tests run on published binaries
  • Release automation working
  • CI badge added to README

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions