Skip to content

Implement support for running MetaCall from python.exe and node.exe. #671

Implement support for running MetaCall from python.exe and node.exe.

Implement support for running MetaCall from python.exe and node.exe. #671

Workflow file for this run

name: MacOS 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:
macos-test:
name: MacOS Clang Test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-12, macos-13, macos-14] # TODO: macos-15: https://github.com/metacall/core/issues/530
options: [
{build: debug, sanitizer: without-sanitizer},
{build: debug, sanitizer: address-sanitizer},
{build: debug, sanitizer: thread-sanitizer},
{build: release, sanitizer: without-sanitizer}
]
env:
NUGET_XMLDOC_MODE: skip
DOTNET_CLI_TELEMETRY_OPTOUT: "true"
steps:
- name: Check out the repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Uninstall NodeJS and NPM
run: |
npm uninstall npm -g
rm -rf /usr/local/lib/node_modules/npm
- name: Uninstall Ruby
run: |
brew uninstall --force --ignore-dependencies ruby
brew cleanup -s ruby
brew cleanup --prune-prefix
RUBY_FRAMEWORK_DIR=$(xcrun --sdk macosx --show-sdk-path)/System/Library/Frameworks/Ruby.framework
sudo rm -rf $RUBY_FRAMEWORK_DIR
- name: Uninstall Go
run: |
brew uninstall --force go
brew autoremove
sudo rm -rf /usr/local/Cellar/go
sudo rm -rf /usr/local/go
sudo rm -rf /usr/local/opt/go
sudo rm -rf /etc/paths.d/go
sudo rm -rf /usr/local/bin/go
sudo rm -rf /usr/local/bin/gofmt
- name: Uninstall Java
run: |
sudo rm -rf /Library/Java/JavaVirtualMachines/*
sudo rm -rf /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin
sudo rm -rf /Library/PreferencePanes/JavaControlPanel.prefPane
unset JAVA_HOME
- name: Export XCode SDK Root
run: echo "SDKROOT=$(xcrun --sdk macosx --show-sdk-path)" >> $GITHUB_ENV
- name: Set up the environment
run: sh ./tools/metacall-environment.sh $METACALL_INSTALL_OPTIONS
env:
METACALL_INSTALL_OPTIONS: base python nodejs typescript java ruby wasm rpc file cobol go backtrace #netcore5 c rust rapidjson funchook swig pack # clangformat v8rep51 coverage
- name: Configure
run: |
cd build
. .env
bash ../tools/metacall-configure.sh $METACALL_CONFIGURE_OPTIONS
env:
METACALL_CONFIGURE_OPTIONS: ${{ matrix.options.build }} ${{ matrix.options.sanitizer }} scripts ports tests python nodejs typescript java ruby wasm rpc file cobol go benchmarks install # netcore5 c rust examples pack # v8 coverage
- name: Build
working-directory: ./build
# TODO: Remove the disable option for fork safe once funchook problem is solved
run: |
. .env
cmake -DOPTION_FORK_SAFE=OFF ..
bash ../tools/metacall-build.sh $METACALL_BUILD_OPTIONS
env:
METACALL_BUILD_OPTIONS: ${{ matrix.options.build }} tests
macos-distributable:
name: MacOS Distributable Dispatch
needs: macos-test
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master'
steps:
- name: Homebrew Workflow Dispatch
uses: convictional/trigger-workflow-and-wait@v1.6.1
with:
owner: metacall
repo: homebrew
github_token: ${{ secrets.G_PERSONAL_ACCESS_TOKEN }}
workflow_file_name: test.yml
wait_workflow: true
client_payload: '{"ref": "${{ github.head_ref || github.ref_name }}"}'
ref: ${{ github.head_ref || github.ref_name }}
- name: MacOS Workflow Dispatch
uses: convictional/trigger-workflow-and-wait@v1.6.1
with:
owner: metacall
repo: distributable-macos
github_token: ${{ secrets.G_PERSONAL_ACCESS_TOKEN }}
workflow_file_name: ci.yml
wait_workflow: true
client_payload: '{"ref": "${{ github.head_ref || github.ref_name }}"}'
ref: master