-
Notifications
You must be signed in to change notification settings - Fork 14
77 lines (73 loc) · 2.22 KB
/
ubuntu-build.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
# ref: https://github.com/actions/runner-images
name: ubuntu-build
on: [push, pull_request, workflow_dispatch]
concurrency:
group: ci-${{github.workflow}}-${{ github.ref }}
cancel-in-progress: true
jobs:
cmake:
name: CMake ubuntu-22.04
runs-on: ubuntu-22.04
steps:
- name: Show env
run: env
- uses: actions/checkout@v4
- name: Install Build Dependencies
run: >
sudo apt update &&
sudo apt install --no-install-recommends -y
cmake make
- name: Show Python version and platform info
run: |
python --version
python -m platform
- name: Show CMake version
run: cmake --version
- name: CMake Configure
run: cmake -S. -Bbuild -DCMAKE_VERBOSE_MAKEFILE=ON
- name: CMake Build
run: cmake --build build -j$(nproc)
bazel:
strategy:
matrix:
options: [
{version: 14, flags: "-std=c++14"},
{version: 17, flags: "-std=c++17"},
{version: 20, flags: "-std=c++20"},
]
fail-fast: false # Don't cancel all jobs if one fails.
name: Bazel ubuntu-22.04 C++${{ matrix.options.version }}
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.11 # Current default version in MODULE.bazel
- name: Show Python version and platform info
run: |
python --version
python -m platform
- uses: bazel-contrib/[email protected]
with:
bazelisk-cache: true
disk-cache: ${{ github.workflow }}
repository-cache: true
- name: Show Bazel version
run: bazel --version
- name: Bazel Build
shell: bash
run: >
bazel build
--cxxopt=${{ matrix.options.flags }} --host_cxxopt=${{ matrix.options.flags }}
--subcommands=pretty_print
--enable_bzlmod
//...
- name: Bazel Test
shell: bash
run: >
bazel test
--cxxopt=${{ matrix.options.flags }} --host_cxxopt=${{ matrix.options.flags }}
--subcommands=pretty_print
--enable_bzlmod
//...