Skip to content

Commit

Permalink
Update build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
viferga authored Jun 17, 2024
1 parent 4ef26d6 commit 11dd465
Showing 1 changed file with 61 additions and 30 deletions.
91 changes: 61 additions & 30 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,65 @@
name: MacOSX BigSur MetaCall build
on: [push]
name: Build MetaCall Distributable

on:
push:
branches:
- main
tags:
- "v*.*.*"
pull_request:
workflow_dispatch:

jobs:
build-action:
build:
runs-on: macos-latest
steps:
- name: Checkout upstream MetaCall Distributable MacOS
uses: actions/checkout@v3
- run: |
chmod +x ./build.sh
./build.sh
- name: Upload build tarball production artifacts
uses: actions/upload-artifact@v3
with:
name: metacall-tarball
path: metacall-tarball-macos-x64.zip
if-no-files-found: error
python-tests:
name: Python loader tests
needs: build-action
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, macos-12, macos-10.15]
steps:
- name: Download build/artifact from cache
uses: actions/download-artifact@v3
- name: Check out the repository
uses: actions/checkout@v2
with:
fetch-depth: 0

# Clean up previous dependencies in order to avoid conflicts with brew
- name: Clean
run: |
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)
# Build Homebrew recipe
- name: Build
run: ./build.sh

# Release package
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
name: metacall-tarball
path: tarball
- run: |
unzip tarball/metacall-tarball-macos-x64.zip
echo "print(\"Hello World from Python GitHub Actions\")" > py-eval-test.py
./metacall.sh ./py-eval-test.py
fail_on_unmatched_files: true
files: pkg/*.pkg

0 comments on commit 11dd465

Please sign in to comment.