-
Notifications
You must be signed in to change notification settings - Fork 2
93 lines (85 loc) · 2.68 KB
/
ubuntu.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
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'