forked from LuaJIT/LuaJIT
-
Notifications
You must be signed in to change notification settings - Fork 14
131 lines (126 loc) · 4.1 KB
/
testing.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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
# XXX: A single call tree for reusable workflows can't exceed the
# total of 20 workflows, as stated in the documentation [1].
# Some other jobs are started in separate workflow files to
# overcome the limitation. The jobs are Tarantool ecosystem
# integration testing (tarantool-ecosystem.yml) and exotic
# Tarantool builds (tarantool-exotic.yml).
#
# [1]: https://docs.github.com/en/actions/using-workflows/reusing-workflows#limitations
name: Testing
on:
push:
branches-ignore:
- '**-notest'
- 'upstream-**'
tags-ignore:
- '**'
concurrency:
# An update of a developer branch cancels the previously
# scheduled workflow run for this branch. However, the default
# branch, and long-term branch (tarantool/release/2.11,
# tarantool/release/2.10, etc) workflow runs are never canceled.
#
# We use a trick here: define the concurrency group as 'workflow
# run ID' + # 'workflow run attempt' because it is a unique
# combination for any run. So it effectively discards grouping.
#
# XXX: we cannot use `github.sha` as a unique identifier because
# pushing a tag may cancel a run that works on a branch push
# event.
group: ${{ startsWith(github.ref, 'refs/heads/tarantool/')
&& format('{0}-{1}', github.run_id, github.run_attempt)
|| format('{0}-{1}', github.workflow, github.ref) }}
cancel-in-progress: true
jobs:
test-luajit:
strategy:
fail-fast: false
matrix:
ARCH: [ARM64, x86_64]
BUILDTYPE: [Debug, Release]
GC64: [ON, OFF]
OS: [Linux, macOS]
CC: [gcc, clang]
include:
- BUILDTYPE: Debug
CMAKEFLAGS: -DCMAKE_BUILD_TYPE=Debug -DLUA_USE_ASSERT=ON -DLUA_USE_APICHECK=ON
- BUILDTYPE: Release
CMAKEFLAGS: -DCMAKE_BUILD_TYPE=RelWithDebInfo
exclude:
- ARCH: ARM64
GC64: OFF
- OS: macOS
GC64: OFF
- OS: macOS
CC: gcc
- ARCH: ARM64
OS: Linux
CC: clang
runs-on: [self-hosted, regular, '${{ matrix.OS }}', '${{ matrix.ARCH }}']
name: >
LuaJIT
(${{ matrix.OS }}/${{ matrix.ARCH }})
${{ matrix.BUILDTYPE }}
GC64:${{ matrix.GC64 }}
CC:${{ matrix.CC }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: setup Linux
uses: ./.github/actions/setup-linux
if: ${{ matrix.OS == 'Linux' }}
- name: setup macOS
uses: ./.github/actions/setup-macos
if: ${{ matrix.OS == 'macOS' }}
- name: configure
run: >
CC=${{ matrix.CC }}
cmake -S . -B ${{ env.BUILDDIR }}
-G Ninja
${{ matrix.CMAKEFLAGS }}
-DLUAJIT_ENABLE_GC64=${{ matrix.GC64 }}
- name: build
run: cmake --build . --parallel
working-directory: ${{ env.BUILDDIR }}
- name: test
run: cmake --build . --parallel --target LuaJIT-test
working-directory: ${{ env.BUILDDIR }}
test-tarantool:
strategy:
fail-fast: false
matrix:
ARCH: [ARM64, x86_64]
BUILDTYPE: [Debug, Release]
GC64: [ON, OFF]
OS: [Linux, macOS]
include:
- BUILDTYPE: Debug
CMAKEFLAGS: -DCMAKE_BUILD_TYPE=Debug
- BUILDTYPE: Release
CMAKEFLAGS: -DCMAKE_BUILD_TYPE=RelWithDebInfo
exclude:
- ARCH: ARM64
GC64: OFF
- OS: macOS
GC64: OFF
name: >
Tarantool
(${{ matrix.OS }}/${{ matrix.ARCH }})
${{ matrix.BUILDTYPE }}
GC64:${{ matrix.GC64 }}
needs: test-luajit
# XXX: Only LuaJIT-tests are running in this workflow.
uses: tarantool/tarantool/.github/workflows/luajit-integration.yml@master
with:
CMAKE_EXTRA_PARAMS: >
-G Ninja
${{ matrix.CMAKEFLAGS }}
-DLUAJIT_ENABLE_GC64=${{ matrix.GC64 }}
arch: ${{ matrix.ARCH }}
os: ${{ matrix.OS }}
# XXX: Quotes are mandatory, otherwise the trailing zero is
# stripped and the branch is mischosen as a result.
release: 'release/2.11'
revision: ${{ github.sha }}