Skip to content

chore: credit integrated PR #21 contribution #77

chore: credit integrated PR #21 contribution

chore: credit integrated PR #21 contribution #77

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
schedule:
- cron: "0 8 * * *"
env:
DOTNET_VERSION: "10.0.x"
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Restore standard targets
run: |
dotnet restore src/OpenClaw.Gateway && dotnet restore src/OpenClaw.Tests
dotnet restore src/OpenClaw.SemanticKernelAdapter
dotnet restore samples/OpenClaw.SemanticKernelInteropHost
- name: Build standard targets
run: |
dotnet build --no-restore -c Release src/OpenClaw.Gateway && dotnet build --no-restore -c Release src/OpenClaw.Tests
dotnet build --no-restore -c Release src/OpenClaw.SemanticKernelAdapter
dotnet build --no-restore -c Release samples/OpenClaw.SemanticKernelInteropHost
- name: Test standard targets
run: dotnet test --no-build -c Release --verbosity normal --logger "trx;LogFileName=results.trx" src/OpenClaw.Tests
- name: Restore sandbox-enabled targets
run: |
dotnet restore src/OpenClaw.Gateway -p:OpenClawEnableOpenSandbox=true
dotnet restore src/OpenClaw.Tests -p:OpenClawEnableOpenSandbox=true
- name: Build sandbox-enabled targets
run: |
dotnet build --no-restore -c Release -p:OpenClawEnableOpenSandbox=true src/OpenClaw.Gateway
dotnet build --no-restore -c Release -p:OpenClawEnableOpenSandbox=true src/OpenClaw.Tests
- name: Test sandbox-enabled targets
run: dotnet test --no-build -c Release -p:OpenClawEnableOpenSandbox=true --verbosity normal --logger "trx;LogFileName=results-sandbox.trx" src/OpenClaw.Tests
- name: Restore MAF-enabled targets
run: |
dotnet restore src/OpenClaw.Gateway -p:OpenClawEnableMafExperiment=true
dotnet restore src/OpenClaw.Tests -p:OpenClawEnableMafExperiment=true
- name: Build MAF-enabled targets
run: |
dotnet build --no-restore -c Release -p:OpenClawEnableMafExperiment=true src/OpenClaw.Gateway
dotnet build --no-restore -c Release -p:OpenClawEnableMafExperiment=true src/OpenClaw.Tests
- name: Test MAF-enabled targets
run: dotnet test --no-build -c Release -p:OpenClawEnableMafExperiment=true --verbosity normal --logger "trx;LogFileName=results-maf.trx" src/OpenClaw.Tests
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results
path: "**/*.trx"
publish-aot:
needs: build-and-test
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Install AOT prerequisites
run: sudo apt-get update && sudo apt-get install -y clang zlib1g-dev
- name: Publish and smoke-test NativeAOT binaries
run: |
chmod +x ./eng/verify-aot-smoke.sh
chmod +x ./eng/verify-aot-maf-smoke.sh
./eng/verify-aot-smoke.sh
./eng/verify-aot-maf-smoke.sh
- name: Upload standard gateway artifact
uses: actions/upload-artifact@v4
with:
name: gateway-standard-aot-linux-x64
path: ./artifacts/aot/gateway/
- name: Upload MAF-enabled gateway artifact
uses: actions/upload-artifact@v4
with:
name: gateway-maf-enabled-aot-linux-x64
path: ./artifacts/aot-maf/gateway/
- name: Upload CLI artifact
uses: actions/upload-artifact@v4
with:
name: openclaw-cli-aot-linux-x64
path: ./artifacts/aot/cli/
publish-jit:
needs: build-and-test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Publish and smoke-test JIT binaries
run: |
chmod +x ./eng/verify-jit-smoke.sh
chmod +x ./eng/verify-jit-maf-smoke.sh
./eng/verify-jit-smoke.sh
./eng/verify-jit-maf-smoke.sh
- name: Upload standard gateway artifact
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: actions/upload-artifact@v4
with:
name: gateway-standard-jit-linux-x64
path: ./artifacts/jit/gateway/
- name: Upload MAF-enabled gateway artifact
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: actions/upload-artifact@v4
with:
name: gateway-maf-enabled-jit-linux-x64
path: ./artifacts/jit-maf/gateway/
- name: Upload CLI artifact
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: actions/upload-artifact@v4
with:
name: openclaw-cli-jit-linux-x64
path: ./artifacts/jit/cli/
docker:
needs: build-and-test
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
permissions:
packages: write
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: |
ghcr.io/${{ github.repository }}:latest
ghcr.io/${{ github.repository }}:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max
public-compatibility-smoke:
needs: build-and-test
runs-on: ubuntu-latest
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
timeout-minutes: 30
env:
OPENCLAW_PUBLIC_SMOKE: "1"
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Restore
run: dotnet restore src/OpenClaw.Tests
- name: Build
run: dotnet build --no-restore -c Release src/OpenClaw.Tests
- name: Run Public Compatibility Smoke
run: dotnet test --no-build -c Release --filter "Category=PublicSmoke" --verbosity normal --logger "trx;LogFileName=public-smoke.trx" src/OpenClaw.Tests
- name: Upload smoke results
if: always()
uses: actions/upload-artifact@v4
with:
name: public-smoke-results
path: "**/public-smoke.trx"