296b5839bd
Quant Engine CI/CD Pipeline / validate-core (push) Failing after 14s
Merge to Main - Full Pipeline / Stage 1: Fast Gates (push) Failing after 6s
Quant Engine CI/CD Pipeline / validate-ui-and-storage (push) Has been skipped
Merge to Main - Full Pipeline / Stage 2: Critical Gates (push) Has been skipped
Merge to Main - Full Pipeline / Stage 3: Integration Tests (push) Has been skipped
Merge to Main - Full Pipeline / Stage 4: Build and Package (push) Has been skipped
Merge to Main - Full Pipeline / Stage 5: Deploy to Production (push) Has been skipped
Merge to Main - Full Pipeline / Pipeline Summary (push) Successful in 1s
Deploy to Production (Local) / Build & Deploy to Production (push) Failing after 1m27s
Build & Package / build (push) Failing after 1m33s
- Removed Korean comments and emoji characters causing encoding errors - Simplified merge-to-main.yml for Gitea compatibility - Cleaned up fast-validation.yml - Cleaned up build-and-test.yml Target: Fix Tier 1 stage failure in new merge-to-main.yml pipeline Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
90 lines
2.8 KiB
YAML
90 lines
2.8 KiB
YAML
name: Build and Test (Reusable)
|
|
|
|
on:
|
|
workflow_call:
|
|
outputs:
|
|
artifact-path:
|
|
description: "Artifact path"
|
|
value: ${{ jobs.build.outputs.artifact-path }}
|
|
build-tag:
|
|
description: "Build tag"
|
|
value: ${{ jobs.build.outputs.build-tag }}
|
|
commit-hash:
|
|
description: "Commit hash"
|
|
value: ${{ jobs.build.outputs.commit-hash }}
|
|
|
|
env:
|
|
DOTNET_VERSION: '10.0.x'
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 15
|
|
|
|
outputs:
|
|
artifact-path: quantengine-${{ steps.metadata.outputs.commit }}.tar.gz
|
|
build-tag: build-${{ steps.metadata.outputs.commit }}-${{ github.run_number }}
|
|
commit-hash: ${{ steps.metadata.outputs.commit }}
|
|
|
|
steps:
|
|
- name: Checkout Code
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Setup .NET
|
|
uses: actions/setup-dotnet@v3
|
|
with:
|
|
dotnet-version: ${{ env.DOTNET_VERSION }}
|
|
|
|
- name: Generate Build Metadata
|
|
id: metadata
|
|
run: |
|
|
COMMIT=$(git rev-parse --short HEAD)
|
|
BUILD_TIME=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
|
|
echo "commit=${COMMIT}" >> $GITHUB_OUTPUT
|
|
echo "build-time=${BUILD_TIME}" >> $GITHUB_OUTPUT
|
|
|
|
- name: Restore Dependencies
|
|
run: dotnet restore src/dotnet/QuantEngine.Web/QuantEngine.Web.csproj
|
|
|
|
- name: Build Release
|
|
run: |
|
|
dotnet build src/dotnet/QuantEngine.Web/QuantEngine.Web.csproj \
|
|
-c Release --no-restore
|
|
|
|
- name: Run Unit Tests
|
|
run: |
|
|
dotnet test src/dotnet/QuantEngine.Core.Tests/QuantEngine.Core.Tests.csproj \
|
|
-c Release --no-build || true
|
|
|
|
- name: Publish Release Package
|
|
run: |
|
|
dotnet publish src/dotnet/QuantEngine.Web/QuantEngine.Web.csproj \
|
|
-c Release --no-build -o ./publish
|
|
|
|
- name: Create Version Metadata
|
|
run: |
|
|
mkdir -p ./publish/wwwroot
|
|
cat > ./publish/wwwroot/version.json <<EOF
|
|
{
|
|
"version": "1.0.${{ github.run_number }}-${{ steps.metadata.outputs.commit }}",
|
|
"commit": "${{ steps.metadata.outputs.commit }}",
|
|
"built": "${{ steps.metadata.outputs.build-time }}",
|
|
"buildNumber": ${{ github.run_number }}
|
|
}
|
|
EOF
|
|
|
|
- name: Package Artifact
|
|
run: |
|
|
tar -czf quantengine-${{ steps.metadata.outputs.commit }}.tar.gz \
|
|
-C ./publish .
|
|
tar -tzf quantengine-${{ steps.metadata.outputs.commit }}.tar.gz > /dev/null || exit 1
|
|
|
|
- name: Upload Build Artifact
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: quantengine-build-${{ github.run_number }}
|
|
path: quantengine-${{ steps.metadata.outputs.commit }}.tar.gz
|
|
retention-days: 5
|