Repository navigation
Publish version tags automatically and install the latest release with one command #25
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: native-installer | |
| on: | |
| pull_request: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| bundle: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-22.04, macos-14, windows-2022] | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 30 | |
| defaults: | |
| run: | |
| shell: bash | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-go@v7 | |
| with: | |
| go-version-file: go.mod | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: '22.22.0' | |
| - name: Build the native daemon and test bundle boundaries | |
| run: | | |
| go build -ldflags "-X github.com/MiniMax-AI-Dev/parsar/apps/parsar-daemon/internal/cli.Version=$GITHUB_SHA" -o "$RUNNER_TEMP/oac-daemon${{ runner.os == 'Windows' && '.exe' || '' }}" ./apps/parsar-daemon/cmd/parsar-daemon | |
| node --test scripts/build-native-installer.test.mjs | |
| - name: Build pinned native components | |
| run: | | |
| npm install --global pnpm@10.30.3 | |
| pnpm install --frozen-lockfile --filter @parsar/claude-sdk-adapter... | |
| pnpm --filter @parsar/claude-sdk-adapter build --outDir "$RUNNER_TEMP/claude-compiled" | |
| pnpm --config.inject-workspace-packages=true --config.extend-node-path=false --filter @parsar/claude-sdk-adapter deploy --prod "$RUNNER_TEMP/claude-runtime" | |
| rm -rf "$RUNNER_TEMP/claude-runtime/dist" | |
| mv "$RUNNER_TEMP/claude-compiled" "$RUNNER_TEMP/claude-runtime/dist" | |
| # Reify the dedicated frozen export lock without pnpm's symlink layout. | |
| # Flattening isolated package links changes Node dependency resolution. | |
| rm -rf "$RUNNER_TEMP/claude-runtime/node_modules" | |
| pnpm --dir "$RUNNER_TEMP/claude-runtime" install --prod --frozen-lockfile --config.node-linker=hoisted --ignore-scripts | |
| npm install --prefix "$RUNNER_TEMP/native-tools" --no-save @openai/codex@0.153.4 | |
| - name: Build the pinned MiniMax companion on Unix | |
| if: runner.os != 'Windows' | |
| run: | | |
| source_repository="$(node -p 'require("./packages/mcode-harness/source.json").repository')" | |
| source_revision="$(node -p 'require("./packages/mcode-harness/source.json").revision')" | |
| source_version="$(node -p 'require("./packages/mcode-harness/source.json").version')" | |
| git init --quiet "$RUNNER_TEMP/mcode-source" | |
| git -C "$RUNNER_TEMP/mcode-source" remote add origin "$source_repository" | |
| git -C "$RUNNER_TEMP/mcode-source" fetch --depth 1 origin "$source_revision" | |
| git -C "$RUNNER_TEMP/mcode-source" checkout --detach FETCH_HEAD | |
| npm install --prefix "$RUNNER_TEMP/mcode-native" --no-audit --no-fund --include=optional --install-strategy=nested "@minimax-ai/code@$source_version" | |
| MCODE_NATIVE_SOURCE="$RUNNER_TEMP/mcode-source" \ | |
| MCODE_CLI_DIR="$RUNNER_TEMP/mcode-native/node_modules/@minimax-ai/code" \ | |
| MCODE_HARNESS_BUILD_DIR="$RUNNER_TEMP/minimax-runtime" \ | |
| bash scripts/build-mcode-harness.sh | |
| - name: Package and exercise CLI-only installation, additions and reuse | |
| run: | | |
| if [[ "$RUNNER_OS" == Windows ]]; then | |
| export CLAUDE_CODE_GIT_BASH_PATH='C:\Program Files\Git\bin\bash.exe' | |
| fi | |
| node scripts/build-native-installer-ci.mjs | |
| - name: Verify native Harness protocols without model requests | |
| run: | | |
| if [[ "$RUNNER_OS" == Windows ]]; then | |
| export CLAUDE_CODE_GIT_BASH_PATH='C:\Program Files\Git\bin\bash.exe' | |
| fi | |
| node scripts/native-harness-smoke.mjs --codex-binary "$RUNNER_TEMP/native-installer/components/codex/bin/codex${{ runner.os == 'Windows' && '.exe' || '' }}" --claude-runtime "$RUNNER_TEMP/native-installer/components/claude" | |
| - name: Archive the native distribution | |
| run: | | |
| cd "$RUNNER_TEMP" | |
| tar -C native-installer -czf "oac-native-installer-${{ runner.os }}-${{ runner.arch }}.tar.gz" . | |
| - uses: actions/upload-artifact@v6 | |
| with: | |
| name: oac-native-installer-${{ runner.os }}-${{ runner.arch }} | |
| path: ${{ runner.temp }}/oac-native-installer-*.tar.gz | |
| if-no-files-found: error |