diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index cff3b7d70aee..b108ed263ee1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -21,7 +21,10 @@ jobs: submodules: 'true' - name: Install system packages run: | + # Use libomp 11.1.0: https://github.com/dmlc/xgboost/issues/7039 + wget https://raw.githubusercontent.com/Homebrew/homebrew-core/679923b4eb48a8dc7ecc1f05d06063cd79b3fc00/Formula/libomp.rb -O $(find $(brew --repository) -name libomp.rb) brew install ninja libomp + brew pin libomp - name: Build gtest binary run: | mkdir build @@ -31,9 +34,7 @@ jobs: - name: Run gtest binary run: | cd build - # libomp internal error: - # OMP: Error #131: Thread identifier invalid. - ./testxgboost --gtest_filter="-HistIndexCreationWithExternalMemory.Test" + ./testxgboost ctest -R TestXGBoostCLI --extra-verbose gtest-cpu-nonomp: diff --git a/.github/workflows/python_tests.yml b/.github/workflows/python_tests.yml index 411caa0ef316..f61dc132db66 100644 --- a/.github/workflows/python_tests.yml +++ b/.github/workflows/python_tests.yml @@ -17,7 +17,10 @@ jobs: - name: Install osx system dependencies if: matrix.os == 'macos-10.15' run: | + # Use libomp 11.1.0: https://github.com/dmlc/xgboost/issues/7039 + wget https://raw.githubusercontent.com/Homebrew/homebrew-core/679923b4eb48a8dc7ecc1f05d06063cd79b3fc00/Formula/libomp.rb -O $(find $(brew --repository) -name libomp.rb) brew install ninja libomp + brew pin libomp - name: Install Ubuntu system dependencies if: matrix.os == 'ubuntu-latest' run: | diff --git a/tests/travis/setup.sh b/tests/travis/setup.sh index 42e942d39a20..442f536c251b 100755 --- a/tests/travis/setup.sh +++ b/tests/travis/setup.sh @@ -1,7 +1,11 @@ #!/bin/bash # https://travis-ci.community/t/macos-build-fails-because-of-homebrew-bundle-unknown-command/7296/27 +# Use libomp 11.1.0: https://github.com/dmlc/xgboost/issues/7039 +brew update # Force update, so that update doesn't overwrite our version of libomp.rb +wget https://raw.githubusercontent.com/Homebrew/homebrew-core/679923b4eb48a8dc7ecc1f05d06063cd79b3fc00/Formula/libomp.rb -O $(find $(brew --repository) -name libomp.rb) brew install cmake libomp +brew pin libomp if [ ${TASK} == "python_test" ] || [ ${TASK} == "python_sdist_test" ]; then