Skip to content

Commit

Permalink
Fix Bazel build (#1024)
Browse files Browse the repository at this point in the history
  • Loading branch information
eustas committed Jun 22, 2023
1 parent bfa15d4 commit 50ebce1
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 18 deletions.
31 changes: 16 additions & 15 deletions .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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' }}
Expand Down Expand Up @@ -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' }}
Expand Down
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Available CMake versions:
# - Ubuntu 18.04 LTS (deprecated on GitHub Actions) : 3.10.4
# - Solaris 11.4 SRU 15 : 3.15
cmake_minimum_required(VERSION 3.10.4)
# - Ubuntu 20.04 LTS : 3.16.3
# - Solaris 11.4 SRU 15 : 3.15
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.
Expand Down

0 comments on commit 50ebce1

Please sign in to comment.