Skip to content

Commit 8a0afa8

Browse files
committed
Add github workflows for CI
1 parent 078d809 commit 8a0afa8

File tree

4 files changed

+280
-0
lines changed

4 files changed

+280
-0
lines changed

.github/workflows/mac.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: mac
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
tcl-tags: # User input for selecting Tcl tag
7+
description: 'Tcl version'
8+
required: true
9+
type: choice
10+
options:
11+
- '["core-9-0-0"]'
12+
- '["core-9-0-2"]'
13+
- '["core-8-6-10"]'
14+
- '["core-8-6-17"]'
15+
- '["main"]'
16+
- '["core-9-0-branch"]'
17+
- '["core-8-6-branch"]'
18+
- '["core-8-6-10", "core-9-0-0"]'
19+
- '["core-8-6-10", "core-8-6-17", "core-9-0-0", "core-9-0-2"]'
20+
default: '["core-8-6-10", "core-9-0-0"]'
21+
runners: # User input for selecting OS
22+
description: 'OS version'
23+
required: true
24+
type: choice
25+
options:
26+
- '["macos-latest"]'
27+
- '["macos-13"]'
28+
- '["macos-14"]'
29+
- '["macos-15"]'
30+
- '["macos-13", "macos-14", "macos-15]'
31+
default: '["macos-latest"]'
32+
run-tests: # Whether tests should be run
33+
description: 'Run tests as well'
34+
required: false
35+
default: true
36+
type: boolean
37+
38+
jobs:
39+
build:
40+
strategy:
41+
matrix:
42+
runner-os: ${{ fromJSON(github.event.inputs.runners) }}
43+
tcl-tag: ${{ fromJSON(github.event.inputs.tcl-tags) }}
44+
runs-on: ${{ matrix.runner-os }}
45+
46+
steps:
47+
48+
- name: Setup Tcl
49+
id: tcl-setup-step
50+
uses: apnadkarni/tcl-setup@v1
51+
with:
52+
tcl-tag: ${{ matrix.tcl-tag }}
53+
54+
- name: Build extension
55+
id: tcl-build-step
56+
uses: apnadkarni/tcl-build-extension@v1
57+
with:
58+
run-tests: ${{ inputs.run-tests }}
59+

.github/workflows/mingw.yml

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
name: Mingw
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
tcl-tags: # User input for selecting Tcl tag
7+
description: 'Tcl version'
8+
required: true
9+
type: choice
10+
options:
11+
- '["core-9-0-0"]'
12+
- '["core-9-0-2"]'
13+
- '["core-8-6-10"]'
14+
- '["core-8-6-17"]'
15+
- '["main"]'
16+
- '["core-9-0-branch"]'
17+
- '["core-8-6-branch"]'
18+
- '["core-8-6-10", "core-9-0-0"]'
19+
- '["core-8-6-10", "core-8-6-17", "core-9-0-0", "core-9-0-2"]'
20+
default: '["core-8-6-10", "core-9-0-0"]'
21+
runners: # User input for selecting OS
22+
description: 'OS version'
23+
required: true
24+
type: choice
25+
options:
26+
- '["windows-latest"]'
27+
- '["windows-2022"]'
28+
- '["windows-2019"]'
29+
- '["windows-2019", "windows-2022"]'
30+
default: '["windows-latest"]'
31+
msystems:
32+
description: 'mingw32 and/or mingw64'
33+
required: false
34+
type: choice
35+
options:
36+
- '["mingw64"]'
37+
- '["mingw32"]'
38+
- '["mingw64", "mingw32"]'
39+
default: '["mingw64", "mingw32"]'
40+
run-tests: # Whether tests should be run
41+
description: 'Run tests as well'
42+
required: false
43+
default: true
44+
type: boolean
45+
46+
jobs:
47+
build:
48+
strategy:
49+
matrix:
50+
runner-os: ${{ fromJSON(github.event.inputs.runners) }}
51+
tcl-tag: ${{ fromJSON(github.event.inputs.tcl-tags) }}
52+
msystem: ${{ fromJSON(github.event.inputs.msystems) }}
53+
runs-on: ${{ matrix.runner-os }}
54+
defaults:
55+
run:
56+
shell: msys2 {0}
57+
58+
steps:
59+
60+
- name: Set up msys2
61+
uses: msys2/setup-msys2@v2
62+
with:
63+
msystem: ${{ matrix.msystem }}
64+
pacboy: "git: make: gcc:p"
65+
path-type: minimal
66+
release: true
67+
update: false
68+
cache: true
69+
70+
- name: Verify toolchain
71+
run: |
72+
gcc -v
73+
make -v
74+
75+
- name: Setup Tcl
76+
id: tcl-setup-step
77+
uses: apnadkarni/tcl-setup@v1
78+
with:
79+
tcl-tag: ${{ matrix.tcl-tag }}
80+
toolchain: 'msys2'
81+
target-arch: ${{ matrix.msystem }}
82+
83+
- name: Build extension
84+
id: tcl-build-step
85+
uses: apnadkarni/tcl-build-extension@v1
86+
with:
87+
toolchain: 'msys2'
88+
run-tests: ${{ inputs.run-tests }}
89+

.github/workflows/msvc.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: Visual C++
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
tcl-tags: # User input for selecting Tcl tag
7+
description: 'Tcl version'
8+
required: true
9+
type: choice
10+
options:
11+
- '["core-9-0-0"]'
12+
- '["core-9-0-2"]'
13+
- '["core-8-6-10"]'
14+
- '["core-8-6-17"]'
15+
- '["main"]'
16+
- '["core-9-0-branch"]'
17+
- '["core-8-6-branch"]'
18+
- '["core-8-6-10", "core-9-0-0"]'
19+
- '["core-8-6-10", "core-8-6-17", "core-9-0-0", "core-9-0-2"]'
20+
default: '["core-8-6-10", "core-9-0-0"]'
21+
runners: # User input for selecting OS
22+
description: 'OS version'
23+
required: true
24+
type: choice
25+
options:
26+
- '["windows-latest"]'
27+
- '["windows-2022"]'
28+
- '["windows-2025"]'
29+
- '["windows-2022", "windows-2025"]'
30+
default: '["windows-latest"]'
31+
target-architectures:
32+
description: 'x86 and/or x64'
33+
required: false
34+
type: choice
35+
options:
36+
- '["x64"]'
37+
- '["x86"]'
38+
- '["x64", "x86"]'
39+
default: '["x64", "x86"]'
40+
run-tests: # Whether tests should be run
41+
description: 'Run tests as well'
42+
required: false
43+
default: true
44+
type: boolean
45+
46+
jobs:
47+
build:
48+
strategy:
49+
matrix:
50+
runner-os: ${{ fromJSON(github.event.inputs.runners) }}
51+
tcl-tag: ${{ fromJSON(github.event.inputs.tcl-tags) }}
52+
target-arch: ${{ fromJSON(github.event.inputs.target-architectures) }}
53+
runs-on: ${{ matrix.runner-os }}
54+
steps:
55+
# Note msvc defaults to 64-bit
56+
- name: Init MSVC
57+
uses: ilammy/msvc-dev-cmd@v1
58+
with:
59+
arch: ${{ matrix.target-arch }}
60+
61+
- name: Setup Tcl
62+
id: tcl-setup-step
63+
uses: apnadkarni/tcl-setup@v1
64+
with:
65+
tcl-tag: ${{ matrix.tcl-tag }}
66+
target-arch: ${{ matrix.target-arch }}
67+
toolchain: 'vc'
68+
69+
- name: Build extension
70+
id: tcl-build-step
71+
uses: apnadkarni/tcl-build-extension@v1
72+
with:
73+
toolchain: 'vc'
74+
run-tests: ${{ inputs.run-tests }}

.github/workflows/ubuntu.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Ubuntu
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
tcl-tags: # User input for selecting Tcl tag
7+
description: 'Tcl version'
8+
required: true
9+
type: choice
10+
options:
11+
- '["core-9-0-0"]'
12+
- '["core-9-0-2"]'
13+
- '["core-8-6-10"]'
14+
- '["core-8-6-17"]'
15+
- '["main"]'
16+
- '["core-9-0-branch"]'
17+
- '["core-8-6-branch"]'
18+
- '["core-8-6-10", "core-9-0-0"]'
19+
- '["core-8-6-10", "core-8-6-17", "core-9-0-0", "core-9-0-2"]'
20+
default: '["core-8-6-10", "core-9-0-0"]'
21+
runners: # User input for selecting OS
22+
description: 'OS version'
23+
required: true
24+
type: choice
25+
options:
26+
- '["ubuntu-latest"]'
27+
- '["ubuntu-22.04"]'
28+
- '["ubuntu-24.04"]'
29+
- '["ubuntu-22.04", "ubuntu-24.04"]'
30+
default: '["ubuntu-latest"]'
31+
run-tests: # Whether tests should be run
32+
description: 'Run tests as well'
33+
required: false
34+
default: true
35+
type: boolean
36+
37+
jobs:
38+
build:
39+
strategy:
40+
matrix:
41+
runner-os: ${{ fromJSON(github.event.inputs.runners) }}
42+
tcl-tag: ${{ fromJSON(github.event.inputs.tcl-tags) }}
43+
44+
runs-on: ${{ matrix.runner-os }}
45+
46+
steps:
47+
48+
- name: Setup Tcl
49+
id: tcl-setup-step
50+
uses: apnadkarni/tcl-setup@v1
51+
with:
52+
tcl-tag: ${{ matrix.tcl-tag }}
53+
54+
- name: Build extension
55+
id: tcl-build-step
56+
uses: apnadkarni/tcl-build-extension@v1
57+
with:
58+
run-tests: ${{ inputs.run-tests }}

0 commit comments

Comments
 (0)