bazel: migrate to bazel module

This commit is contained in:
Corentin Le Molgat
2024-11-15 14:40:16 +01:00
parent 70da7bea86
commit c53053bc62
8 changed files with 190 additions and 407 deletions

View File

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

View File

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