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
177 changes: 113 additions & 64 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
branches:
- main
tags:
- 'v*'
- "v*"
pull_request:
branches:
- main
Expand All @@ -33,7 +33,7 @@ jobs:
- name: "Set up Go Environment"
uses: actions/setup-go@v5
with:
go-version: '1.20'
go-version: "1.20"
cache: true

- name: "Execute Concurrent Go Scheduler Tests"
Expand All @@ -49,7 +49,7 @@ jobs:
uses: astral-sh/setup-uv@v3
with:
version: "latest"
enable-cache: false
enable-cache: true # Optimized: Enabled caching for dependencies

- name: "Bootstrap Python SDK Environment & Run Simulator/Timing Benchmark"
run: |
Expand All @@ -69,12 +69,12 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.MCP_PAT }}
token: ${{ secrets.GITHUB_TOKEN }} # No longer needs MCP_PAT here since we aren't pushing code

- name: "Set up Go Environment"
uses: actions/setup-go@v5
with:
go-version: '1.20'
go-version: "1.20"
cache: true

- name: "Compile Go Scheduler Daemon"
Expand All @@ -90,75 +90,91 @@ jobs:
uses: astral-sh/setup-uv@v3
with:
version: "latest"
enable-cache: false

- name: "Build Distributable Python SDK Packages"
run: |
make dist
enable-cache: true

- name: "Generate Automated Release Version Tag"
id: versioning
env:
GH_TOKEN: ${{ secrets.MCP_PAT }} # Keep for PR API evaluation if necessary
run: |
if [[ "${{ github.ref }}" == refs/tags/v* ]]; then
echo "VERSION=${{ github.ref_name }}" >> $GITHUB_OUTPUT
echo "Triggered by tag. Using version ${{ github.ref_name }}"
else
# Default fallback for merge commits to main
echo "VERSION=v0.1.0-rev.${{ github.run_number }}" >> $GITHUB_OUTPUT
fi

- name: "Import GPG Key for Signing"
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
git_user_signingkey: true
git_commit_gpgsign: true
git_tag_gpgsign: true

- name: "Create and Push Signed Tag"
env:
MCP_PAT: ${{ secrets.MCP_PAT }}
run: |
TAG_NAME="${{ steps.versioning.outputs.VERSION }}"
if [[ "${{ github.ref }}" != refs/tags/v* ]]; then
echo "Creating and signing automated release tag $TAG_NAME"
git tag -d $TAG_NAME 2>/dev/null || true
git tag -s $TAG_NAME -m "Automated Project ORCHID Release $TAG_NAME"
git push "https://x-access-token:${{ secrets.MCP_PAT }}@github.com/${{ github.repository }}.git" $TAG_NAME
else
echo "Release triggered by existing tag $TAG_NAME. Skipping tag creation."
fi

- name: "Create GitHub Release and Upload Build Artifacts"
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.versioning.outputs.VERSION }}
name: "Project ORCHID Release ${{ steps.versioning.outputs.VERSION }}"
body: |
## 🌸 Project ORCHID Automated Release - ${{ steps.versioning.outputs.VERSION }}
git fetch --tags --force --unshallow || git fetch --tags --force

This release was automatically generated by the automated CI/CD release pipeline following quality gate passing.
LATEST_TAG=$(git tag -l "v[0-9]*" | sort -V | tail -n1)
if [ -z "$LATEST_TAG" ]; then
LATEST_TAG="v0.1.0"
echo "No tags found. Initializing base version to $LATEST_TAG"
else
echo "Latest semantic tag found: $LATEST_TAG"
fi

### 🏛️ Repository Info
- **Organization Account:** [DigitalServerHost/ORCHID](https://github.com/DigitalServerHost/ORCHID)
- **Signed & Verified By:** mcpwest (via GPG Key `9D69F8CE836AA8E2`)
- **Ref:** `${{ github.ref }}`
VERSION_NUM=${LATEST_TAG#v}
CLEAN_VERSION=$(echo "$VERSION_NUM" | cut -d'-' -f1)

### 📦 Released Artifacts
- **Go Concurrent Daemon Binary:** `orchid-daemon` (High-performance scheduling engine core)
- **Python SDK Wheel:** `orchid-0.1.0-py3-none-any.whl` (Contiguous cache-line memory coordinate client)
- **Python SDK Tarball:** `orchid-0.1.0.tar.gz` (Source distribution)
- **Container Image:** `ghcr.io/digitalserverhost/orchid:${{ steps.versioning.outputs.VERSION }}`
IFS='.' read -r MAJOR MINOR PATCH <<< "$CLEAN_VERSION"
MAJOR=${MAJOR:-0}
MINOR=${MINOR:-1}
PATCH=${PATCH:-0}

---
_Automated under GNU GPLv3 License coverage._
files: |
build/orchid-daemon
dist/orchid-0.1.0-py3-none-any.whl
dist/orchid-0.1.0.tar.gz
draft: false
prerelease: false
token: ${{ secrets.MCP_PAT }}
INCREMENT="patch"

if [ -n "${{ github.sha }}" ]; then
echo "Querying GitHub API for merged PR labels associated with commit ${{ github.sha }}..."
PR_LIST=$(gh pr list --commit "${{ github.sha }}" --state merged --json labels --jq '.[0].labels[].name' 2>/dev/null || true)

if [ -n "$PR_LIST" ]; then
echo "Found PR labels:"
echo "$PR_LIST"
if echo "$PR_LIST" | grep -iq "major"; then
INCREMENT="major"
elif echo "$PR_LIST" | grep -iq "minor"; then
INCREMENT="minor"
elif echo "$PR_LIST" | grep -iq "patch"; then
INCREMENT="patch"
fi
else
echo "No Pull Request labels detected."
fi
fi

echo "Semantic increment strategy: $INCREMENT"

if [ "$INCREMENT" = "major" ]; then
NEXT_MAJOR=$((MAJOR + 1))
NEXT_MINOR=0
NEXT_PATCH=0
elif [ "$INCREMENT" = "minor" ]; then
NEXT_MAJOR=$MAJOR
NEXT_MINOR=$((MINOR + 1))
NEXT_PATCH=0
else
NEXT_MAJOR=$MAJOR
NEXT_MINOR=$MINOR
NEXT_PATCH=$((PATCH + 1))
fi

NEXT_VERSION="v$NEXT_MAJOR.$NEXT_MINOR.$NEXT_PATCH"
echo "Calculated next version: $NEXT_VERSION"
echo "VERSION=$NEXT_VERSION" >> $GITHUB_OUTPUT
fi

- name: "Synchronize Package Version with Release Tag"
id: version_clean
run: |
TAG_VERSION="${{ steps.versioning.outputs.VERSION }}"
CLEAN_VERSION="${TAG_VERSION#v}"
echo "CLEAN_VERSION=$CLEAN_VERSION" >> $GITHUB_OUTPUT

# This change modifies the runner workspace context only. It never modifies history.
python3 -c "import re; p = 'pyproject.toml'; c = open(p).read(); c = re.sub(r'version\s*=\s*\"[^\"]+\"', f'version = \"$CLEAN_VERSION\"', c); open(p, 'w').write(c)"
echo "Updated workspace pyproject.toml to version $CLEAN_VERSION"

- name: "Build Distributable Python SDK Packages"
run: |
make dist

- name: "Set up Docker Buildx"
uses: docker/setup-buildx-action@v3
Expand All @@ -168,7 +184,7 @@ jobs:
with:
registry: ghcr.io
username: mcpwest
password: ${{ secrets.MCP_PAT }}
password: ${{ secrets.MCP_PAT }} # Attributes container image package to mcpwest account

- name: "Extract Production Docker Metadata"
id: meta-prod
Expand Down Expand Up @@ -217,3 +233,36 @@ jobs:
labels: ${{ steps.meta-dev.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max

- name: "Create GitHub Release and Bind Immutable Tag"
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.versioning.outputs.VERSION }}
target_commitish: ${{ github.sha }} # Crucial: Anchors the tag cleanly to your verified commit
name: "Project ORCHID Release ${{ steps.versioning.outputs.VERSION }}"
body: |
## 🌸 Project ORCHID Automated Release - ${{ steps.versioning.outputs.VERSION }}

This release was automatically generated by the automated CI/CD release pipeline following quality gate passing.

### 🏛️ Repository Info
- **Organization Account:** [DigitalServerHost/ORCHID](https://github.com/DigitalServerHost/ORCHID)
- **Built From Verified Commit:** ${{ github.sha }} (@${{ github.actor }})
- **Core Architecture & Maintainer:** (@westkevin12)
- **Concept originator:** Teppei Oohira (@gatchimuchio)

### 📦 Released Artifacts
- **Go Concurrent Daemon Binary:** `orchid-daemon`
- **Python SDK Wheel:** `orchid-${{ steps.version_clean.outputs.CLEAN_VERSION }}-py3-none-any.whl`
- **Python SDK Tarball:** `orchid-${{ steps.version_clean.outputs.CLEAN_VERSION }}.tar.gz`
- **Container Image:** `ghcr.io/digitalserverhost/orchid:${{ steps.versioning.outputs.VERSION }}`

---
_Automated under GNU GPLv3 License coverage._
files: |
build/orchid-daemon
dist/orchid-*.whl
dist/orchid-*.tar.gz
draft: false
prerelease: false
token: ${{ secrets.MCP_PAT }}
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ locality_benchmark_fair
locality_benchmark_audit

# Timing and Execution Evidence Logs
evidence/
reproduced/
evidence/*
!evidence/reproduced/
evidence/reproduced/*
!evidence/reproduced/speedups.json

# Python Cache & Configurations
__pycache__/
Expand Down
Loading
Loading