-
Notifications
You must be signed in to change notification settings - Fork 67
72 lines (68 loc) · 2.12 KB
/
amd64_linux_bazel.yml
File metadata and controls
72 lines (68 loc) · 2.12 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
# ref: https://github.com/actions/runner-images
name: amd64 Linux Bazel
on: [push, pull_request, workflow_dispatch]
concurrency:
group: ${{github.workflow}}-${{github.ref}}
cancel-in-progress: true
# Building using the github runner environement directly.
jobs:
native:
strategy:
matrix:
examples: [{name: basic}, {name: embed}]
cpp: [
{version: 17, flags: "-std=c++17"},
{version: 20, flags: "-std=c++20"},
]
python: [
{version: '3.10'},
{version: '3.11'},
{version: '3.12'},
{version: '3.13'},
{version: '3.14'},
]
fail-fast: false
name: Linux•Bzl•C++${{matrix.cpp.version}}•Py${{matrix.python.version}}•${{matrix.examples.name}}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Check Java
run: java -version
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: ${{matrix.python.version}}
- name: Check Python
run: |
python --version
python -m platform
- uses: bazel-contrib/setup-bazel@0.19.0
with:
bazelisk-cache: true
disk-cache: ${{github.workflow}}
repository-cache: true
- name: Check Bazel
run: bazel version
- name: Build
run: >
cd examples/${{matrix.examples.name}} &&
bazel build
--config=ci
--@rules_python//python/config_settings:python_version=${{matrix.python.version}}
--cxxopt=${{matrix.cpp.flags}} --host_cxxopt=${{ matrix.cpp.flags }}
--subcommands=pretty_print
//...
- name: Test
run: >
cd examples/${{matrix.examples.name}} &&
bazel test
--config=ci
--@rules_python//python/config_settings:python_version=${{matrix.python.version}}
--cxxopt=${{matrix.cpp.flags}} --host_cxxopt=${{ matrix.cpp.flags }}
--subcommands=pretty_print
//...
amd64_linux_bazel:
runs-on: ubuntu-latest
needs: native
steps:
- uses: actions/checkout@v6