|
| 1 | +name: BrainRabbit-CI/CD |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - main |
| 7 | + pull_request: |
| 8 | + branches: |
| 9 | + - main |
| 10 | + |
| 11 | +jobs: |
| 12 | + rabbit-build: |
| 13 | + name: Build Rabbit Protocol and Modular Brain Components |
| 14 | + runs-on: ${{ matrix.os }} |
| 15 | + strategy: |
| 16 | + matrix: |
| 17 | + os: [ubuntu-latest, windows-2025, macos-15] |
| 18 | + |
| 19 | + steps: |
| 20 | + - name: Checkout Code |
| 21 | + uses: actions/checkout@v3 |
| 22 | + with: |
| 23 | + repository: bearycool11/pmll_knowledge_block |
| 24 | + |
| 25 | + - name: Setup Environment |
| 26 | + run: | |
| 27 | + if [[ $RUNNER_OS == 'Linux' ]]; then |
| 28 | + sudo apt-get update && sudo apt-get install -y docker.io clang |
| 29 | + elif [[ $RUNNER_OS == 'macOS' ]]; then |
| 30 | + brew install golang docker clang |
| 31 | + else |
| 32 | + choco install golang docker-desktop |
| 33 | + ./install_docker_ce.ps1 |
| 34 | + fi |
| 35 | +
|
| 36 | + - name: Install Dependencies |
| 37 | + run: | |
| 38 | + go mod tidy |
| 39 | + go mod vendor |
| 40 | +
|
| 41 | + - name: Build Modular Brain Components |
| 42 | + run: | |
| 43 | + gcc brainOrgan.c -o modular_brain_executable |
| 44 | + gcc ears.c -o inner_ear_module |
| 45 | + gcc pml_logic_loop.c -o logic_module |
| 46 | +
|
| 47 | + - name: Build Rabbit Protocol Components |
| 48 | + run: | |
| 49 | + go build -o rabbit_protocol_clang cmd/main.go |
| 50 | +
|
| 51 | + - name: Save Build Artifacts |
| 52 | + uses: actions/upload-artifact@v3 |
| 53 | + with: |
| 54 | + name: build-artifacts |
| 55 | + path: | |
| 56 | + modular_brain_executable |
| 57 | + inner_ear_module |
| 58 | + logic_module |
| 59 | + rabbit_protocol_clang |
| 60 | +
|
| 61 | + rabbit-run: |
| 62 | + name: Test Modular Brain and Rabbit Protocol |
| 63 | + runs-on: ${{ matrix.os }} |
| 64 | + needs: rabbit-build |
| 65 | + strategy: |
| 66 | + matrix: |
| 67 | + os: [ubuntu-latest, windows-2025, macos-15] |
| 68 | + |
| 69 | + steps: |
| 70 | + - name: Checkout Code |
| 71 | + uses: actions/checkout@v3 |
| 72 | + with: |
| 73 | + repository: bearycool11/pmll_knowledge_block |
| 74 | + |
| 75 | + - name: Run Tests |
| 76 | + run: | |
| 77 | + ./modular_brain_executable --test |
| 78 | + ./logic_module --run-tests |
| 79 | + ./inner_ear_module --validate |
| 80 | + if [[ $RUNNER_OS == 'Linux' || $RUNNER_OS == 'macOS' ]]; then |
| 81 | + docker run --rm rabbit_protocol_clang |
| 82 | + else |
| 83 | + docker run --rm rabbit_protocol_clang.exe |
| 84 | +
|
| 85 | + persistent-memory-loop: |
| 86 | + name: Persistent Memory Logic Loop (PMLL) Integration |
| 87 | + runs-on: ubuntu-latest |
| 88 | + needs: rabbit-run |
| 89 | + |
| 90 | + steps: |
| 91 | + - name: Checkout Code |
| 92 | + uses: actions/checkout@v3 |
| 93 | + with: |
| 94 | + repository: bearycool11/pmll_knowledge_block |
| 95 | + |
| 96 | + - name: Set Up Persistent Memory Logic Loop |
| 97 | + run: | |
| 98 | + ./pmll_setup.sh --init |
| 99 | + ./pmll_train.sh --dataset cognitive_graphs.json |
| 100 | + ./pmll_test.sh --validate-memory |
| 101 | +
|
| 102 | + - name: Log Memory Loop Activity |
| 103 | + run: ./pmll_logger.sh --log |
| 104 | + |
| 105 | + bugzap-pesterbot: |
| 106 | + name: Scan and Fix Rogue Code |
| 107 | + runs-on: ubuntu-latest |
| 108 | + needs: persistent-memory-loop |
| 109 | + |
| 110 | + steps: |
| 111 | + - name: Scan for Rogue Code |
| 112 | + run: grep -r "pesterbot" ./cmd || echo "No rogue code found" |
| 113 | + |
| 114 | + - name: Remove Rogue Code |
| 115 | + run: sed -i '/pesterbot/d' ./cmd/main.go |
| 116 | + |
| 117 | + azure-coderabbitai: |
| 118 | + name: Set Up and Sync Azure for CodeRabbitAI |
| 119 | + runs-on: ubuntu-latest |
| 120 | + needs: bugzap-pesterbot |
| 121 | + |
| 122 | + steps: |
| 123 | + - name: Checkout Code |
| 124 | + uses: actions/checkout@v3 |
| 125 | + with: |
| 126 | + repository: bearycool11/pmll_knowledge_block |
| 127 | + |
| 128 | + - name: Login to Azure |
| 129 | + run: | |
| 130 | + az login --service-principal --username $AZURE_USER --password $AZURE_PASSWORD --tenant $AZURE_TENANT |
| 131 | +
|
| 132 | + - name: Create CodeRabbitAI Database |
| 133 | + run: | |
| 134 | + az storage account create --name coderabbitaiStorage --resource-group CodeRabbitAI --___location EastUS --sku Standard_LRS |
| 135 | + az storage container create --account-name coderabbitaiStorage --name neural-mem-cache |
| 136 | + az storage container create --account-name coderabbitaiStorage --name task-execution-data |
| 137 | +
|
| 138 | + - name: Deploy CodeRabbitAI AI Model |
| 139 | + run: | |
| 140 | + az ml model deploy --name rabbitai-pmll --resource-group CodeRabbitAI --workspace-name AIWorkspace \ |
| 141 | + --model-id rabbitai-pmll:v1 --compute-target AzureMLCompute |
| 142 | +
|
| 143 | + - name: Validate CodeRabbitAI Deployment |
| 144 | + run: ./validate_coderabbitai.sh |
| 145 | + |
| 146 | + package-toolbelt: |
| 147 | + name: Package and Publish Toolbelt |
| 148 | + runs-on: ubuntu-latest |
| 149 | + needs: azure-coderabbitai |
| 150 | + |
| 151 | + steps: |
| 152 | + - name: Download Build Artifacts |
| 153 | + uses: actions/download-artifact@v3 |
| 154 | + with: |
| 155 | + name: build-artifacts |
| 156 | + |
| 157 | + - name: Build Docker Image |
| 158 | + run: docker build -t modular_brain_toolbelt:latest . |
| 159 | + |
| 160 | + - name: Push Docker Image to Registry |
| 161 | + run: | |
| 162 | + docker tag modular_brain_toolbelt:latest ghcr.io/bearycool11/modular_brain_toolbelt:latest |
| 163 | + docker push ghcr.io/bearycool11/modular_brain_toolbelt:latest |
0 commit comments