Skip to content

Commit 83ad438

Browse files
added the support for macos
1 parent 56bb2b9 commit 83ad438

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

.github/workflows/cmake-multi-platform.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
#
2727
# To add more build types (Release, Debug, RelWithDebInfo, etc.) customize the build_type list.
2828
matrix:
29-
os: [ubuntu-latest]
29+
os: [ubuntu-latest, macos-latest]
3030
build_type: [Release]
3131
c_compiler: [clang]
3232
# All [OS x compiler] items should be covered in include/exclude sections.
@@ -35,6 +35,10 @@ jobs:
3535
c_compiler: clang
3636
cpp_compiler: clang++
3737

38+
- os: macos-latest
39+
c_compiler: clang
40+
cpp_compiler: clang++
41+
3842
steps:
3943
- uses: actions/checkout@v4
4044
with:
@@ -47,6 +51,17 @@ jobs:
4751
run: |
4852
echo "project-root-dir=${{ github.workspace }}/inflection" >> "$GITHUB_OUTPUT"
4953
echo "build-output-dir=${{ github.workspace }}/inflection/build" >> "$GITHUB_OUTPUT"
54+
55+
# Install all the required dependencies for the macos
56+
- name: Install ICU (Ubuntu/macos)
57+
run: |
58+
if [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then
59+
sudo apt-get update && sudo apt-get install -y libicu-dev icu-devtools
60+
echo "ICU_ROOT=/usr" >> $GITHUB_ENV
61+
elif [[ "${{ matrix.os }}" == "macos-latest" ]]; then
62+
brew list icu4c || brew install icu4c
63+
echo "ICU_ROOT=$(brew --prefix icu4c)" >> $GITHUB_ENV
64+
fi
5065
5166
- name: Configure CMake
5267
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.

0 commit comments

Comments
 (0)