[Bazel] fix the python version in .bazelrc; adapt bazel runners

This commit is contained in:
Laurent Perron
2024-11-13 11:53:55 +01:00
parent ad3b6505f8
commit 0871a12b46
5 changed files with 18 additions and 14 deletions

View File

@@ -19,6 +19,10 @@ build --apple_platform_type=macos
# platform.
build --enable_platform_specific_config
# Fix the python version
build --@rules_python//python/config_settings:python_version=3.12
# Per platform parameters.
build:linux --cxxopt="-std=c++17" --cxxopt=-Wno-sign-compare
build:linux --host_cxxopt="-std=c++17" --host_cxxopt=-Wno-sign-compare

View File

@@ -41,12 +41,12 @@ jobs:
sudo apt-get install bazel
- name: Check Bazel
run: bazel version
- name: Change Python in WORKSPACE
- name: Change Python in .bazelrc
run: >
sed
-i
's/\(DEFAULT_PYTHON =\) "3.[0-9]\+"/\1 "${{ matrix.python.version }}"/g'
WORKSPACE
's/3.12/"${{ matrix.python.version }}"/g'
.bazelrc
- name: Build
run: >
bazel build

View File

@@ -34,12 +34,12 @@ jobs:
run: python --version
- name: Check Bazel
run: bazel version
- name: Change Python in WORKSPACE
- name: Change Python in .bazelrc
run: >
sed
-i ''
-e 's/\(DEFAULT_PYTHON =\) "3.[0-9]*"/\1 "${{ matrix.python.version }}"/g'
WORKSPACE
-i
's/3.12/"${{ matrix.python.version }}"/g'
.bazelrc
- name: Build
run: >
bazel build

View File

@@ -10,10 +10,10 @@ jobs:
matrix:
runner: [windows-2022]
python: [
{version: '3.10'},
{version: '3.11'},
# {version: '3.10'},
# {version: '3.11'},
{version: '3.12'},
{version: '3.13'},
# {version: '3.13'},
]
fail-fast: false # Don't cancel all jobs if one fails.
name: ${{ matrix.runner }} • Bazel • Python-${{ matrix.python.version }}

View File

@@ -34,12 +34,12 @@ jobs:
run: python --version
- name: Check Bazel
run: bazel version
- name: Change Python in WORKSPACE
- name: Change Python in .bazelrc
run: >
sed
-i ''
-e 's/\(DEFAULT_PYTHON =\) "3.[0-9]*"/\1 "${{ matrix.python.version }}"/g'
WORKSPACE
-i
's/3.12/"${{ matrix.python.version }}"/g'
.bazelrc
- name: Build
run: >
bazel build