Fix Bazel build (#1024)

This commit is contained in:
Eugene Kliuchnikov 2023-06-22 11:29:08 +02:00 committed by GitHub
parent bfa15d4046
commit 50ebce107f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 18 deletions

View File

@ -33,7 +33,7 @@ jobs:
build_system: cmake
c_compiler: gcc-9
cxx_compiler: g++-9
os: ubuntu-18.04
os: ubuntu-20.04
# TODO: consider running this combination in docker
#- name: cmake:clang3.5
@ -114,12 +114,13 @@ jobs:
# TODO: consider running this combination in docker
#- name: python2.7:gcc5
- name: python27:clang9
build_system: python
c_compiler: clang-9
python_version: 2.7
cxx_compiler: clang++-9
os: ubuntu-18.04
# TODO: consider running this combination in docker
#- name: python27:clang9
# build_system: python
# c_compiler: clang-9
# python_version: 2.7
# cxx_compiler: clang++-9
# os: ubuntu-20.04
# TODO: consider running this combination in docker
#- name: python27-win
@ -202,7 +203,7 @@ jobs:
- name: bazel-win:root
build_system: bazel
bazel_project: .
os: windows-latest
os: windows-2019
# TODO: use single dll on windows, otherwise it fails to link
#- name: bazel-win:go
@ -213,7 +214,7 @@ jobs:
- name: bazel-win:java
build_system: bazel
bazel_project: java
os: windows-latest
os: windows-2019
# TODO: blocked by Bazel Closure rules issue
#- name: bazel-win:js
@ -224,7 +225,7 @@ jobs:
- name: bazel-win:research
build_system: bazel
bazel_project: research
os: windows-latest
os: windows-2019
- name: make
build_system: make
@ -245,7 +246,7 @@ jobs:
steps:
- name: Install extra deps @ Ubuntu
if: ${{ runner.os == 'Linux' }}
# Already installed: bazel, clang{10-12}, cmake, gcc{9,10}, java{8,11}, maven, python{2.7,3.5-3.9}
# Already installed: bazel, clang{10-12}, cmake, gcc{9,10}, java{8,11}, maven, python{3.5-3.9}
run: |
EXTRA_PACKAGES="${{ matrix.extra_apt_pkgs || '' }}"
sudo apt update
@ -293,7 +294,7 @@ jobs:
if: ${{ matrix.build_system == 'bazel' }}
run: |
cd ${GITHUB_WORKSPACE}/${{ matrix.bazel_project }}
bazel build -c opt ...:all
bazelisk build -c opt ...:all
- name: Fix symlinks for Bazel (Windows)
if: ${{ matrix.build_system == 'bazel' && runner.os == 'Windows' && matrix.bazel_project == 'java' }}
@ -337,9 +338,9 @@ jobs:
if: ${{ matrix.build_system == 'bazel' }}
run: |
cd ${GITHUB_WORKSPACE}/${{ matrix.bazel_project }}
bazel query "tests(...)" --output=label > ${RUNNER_TEMP}/tests.lst
[ -s ${RUNNER_TEMP}/tests.lst ] && bazel test -c opt ...:all
bazel clean
bazelisk query "tests(...)" --output=label > ${RUNNER_TEMP}/tests.lst
[ -s ${RUNNER_TEMP}/tests.lst ] && bazelisk test -c opt ...:all
bazelisk clean
- name: Build / Test with Maven
if: ${{ matrix.build_system == 'maven' }}

View File

@ -1,7 +1,7 @@
# Available CMake versions:
# - Ubuntu 18.04 LTS (deprecated on GitHub Actions) : 3.10.4
# - Ubuntu 20.04 LTS : 3.16.3
# - Solaris 11.4 SRU 15 : 3.15
cmake_minimum_required(VERSION 3.10.4)
cmake_minimum_required(VERSION 3.15)
# Since this project's version is loaded from other files, this policy
# will help suppress the warning generated by cmake.