Skip to content

Commit 104cfe6

Browse files
committed
ci: update workflows
1 parent 88f31e7 commit 104cfe6

File tree

4 files changed

+72
-96
lines changed

4 files changed

+72
-96
lines changed

.github/workflows/amd64_linux_bazel.yml

Lines changed: 18 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,27 @@ name: amd64 Linux Bazel
33

44
on: [push, pull_request, workflow_dispatch]
55

6+
concurrency:
7+
group: ${{github.workflow}}-${{github.ref}}
8+
cancel-in-progress: true
9+
610
# Building using the github runner environement directly.
711
jobs:
812
native:
913
strategy:
1014
matrix:
11-
bazel: [
12-
{compilation_mode: opt},
13-
{compilation_mode: dbg},
14-
]
15+
examples: [{name: basic}, {name: embed}]
1516
cpp: [
16-
{version: 14, flags: "-std=c++14"},
17+
#{version: 14, flags: "-std=c++14"},
1718
{version: 17, flags: "-std=c++17"},
1819
{version: 20, flags: "-std=c++20"},
1920
]
2021
python: [
2122
{version: '3.11'},
23+
{version: '3.12'},
2224
]
23-
exclude:
24-
# only test `-c dbg` build with C++17
25-
- cpp: {version: 14}
26-
bazel: {compilation_mode: dbg}
27-
- cpp: {version: 20}
28-
bazel: {compilation_mode: dbg}
2925
fail-fast: false
30-
name: Linux•Bazel(${{ matrix.bazel.compilation_mode }})•C++${{ matrix.cpp.version }}•Python${{ matrix.python.version }}
26+
name: Linux•Bzl•C++${{matrix.cpp.version}}•Py${{matrix.python.version}}•${{matrix.examples.name}}
3127
runs-on: ubuntu-latest
3228
steps:
3329
- uses: actions/checkout@v5
@@ -36,35 +32,35 @@ jobs:
3632
- name: Setup Python
3733
uses: actions/setup-python@v6
3834
with:
39-
python-version: ${{ matrix.python.version }}
35+
python-version: ${{matrix.python.version}}
4036
- name: Check Python
4137
run: |
4238
python --version
4339
python -m platform
4440
- uses: bazel-contrib/[email protected]
4541
with:
4642
bazelisk-cache: true
47-
disk-cache: ${{ github.workflow }}
43+
disk-cache: ${{github.workflow}}
4844
repository-cache: true
4945
- name: Check Bazel
5046
run: bazel version
5147
- name: Build
5248
run: >
53-
cd examples/basic &&
49+
cd examples/${{matrix.examples.name}} &&
5450
bazel build
55-
-c ${{ matrix.bazel.compilation_mode }}
56-
--cxxopt=${{ matrix.cpp.flags }} --host_cxxopt=${{ matrix.cpp.flags }}
51+
--config=ci
52+
--@rules_python//python/config_settings:python_version=${{matrix.python.version}}
53+
--cxxopt=${{matrix.cpp.flags}} --host_cxxopt=${{ matrix.cpp.flags }}
5754
--subcommands=pretty_print
58-
--enable_bzlmod
5955
//...
6056
- name: Test
6157
run: >
62-
cd examples/basic &&
58+
cd examples/${{matrix.examples.name}} &&
6359
bazel test
64-
-c ${{ matrix.bazel.compilation_mode }}
65-
--cxxopt=${{ matrix.cpp.flags }} --host_cxxopt=${{ matrix.cpp.flags }}
60+
--config=ci
61+
--@rules_python//python/config_settings:python_version=${{matrix.python.version}}
62+
--cxxopt=${{matrix.cpp.flags}} --host_cxxopt=${{ matrix.cpp.flags }}
6663
--subcommands=pretty_print
67-
--enable_bzlmod
6864
//...
6965
7066
amd64_linux_bazel:

.github/workflows/amd64_macos_bazel.yml

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,27 @@ name: amd64 MacOS Bazel
33

44
on: [push, pull_request, workflow_dispatch]
55

6+
concurrency:
7+
group: ${{github.workflow}}-${{github.ref}}
8+
cancel-in-progress: true
9+
610
# Building using the github runner environement directly.
711
jobs:
812
native:
913
strategy:
1014
matrix:
11-
bazel: [
12-
{compilation_mode: opt},
13-
{compilation_mode: dbg},
14-
]
15+
examples: [{name: basic}, {name: embed}]
1516
cpp: [
1617
#{version: 14, flags: "-std=c++14"},
1718
{version: 17, flags: "-std=c++17"},
18-
#{version: 20, flags: "-std=c++20"},
19+
{version: 20, flags: "-std=c++20"},
1920
]
2021
python: [
2122
{version: '3.11'},
23+
{version: '3.12'},
2224
]
23-
exclude:
24-
# only test `-c dbg` build with C++17
25-
- cpp: {version: 14}
26-
bazel: {compilation_mode: dbg}
27-
- cpp: {version: 20}
28-
bazel: {compilation_mode: dbg}
2925
fail-fast: false
30-
name: MacOS•Bazel(${{ matrix.bazel.compilation_mode }})•C++${{ matrix.cpp.version }}•Python${{ matrix.python.version }}
26+
name: MacOS•Bzl•C++${{matrix.cpp.version}}•Py${{matrix.python.version}}•${{matrix.examples.name}}
3127
runs-on: macos-13 # last macos intel based runner
3228
steps:
3329
- uses: actions/checkout@v5
@@ -39,7 +35,7 @@ jobs:
3935
- name: Setup Python
4036
uses: actions/setup-python@v6
4137
with:
42-
python-version: ${{ matrix.python.version }}
38+
python-version: ${{matrix.python.version}}
4339
- name: Check Python
4440
run: |
4541
python --version
@@ -48,21 +44,21 @@ jobs:
4844
run: bazel version
4945
- name: Build
5046
run: >
51-
cd examples/basic &&
47+
cd examples/${{matrix.examples.name}} &&
5248
bazel build
53-
-c ${{ matrix.bazel.compilation_mode }}
54-
--cxxopt=${{ matrix.cpp.flags }} --host_cxxopt=${{ matrix.cpp.flags }}
49+
--config=ci
50+
--@rules_python//python/config_settings:python_version=${{matrix.python.version}}
51+
--cxxopt=${{matrix.cpp.flags}} --host_cxxopt=${{ matrix.cpp.flags }}
5552
--subcommands=pretty_print
56-
--enable_bzlmod
5753
//...
5854
- name: Test
5955
run: >
60-
cd examples/basic &&
56+
cd examples/${{matrix.examples.name}} &&
6157
bazel test
62-
-c ${{ matrix.bazel.compilation_mode }}
63-
--cxxopt=${{ matrix.cpp.flags }} --host_cxxopt=${{ matrix.cpp.flags }}
58+
--config=ci
59+
--@rules_python//python/config_settings:python_version=${{matrix.python.version}}
60+
--cxxopt=${{matrix.cpp.flags}} --host_cxxopt=${{ matrix.cpp.flags }}
6461
--subcommands=pretty_print
65-
--enable_bzlmod
6662
//...
6763
6864
amd64_macos_bazel:

.github/workflows/amd64_windows_bazel.yml

Lines changed: 20 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -3,46 +3,34 @@ name: amd64 Windows Bazel
33

44
on: [push, pull_request, workflow_dispatch]
55

6+
concurrency:
7+
group: ${{github.workflow}}-${{github.ref}}
8+
cancel-in-progress: true
9+
610
# Building using the github runner environement directly.
711
jobs:
812
native:
913
strategy:
1014
matrix:
11-
runner: [
12-
windows-2022,
13-
#windows-2019,
14-
]
15-
bazel: [
16-
{compilation_mode: opt},
17-
{compilation_mode: dbg},
18-
]
15+
examples: [{name: basic}, {name: embed}]
1916
cpp: [
20-
{version: 14, flags: "/std:c++14"},
17+
#{version: 14, flags: "/std:c++14"},
2118
{version: 17, flags: "/std:c++17"},
22-
#{version: 20, flags: "/std:c++20"},
19+
{version: 20, flags: "/std:c++20"},
2320
]
2421
python: [
2522
{version: '3.11'},
23+
{version: '3.12'},
2624
]
27-
exclude:
28-
- runner: windows-2019
29-
cpp: {version: 20}
30-
# only test -c dbg with VS 2022 version 17 to save compute time
31-
- runner: windows-2019
32-
bazel: {compilation_mode: dbg}
33-
- cpp: {version: 14}
34-
bazel: {compilation_mode: dbg}
35-
- cpp: {version: 20}
36-
bazel: {compilation_mode: dbg}
37-
fail-fast: false # Don't cancel all jobs if one fails.
38-
name: ${{ matrix.runner }}•Bazel(${{ matrix.bazel.compilation_mode }})•C++${{ matrix.cpp.version }}•Python${{ matrix.python.version }}
39-
runs-on: ${{ matrix.runner }}
25+
fail-fast: false
26+
name: Windows•Bzl•C++${{matrix.cpp.version}}•Py${{matrix.python.version}}•${{matrix.examples.name}}
27+
runs-on: windows-2022
4028
steps:
4129
- uses: actions/checkout@v5
4230
- name: Setup Python
4331
uses: actions/setup-python@v6
4432
with:
45-
python-version: ${{ matrix.python.version }}
33+
python-version: ${{matrix.python.version}}
4634
- name: Check Python
4735
run: |
4836
python --version
@@ -53,21 +41,21 @@ jobs:
5341
run: bazel version
5442
- name: Build
5543
run: >
56-
cd examples/basic &&
44+
cd examples/${{matrix.examples.name}} &&
5745
bazel build
58-
-c ${{ matrix.bazel.compilation_mode }}
59-
--cxxopt=${{ matrix.cpp.flags }} --host_cxxopt=${{ matrix.cpp.flags }}
46+
--config=ci
47+
--@rules_python//python/config_settings:python_version=${{matrix.python.version}}
48+
--cxxopt=${{matrix.cpp.flags}} --host_cxxopt=${{ matrix.cpp.flags }}
6049
--subcommands=pretty_print
61-
--enable_bzlmod
6250
//...
6351
- name: Test
6452
run: >
65-
cd examples/basic &&
53+
cd examples/${{matrix.examples.name}} &&
6654
bazel test
67-
-c ${{ matrix.bazel.compilation_mode }}
68-
--cxxopt=${{ matrix.cpp.flags }} --host_cxxopt=${{ matrix.cpp.flags }}
55+
--config=ci
56+
--@rules_python//python/config_settings:python_version=${{matrix.python.version}}
57+
--cxxopt=${{matrix.cpp.flags}} --host_cxxopt=${{ matrix.cpp.flags }}
6958
--subcommands=pretty_print
70-
--enable_bzlmod
7159
//...
7260
7361
amd64_windows_bazel:

.github/workflows/arm64_macos_bazel.yml

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,27 @@ name: arm64 MacOS Bazel
33

44
on: [push, pull_request, workflow_dispatch]
55

6+
concurrency:
7+
group: ${{github.workflow}}-${{github.ref}}
8+
cancel-in-progress: true
9+
610
# Building using the github runner environement directly.
711
jobs:
812
native:
913
strategy:
1014
matrix:
11-
bazel: [
12-
{compilation_mode: opt},
13-
{compilation_mode: dbg},
14-
]
15+
examples: [{name: basic}, {name: embed}]
1516
cpp: [
1617
#{version: 14, flags: "-std=c++14"},
1718
{version: 17, flags: "-std=c++17"},
18-
#{version: 20, flags: "-std=c++20"},
19+
{version: 20, flags: "-std=c++20"},
1920
]
2021
python: [
2122
{version: '3.11'},
23+
{version: '3.12'},
2224
]
23-
exclude:
24-
# only test `-c dbg` build with C++17
25-
- cpp: {version: 14}
26-
bazel: {compilation_mode: dbg}
27-
- cpp: {version: 20}
28-
bazel: {compilation_mode: dbg}
2925
fail-fast: false
30-
name: MacOS•Bazel(${{ matrix.bazel.compilation_mode }})•C++${{ matrix.cpp.version }}•Python${{ matrix.python.version }}
26+
name: MacOS•Bzl•C++${{matrix.cpp.version}}•Py${{matrix.python.version}}•${{matrix.examples.name}}
3127
runs-on: macos-latest
3228
steps:
3329
- uses: actions/checkout@v5
@@ -39,7 +35,7 @@ jobs:
3935
- name: Setup Python
4036
uses: actions/setup-python@v6
4137
with:
42-
python-version: ${{ matrix.python.version }}
38+
python-version: ${{matrix.python.version}}
4339
- name: Check Python
4440
run: |
4541
python --version
@@ -48,21 +44,21 @@ jobs:
4844
run: bazel version
4945
- name: Build
5046
run: >
51-
cd examples/basic &&
47+
cd examples/${{matrix.examples.name}} &&
5248
bazel build
53-
-c ${{ matrix.bazel.compilation_mode }}
54-
--cxxopt=${{ matrix.cpp.flags }} --host_cxxopt=${{ matrix.cpp.flags }}
49+
--config=ci
50+
--@rules_python//python/config_settings:python_version=${{matrix.python.version}}
51+
--cxxopt=${{matrix.cpp.flags}} --host_cxxopt=${{ matrix.cpp.flags }}
5552
--subcommands=pretty_print
56-
--enable_bzlmod
5753
//...
5854
- name: Test
5955
run: >
60-
cd examples/basic &&
56+
cd examples/${{matrix.examples.name}} &&
6157
bazel test
62-
-c ${{ matrix.bazel.compilation_mode }}
63-
--cxxopt=${{ matrix.cpp.flags }} --host_cxxopt=${{ matrix.cpp.flags }}
58+
--config=ci
59+
--@rules_python//python/config_settings:python_version=${{matrix.python.version}}
60+
--cxxopt=${{matrix.cpp.flags}} --host_cxxopt=${{ matrix.cpp.flags }}
6461
--subcommands=pretty_print
65-
--enable_bzlmod
6662
//...
6763
6864
arm64_macos_bazel:

0 commit comments

Comments
 (0)