-
Notifications
You must be signed in to change notification settings - Fork 634
feat(homebrew): add dev cask install #1071
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
drew
wants to merge
4
commits into
main
Choose a base branch
from
homebrew-install
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,127 @@ | ||
| # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| name: Publish Homebrew Dev Cask Bundle | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| workflow_run: | ||
| workflows: | ||
| - Release Dev | ||
| - Release VM Dev | ||
| types: | ||
| - completed | ||
|
|
||
| permissions: | ||
| contents: write | ||
|
|
||
| concurrency: | ||
| group: homebrew-dev-cask | ||
| cancel-in-progress: false | ||
|
|
||
| defaults: | ||
| run: | ||
| shell: bash | ||
|
|
||
| jobs: | ||
| publish: | ||
| name: Publish Dev Cask Bundle | ||
| if: github.repository == 'NVIDIA/OpenShell' && (github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success') | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 10 | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| BUNDLE_ASSET: openshell-homebrew-dev-aarch64-apple-darwin.tar.gz | ||
| steps: | ||
| - name: Download release assets | ||
| run: | | ||
| set -euo pipefail | ||
| mkdir -p downloads | ||
|
|
||
| gh release download dev \ | ||
| --repo "${GITHUB_REPOSITORY}" \ | ||
| --pattern openshell-aarch64-apple-darwin.tar.gz \ | ||
| --pattern openshell-gateway-aarch64-apple-darwin.tar.gz \ | ||
| --dir downloads \ | ||
| --clobber | ||
|
|
||
| gh release download vm-dev \ | ||
| --repo "${GITHUB_REPOSITORY}" \ | ||
| --pattern openshell-driver-vm-aarch64-apple-darwin.tar.gz \ | ||
| --dir downloads \ | ||
| --clobber | ||
|
|
||
| test -f downloads/openshell-aarch64-apple-darwin.tar.gz | ||
| test -f downloads/openshell-gateway-aarch64-apple-darwin.tar.gz | ||
| test -f downloads/openshell-driver-vm-aarch64-apple-darwin.tar.gz | ||
|
|
||
| - name: Build cask bundle | ||
| run: | | ||
| set -euo pipefail | ||
| mkdir -p bundle/libexec/openshell artifacts | ||
|
|
||
| tar -xzf downloads/openshell-aarch64-apple-darwin.tar.gz \ | ||
| -C bundle openshell | ||
| tar -xzf downloads/openshell-gateway-aarch64-apple-darwin.tar.gz \ | ||
| -C bundle/libexec openshell-gateway | ||
| tar -xzf downloads/openshell-driver-vm-aarch64-apple-darwin.tar.gz \ | ||
| -C bundle/libexec/openshell openshell-driver-vm | ||
|
|
||
| cat > bundle/openshell-gateway <<'SH' | ||
| #!/bin/sh | ||
| set -e | ||
|
|
||
| path=$0 | ||
| while [ -L "$path" ]; do | ||
| link=$(readlink "$path") | ||
| case "$link" in | ||
| /*) path=$link ;; | ||
| *) path=$(dirname "$path")/$link ;; | ||
| esac | ||
| done | ||
|
|
||
| dir=$(CDPATH= cd -- "$(dirname -- "$path")" && pwd) | ||
| export OPENSHELL_DRIVER_DIR="${dir}/libexec/openshell" | ||
| exec "${dir}/libexec/openshell-gateway" "$@" | ||
| SH | ||
|
|
||
| cat > bundle/openshell-driver-vm <<'SH' | ||
| #!/bin/sh | ||
| set -e | ||
|
|
||
| path=$0 | ||
| while [ -L "$path" ]; do | ||
| link=$(readlink "$path") | ||
| case "$link" in | ||
| /*) path=$link ;; | ||
| *) path=$(dirname "$path")/$link ;; | ||
| esac | ||
| done | ||
|
|
||
| dir=$(CDPATH= cd -- "$(dirname -- "$path")" && pwd) | ||
| exec "${dir}/libexec/openshell/openshell-driver-vm" "$@" | ||
| SH | ||
|
|
||
| cat > bundle/libexec/openshell/openshell-driver-vm-entitlements.plist <<'XML' | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
| <plist version="1.0"> | ||
| <dict> | ||
| <key>com.apple.security.hypervisor</key> | ||
| <true/> | ||
| </dict> | ||
| </plist> | ||
| XML | ||
|
|
||
| chmod 0555 bundle/openshell bundle/openshell-gateway bundle/openshell-driver-vm | ||
| chmod 0555 bundle/libexec/openshell-gateway bundle/libexec/openshell/openshell-driver-vm | ||
|
|
||
| tar -czf "artifacts/${BUNDLE_ASSET}" -C bundle . | ||
| tar -tzf "artifacts/${BUNDLE_ASSET}" | ||
|
|
||
| - name: Upload cask bundle to dev release | ||
| run: | | ||
| set -euo pipefail | ||
| gh release upload dev "artifacts/${BUNDLE_ASSET}" \ | ||
| --repo "${GITHUB_REPOSITORY}" \ | ||
| --clobber |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| cask "openshell-dev" do | ||
| version :latest | ||
| sha256 :no_check | ||
|
|
||
| url "https://github.com/NVIDIA/OpenShell/releases/download/dev/openshell-homebrew-dev-aarch64-apple-darwin.tar.gz" | ||
| name "OpenShell Dev" | ||
| desc "Development build of the safe private runtime for autonomous AI agents" | ||
| homepage "https://github.com/NVIDIA/OpenShell" | ||
|
|
||
| depends_on arch: :arm64 | ||
| depends_on macos: ">= :big_sur" | ||
|
|
||
| binary "openshell" | ||
| binary "openshell-gateway" | ||
| binary "openshell-driver-vm" | ||
|
|
||
| postflight do | ||
| system_command "/usr/bin/codesign", | ||
| args: [ | ||
| "--entitlements", | ||
| "#{staged_path}/libexec/openshell/openshell-driver-vm-entitlements.plist", | ||
| "--force", | ||
| "-s", | ||
| "-", | ||
| "#{staged_path}/libexec/openshell/openshell-driver-vm", | ||
| ] | ||
| end | ||
| end |
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
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
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.