Solve issues from pkg. #20
Workflow file for this run
This file contains 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: MetaCall Brew PKG Test | |
on: | |
workflow_dispatch: | |
pull_request: | |
push: | |
tags: | |
- 'v*.*.*' | |
branches: | |
- master | |
- develop | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: Build Test Distributable | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-12, macos-13, macos-14] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Check out the repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
# Clean up previous dependencies in order to avoid conflicts with brew | |
- name: Uninstall brew completely | |
run: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)" | |
- name: Install brew | |
run: | | |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | |
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 | |
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 | |
sudo rm -rf $(brew --repo homebrew/core) | |
- name: Test | |
run: ./test.sh | |
- name: Create the distributable folder | |
run: | | |
mkdir -p distributable | |
mv ruby-with-python.pkg distributable/ | |
mv ruby-with-python.tgz distributable/ | |
# Upload build artifact | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: metacall-tarball-${{ matrix.os }} | |
path: distributable/* | |
test-tgz: | |
name: Run Test Distributable TGZ | |
needs: build | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-12, macos-13, macos-14] | |
runs-on: ${{ matrix.os }} | |
steps: | |
# Clean up previous dependencies in order to avoid conflicts with brew | |
- name: Uninstall brew completely | |
run: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)" | |
- name: Download the artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: metacall-tarball-${{ matrix.os }} | |
# Test the package in a clean environment | |
- name: Test | |
run: | | |
mkdir distributable | |
tar -xvzf ruby-with-python.tgz -C `pwd`/distributable | |
export PATH="`pwd`/distributable/bin:$PATH" | |
./distributable/bin/python3 -c 'import sys; print(sys.argv)' | |
test-pkg: | |
name: Run Test Distributable PKG | |
needs: build | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-12, macos-13, macos-14] | |
runs-on: ${{ matrix.os }} | |
steps: | |
# Clean up previous dependencies in order to avoid conflicts with brew | |
- name: Uninstall brew completely | |
run: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)" | |
- name: Download the artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: metacall-tarball-${{ matrix.os }} | |
# Test the package in a clean environment | |
- name: Test | |
run: | | |
mkdir distributable | |
sudo installer -pkg "ruby-with-python.pkg" -target / | |
/bin/python3 -c 'import sys; print(sys.argv)' |