Skip to content

Ubuntu

Ubuntu #137

Workflow file for this run

name: Ubuntu
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:
- '["ubuntu-latest"]'
- '["ubuntu-20.04"]'
- '["ubuntu-22.04"]'
- '["ubuntu-24.04"]'
- '["ubuntu-20.04", "ubuntu-22.04", "ubuntu-24.04"]'
default: '["ubuntu-20.04", "ubuntu-22.04", "ubuntu-24.04"]'
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: Setup Tcl
uses: apnadkarni/tcl-setup@action-debug
with:
tcl-tag: ${{ matrix.tcl-tag }}
- name: Install libuuid
id: uuid
run: |
sudo apt-get update
sudo apt-get install uuid-dev
- 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 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: '--disable-staticffi'
- 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'