Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,20 +49,18 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
os: [ubuntu-latest, windows-latest, macos-latest, macos-14]

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- if: runner.os == 'macOS'
run: brew install openblas
run: sudo bash build_utils/build_libomp.sh

- name: Build wheels
uses: pypa/cibuildwheel@v2.16.5
env:
OPENBLAS: "$(brew --prefix openblas)"

- uses: actions/upload-artifact@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion build_utils/build_libomp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
build_dir=${DIR}/libs_build

git clone --depth 1 --branch llvmorg-11.1.0 https://github.com/llvm/llvm-project
git clone --depth 1 --branch llvmorg-17.0.6 https://github.com/llvm/llvm-project
pushd llvm-project/openmp
mkdir build
cd build
Comment on lines 2 to 8
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 NOTE
This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [5-14]

Consider adding error handling for the commands used in this script. For instance, checking the exit status of git clone, cmake, and make commands can prevent proceeding with the script when an error occurs, enhancing the robustness of the build process.

+ set -e

Adding set -e at the beginning of the script will cause the script to exit immediately if a command exits with a non-zero status.


📝 NOTE
This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [5-14]

It's good practice to check if the required tools (git, cmake, clang, make) are available before proceeding with the build process. This can be done by adding simple checks at the beginning of the script.

+ command -v git >/dev/null 2>&1 || { echo >&2 "git is required but it's not installed.  Aborting."; exit 1; }
+ command -v cmake >/dev/null 2>&1 || { echo >&2 "cmake is required but it's not installed.  Aborting."; exit 1; }
+ command -v clang >/dev/null 2>&1 || { echo >&2 "clang is required but it's not installed.  Aborting."; exit 1; }
+ command -v make >/dev/null 2>&1 || { echo >&2 "make is required but it's not installed.  Aborting."; exit 1; }

Adding these checks ensures that the script only proceeds if all necessary tools are installed, preventing potential build failures and providing clear error messages to the user.

Expand Down