Skip to content

Commit

Permalink
πŸ’š Add macos build in ci
Browse files Browse the repository at this point in the history
  • Loading branch information
yhs0602 committed Jan 7, 2025
1 parent ec82240 commit cdbddba
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 3 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/cmake-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
#
# To add more build types (Release, Debug, RelWithDebInfo, etc.) customize the build_type list.
matrix:
os: [ubuntu-latest, windows-latest]
os: [ubuntu-latest, macos-latest, windows-latest]
build_type: [Release]
c_compiler: [gcc, clang, cl]
include:
Expand All @@ -49,6 +49,14 @@ jobs:
with:
submodules: true

- name: install pytorch headers if macos # export CMAKE_PREFIX_PATH=$LIBTORCH
if: matrix.os == 'macos-latest'
run: |
curl -LO https://download.pytorch.org/libtorch/cpu/libtorch-macos-arm64-2.5.1.zip
unzip libtorch-macos-arm64-2.5.1.zip
export LIBTORCH=/usr/local/libtorch
sudo mv libtorch $LIBTORCH
- name: Set reusable strings
# Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file.
id: strings
Expand Down
19 changes: 17 additions & 2 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
#
# To add more build types (Release, Debug, RelWithDebInfo, etc.) customize the build_type list.
matrix:
os: [ubuntu-latest, windows-latest]
os: [ubuntu-latest, macos-latest, windows-latest]
build_type: [Release]
c_compiler: [gcc, clang, cl]
include:
Expand All @@ -40,13 +40,21 @@ jobs:
- os: ubuntu-latest
c_compiler: clang
cpp_compiler: clang++
- os: macos-latest
c_compiler: clang
cpp_compiler: clang++
- os: macos-latest
c_compiler: gcc
cpp_compiler: g++
exclude:
- os: windows-latest
c_compiler: gcc
- os: windows-latest
c_compiler: clang
- os: ubuntu-latest
c_compiler: cl
- os: macos-latest
c_compiler: cl
permissions:
contents: read

Expand All @@ -57,7 +65,14 @@ jobs:
with:
java-version: '21'
distribution: 'temurin'


- name: install pytorch headers if macos # export CMAKE_PREFIX_PATH=$LIBTORCH
if: matrix.os == 'macos-latest'
run: |
curl -LO https://download.pytorch.org/libtorch/cpu/libtorch-macos-arm64-2.5.1.zip
unzip libtorch-macos-arm64-2.5.1.zip
export LIBTORCH=/usr/local/libtorch
sudo mv libtorch $LIBTORCH
# Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies.
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
- name: Setup Gradle 8.8
Expand Down

0 comments on commit cdbddba

Please sign in to comment.