MacOS #157
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: MacOS | |
on: | |
workflow_dispatch: | |
inputs: | |
tcl-tags: # User input for selecting Tcl tag | |
description: 'Tcl version' | |
required: true | |
type: choice | |
options: | |
- '["core-9-0-0"]' | |
- '["core-8-6-13"]' | |
- '["main"]' | |
- '["core-8-6-branch"]' | |
- '["core-8-6-13", "core-9-0-0"]' | |
- '["core-8-6-13", "core-9-0-0", "main", "core-8-6-branch"]' | |
default: '["core-8-6-13", "core-9-0-0"]' | |
runners: # User input for selecting OS | |
description: 'OS version' | |
required: true | |
type: choice | |
options: | |
- '["macos-latest"]' | |
- '["macos-13"]' | |
- '["macos-14"]' | |
- '["macos-13", "macos-14"]' | |
default: '["macos-13", "macos-14"]' | |
run-tests: # Whether tests should be run | |
description: 'Run tests as well' | |
required: false | |
default: true | |
type: boolean | |
with-dyncall: # Build with dyncall | |
description: 'Build dyncall version' | |
required: false | |
default: true | |
type: boolean | |
with-libffi: # Build with libffi | |
description: 'Build libffi version' | |
required: false | |
default: true | |
type: boolean | |
jobs: | |
build: | |
strategy: | |
matrix: | |
runner-os: ${{ fromJSON(github.event.inputs.runners) }} | |
tcl-tag: ${{ fromJSON(github.event.inputs.tcl-tags) }} | |
runs-on: ${{ matrix.runner-os }} | |
steps: | |
- name: Update brew | |
run: | | |
brew update | |
- name: Setup Tcl | |
id: tcl-setup-step | |
uses: apnadkarni/tcl-setup@action-debug | |
with: | |
tcl-tag: ${{ matrix.tcl-tag }} | |
- name: Install libffi | |
if: inputs.with-libffi | |
run: | | |
brew install libffi || true | |
- name: Install dyncall | |
if: inputs.with-dyncall | |
run: | | |
cd ${{ runner.temp }} | |
wget https://dyncall.org/r1.4/dyncall-1.4.tar.gz | |
tar xf dyncall-1.4.tar.gz | |
cd dyncall-1.4 | |
mkdir build | |
cd build | |
../configure --prefix=${{ env.TCLEXTRASDIR }} | |
make | |
make install | |
- name: Build with dyncall extension | |
if: inputs.with-dyncall | |
uses: apnadkarni/tcl-build-extension@build-opts | |
with: | |
build-subdir: 'build-with-dyncall' | |
run-tests: ${{ inputs.run-tests }} | |
config-opts: 'LDFLAGS=-L${{ env.TCLEXTRASDIR }}/lib CPPFLAGS=-I${{ env.TCLEXTRASDIR }}/include --with-dyncall' | |
- name: Build with libffi extension | |
if: inputs.with-libffi | |
uses: apnadkarni/tcl-build-extension@build-opts | |
with: | |
build-subdir: 'build-with-libffi' | |
run-tests: ${{ inputs.run-tests }} | |
config-opts: 'LDFLAGS="-L/usr/local/opt/libffi/lib -L$HOMEBREW_PREFIX/opt/libffi/lib" CFLAGS="-I/usr/local/opt/libffi/include -I$HOMEBREW_PREFIX/opt/libffi/include" --disable-staticffi' | |