Skip to content
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

CI: Setup distributable binary #11

Closed
wants to merge 10 commits into from
Closed
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
30 changes: 27 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,29 @@ jobs:
brew uninstall --force --ignore-dependencies node
brew cleanup -s node
brew cleanup --prune-prefix
brew uninstall --force --ignore-dependencies [email protected]
brew cleanup -s [email protected]
brew cleanup --prune-prefix
brew uninstall --force --ignore-dependencies [email protected]
brew cleanup -s [email protected]
brew cleanup --prune-prefix
brew uninstall --force --ignore-dependencies [email protected]
brew cleanup -s [email protected]
brew cleanup --prune-prefix
sudo rm -rf /System/Library/Frameworks/Python.framework/
brew cleanup --prune-prefix
sudo rm -rf /usr/local/bin/2to3
sudo rm -rf /usr/local/bin/2to3-3.11
sudo rm -rf /usr/local/bin/2to3-3.12
sudo rm -rf /usr/local/bin/idle3
sudo rm -rf /usr/local/bin/idle3.11
sudo rm -rf /usr/local/bin/idle3.12
sudo rm -rf /usr/local/bin/pydoc3
sudo rm -rf /usr/local/bin/pydoc3.11
sudo rm -rf /usr/local/bin/pydoc3.12
sudo rm -rf /usr/local/bin/python3
sudo rm -rf /usr/local/bin/python3-config
sudo rm -rf /usr/local/bin/python3.11
sudo rm -rf /usr/local/bin/python3.12
sudo rm -rf /usr/local/bin/python3.11-config
sudo rm -rf /usr/local/bin/python3.12-config
brew uninstall --force --ignore-dependencies ruby
brew cleanup -s ruby
brew cleanup --prune-prefix
Expand All @@ -41,6 +56,15 @@ jobs:
- name: Build
run: ./build.sh

# Save distributable as Artifact
- name: Save Distributable
uses: actions/upload-artifact@v2
with:
name: metacall
path: pkg/*.pkg
retention-days: 1
if-no-files-found: error

# Test Homebrew recipe
- name: Test
run: ./test.sh
6 changes: 6 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,9 @@ fi
# Build metacall brew recipe
export HOMEBREW_NO_AUTO_UPDATE=1
brew install ./metacall.rb --build-from-source --overwrite -v

# Build distributable binary using brew pkg
mkdir pkg && cd pkg
brew tap timsutton/formulae
brew install brew-pkg
brew pkg --with-deps --without-kegs metacall
4 changes: 2 additions & 2 deletions metacall.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def install
-DOPTION_BUILD_EXAMPLES=OFF
-DOPTION_BUILD_LOADERS_PY=ON
-DOPTION_BUILD_LOADERS_NODE=ON
-DNodeJS_INSTALL_PREFIX=/usr/local/Cellar/metacall/#{version}
-DNodeJS_INSTALL_PREFIX=#{prefix}
-DOPTION_BUILD_LOADERS_JAVA=ON
-DOPTION_BUILD_LOADERS_JS=OFF
-DOPTION_BUILD_LOADERS_C=OFF
Expand All @@ -70,7 +70,7 @@ def install
# debug = "set -euxo pipefail\n"

metacall_extra = [
"PREFIX=/usr/local/Cellar/metacall/#{version}\n",
"PREFIX=#{prefix}\n",
"export LOADER_LIBRARY=\"${PREFIX}/lib\"\n",
"export SERIAL_LIBRARY_PATH=\"${PREFIX}/lib\"\n",
"export DETOUR_LIBRARY_PATH=\"${PREFIX}/lib\"\n",
Expand Down
Loading