Repository navigation
83 lines (68 loc) · 3.73 KB
/
Copy pathprecommit.yml
File metadata and controls
83 lines (68 loc) · 3.73 KB
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
# A workflow to run Bazel builds and tests.
name: precommit
on:
workflow_dispatch:
pull_request:
push:
branches:
- 'main'
- 'beta'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
build-and-test:
name: Build+test ${{ matrix.name }}
runs-on: ${{ matrix.os }}
timeout-minutes: 30
strategy:
fail-fast: ${{ github.event_name != 'workflow_dispatch' }}
matrix:
include:
- { name: 'Linux x86_64 GCC', os: 'ubuntu-24.04', cc: gcc-14, cxx: g++-14, config: }
- { name: 'Linux ARM64 GCC', os: 'ubuntu-24.04-arm', cc: gcc-14, cxx: g++-14, config: --luajit_target_arch=arm64 }
- { name: 'Linux x86_64 LLVM+libstdc++', os: 'ubuntu-24.04', cc: clang, cxx: clang++, config: --linkopt=-fuse-ld=lld }
- { name: 'Linux x86_64 LLVM+libc++', os: 'ubuntu-24.04', cc: clang, cxx: clang++, config: --config=libc++ --linkopt=-fuse-ld=lld }
- { name: 'Linux ARM64 LLVM+libstdc++', os: 'ubuntu-24.04-arm', cc: clang, cxx: clang++, config: --linkopt=-fuse-ld=lld --luajit_target_arch=arm64 }
- { name: 'Linux ARM64 LLVM+libc++', os: 'ubuntu-24.04-arm', cc: clang, cxx: clang++, config: --config=libc++ --linkopt=-fuse-ld=lld --luajit_target_arch=arm64 }
- { name: 'MacOS 15 x86_64 LLVM+libc++', os: 'macos-15-intel', cc: clang, cxx: clang++, config: --config=libc++ }
- { name: 'MacOS 26 x86_64 LLVM+libc++', os: 'macos-26-intel', cc: clang, cxx: clang++, config: --config=libc++ }
- { name: 'MacOS 15 ARM64 LLVM+libc++', os: 'macos-15', cc: clang, cxx: clang++, config: --config=libc++ --luajit_target_arch=arm64 }
- { name: 'MacOS 26 ARM64 LLVM+libc++', os: 'macos-26', cc: clang, cxx: clang++, config: --config=libc++ --luajit_target_arch=arm64 }
env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
steps:
- uses: actions/checkout@v7
- name: install infrastructure (Linux)
if: contains(matrix.os, 'ubuntu-24.04')
run: |
sudo apt-get install libc++-dev libc++abi-dev python3-dev python3-numpy python3-packaging
sudo ln -s /usr/lib/llvm-18/include/c++/v1 /usr/include/c++/v1
- name: install infrastructure (MacOS)
if: matrix.os == 'macos-15' || matrix.os == 'macos-15-intel' || matrix.os == 'macos-26' || matrix.os == 'macos-26-intel'
run: brew install numpy python-packaging
- name: build-lua5.1
run: |
bazel --bazelrc=.bazelrc build --config=lua5_1 ${{ matrix.config }} //...
- name: test-lua5.1
run: |
bazel --bazelrc=.bazelrc test --config=lua5_1 ${{ matrix.config }} --test_output=errors //...
- name: build-lua5.2
run: |
bazel --bazelrc=.bazelrc build --config=lua5_2 ${{ matrix.config }} //...
- name: test-lua5.2
run: |
bazel --bazelrc=.bazelrc test --config=lua5_2 ${{ matrix.config }} --test_output=errors //...
- name: build-luajit
run: |
bazel --bazelrc=.bazelrc build --config=luajit ${{ matrix.config }} //...
- name: test-luajit
run: |
bazel --bazelrc=.bazelrc test --config=luajit ${{ matrix.config }} --test_output=errors //...
- name: build-luajit-internal_unwind
run: |
bazel --bazelrc=.bazelrc build --config=luajit ${{ matrix.config }} --copt=-fno-asynchronous-unwind-tables --luajit_external_unwinder=False //...
- name: test-luajit-internal_unwind
run: |
bazel --bazelrc=.bazelrc test --config=luajit ${{ matrix.config }} --copt=-fno-asynchronous-unwind-tables --luajit_external_unwinder=False --test_output=errors //...