Skip to content

Commit 4a2eaf5

Browse files
committed
ci: Add arm64 macos jobs
1 parent 8f21377 commit 4a2eaf5

7 files changed

+315
-20
lines changed
+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# ref: https://github.com/actions/runner-images
2+
name: arm64 MacOS Bazel
3+
4+
on: [push, pull_request, workflow_dispatch]
5+
6+
# Building using the github runner environement directly.
7+
jobs:
8+
native:
9+
strategy:
10+
matrix:
11+
python: [
12+
{version: '3.9'},
13+
{version: '3.10'},
14+
{version: '3.11'},
15+
{version: '3.12'},
16+
]
17+
fail-fast: false
18+
name: MacOS • Bazel • Python-${{ matrix.python.version }}
19+
runs-on: macos-latest # macos arm64 based runner
20+
steps:
21+
- uses: actions/checkout@v4
22+
- name: Set Java to OpenJDK 17 (Temurin)
23+
uses: actions/setup-java@v3
24+
with:
25+
distribution: 'temurin'
26+
java-version: '17'
27+
- name: Check mvn
28+
run: mvn --version
29+
- name: Setup Python
30+
uses: actions/setup-python@v4
31+
with:
32+
python-version: ${{ matrix.python.version }}
33+
- name: Check Python
34+
run: python --version
35+
- name: Check Bazel
36+
run: bazel version
37+
- name: Change Python in WORKSPACE
38+
run: >
39+
sed
40+
-i ''
41+
-e 's/\(DEFAULT_PYTHON =\) "3.[0-9]*"/\1 "${{ matrix.python.version }}"/g'
42+
WORKSPACE
43+
- name: Build
44+
run: >
45+
bazel build
46+
-c opt
47+
--subcommands=pretty_print
48+
//ortools/... //examples/...
49+
- name: Test
50+
run: >
51+
bazel test
52+
-c opt
53+
--test_output=errors
54+
//ortools/... //examples/...
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# ref: https://github.com/actions/runner-images
2+
name: arm64 MacOS CMake C++
3+
4+
on: [push, pull_request, workflow_dispatch]
5+
6+
# Building using the github runner environement directly.
7+
jobs:
8+
native:
9+
strategy:
10+
matrix:
11+
cmake: [
12+
{generator: "Xcode", config: Release, build_target: ALL_BUILD, test_target: RUN_TESTS, install_target: install},
13+
{generator: "Unix Makefiles", config: Release, build_target: all, test_target: test, install_target: install},
14+
]
15+
fail-fast: false
16+
name: MacOS • ${{ matrix.cmake.generator }} • C++
17+
runs-on: macos-latest # macos arm64 based runner
18+
steps:
19+
- uses: actions/checkout@v4
20+
- name: Check cmake
21+
run: cmake --version
22+
- name: Configure
23+
run: >
24+
cmake -S. -Bbuild
25+
-G "${{ matrix.cmake.generator }}"
26+
-DCMAKE_BUILD_TYPE=${{ matrix.cmake.config }}
27+
-DBUILD_DEPS=ON
28+
-DCMAKE_INSTALL_PREFIX=install
29+
- name: Build
30+
run: >
31+
cmake --build build
32+
--config ${{ matrix.cmake.config }}
33+
--target ${{ matrix.cmake.build_target }}
34+
-v -j2
35+
- name: Test
36+
run: >
37+
CTEST_OUTPUT_ON_FAILURE=1
38+
cmake --build build
39+
--config ${{ matrix.cmake.config }}
40+
--target ${{ matrix.cmake.test_target }}
41+
-v
42+
- name: Install
43+
run: >
44+
cmake --build build
45+
--config ${{ matrix.cmake.config }}
46+
--target ${{ matrix.cmake.install_target }}
47+
-v
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# ref: https://github.com/actions/runner-images
2+
name: arm64 MacOS CMake .Net
3+
4+
on: [push, pull_request, workflow_dispatch]
5+
6+
# Building using the github runner environement directly.
7+
jobs:
8+
native:
9+
strategy:
10+
matrix:
11+
cmake: [
12+
{generator: "Xcode", config: Release, build_target: ALL_BUILD, test_target: RUN_TESTS, install_target: install},
13+
{generator: "Unix Makefiles", config: Release, build_target: all, test_target: test, install_target: install},
14+
]
15+
fail-fast: false
16+
name: MacOS • ${{ matrix.cmake.generator }} • .Net
17+
runs-on: macos-latest # macos arm64 based runner
18+
steps:
19+
- uses: actions/checkout@v4
20+
- name: Swig install
21+
run: |
22+
brew install swig
23+
swig -version
24+
- name: Setup .NET 6.0
25+
uses: actions/setup-dotnet@v4
26+
with:
27+
dotnet-version: 6.0.x
28+
- name: Check dotnet
29+
run: dotnet --info
30+
- name: Check cmake
31+
run: cmake --version
32+
- name: Configure
33+
run: >
34+
cmake -S. -Bbuild
35+
-G "${{ matrix.cmake.generator }}"
36+
-DCMAKE_BUILD_TYPE=${{ matrix.cmake.config }}
37+
-DBUILD_CXX_SAMPLES=OFF -DBUILD_CXX_EXAMPLES=OFF
38+
-DBUILD_DOTNET=ON
39+
-DCMAKE_INSTALL_PREFIX=install
40+
- name: Build
41+
run: >
42+
cmake --build build
43+
--config ${{ matrix.cmake.config }}
44+
--target ${{ matrix.cmake.build_target }}
45+
-v -j2
46+
- name: Test
47+
run: >
48+
CTEST_OUTPUT_ON_FAILURE=1
49+
cmake --build build
50+
--config ${{ matrix.cmake.config }}
51+
--target ${{ matrix.cmake.test_target }}
52+
-v
53+
- name: Install
54+
run: >
55+
cmake --build build
56+
--config ${{ matrix.cmake.config }}
57+
--target ${{ matrix.cmake.install_target }}
58+
-v
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# ref: https://github.com/actions/runner-images
2+
name: arm64 MacOS CMake Java
3+
4+
on: [push, pull_request, workflow_dispatch]
5+
6+
# Building using the github runner environement directly.
7+
jobs:
8+
native:
9+
strategy:
10+
matrix:
11+
cmake: [
12+
{generator: "Xcode", config: Release, build_target: ALL_BUILD, test_target: RUN_TESTS, install_target: install},
13+
{generator: "Unix Makefiles", config: Release, build_target: all, test_target: test, install_target: install},
14+
]
15+
fail-fast: false
16+
name: MacOS • ${{ matrix.cmake.generator }} • Java
17+
runs-on: macos-latest # macos arm64 based runner
18+
steps:
19+
- uses: actions/checkout@v4
20+
- name: Swig install
21+
run: |
22+
brew install swig
23+
swig -version
24+
- name: Check java
25+
run: java -version
26+
- name: Check cmake
27+
run: cmake --version
28+
- name: Configure
29+
run: >
30+
cmake -S. -Bbuild
31+
-G "${{ matrix.cmake.generator }}"
32+
-DCMAKE_BUILD_TYPE=${{ matrix.cmake.config }}
33+
-DBUILD_CXX_SAMPLES=OFF -DBUILD_CXX_EXAMPLES=OFF
34+
-DBUILD_JAVA=ON -DSKIP_GPG=ON
35+
-DCMAKE_INSTALL_PREFIX=install
36+
- name: Build
37+
run: >
38+
cmake --build build
39+
--config ${{ matrix.cmake.config }}
40+
--target ${{ matrix.cmake.build_target }}
41+
-v -j2
42+
- name: Test
43+
run: >
44+
CTEST_OUTPUT_ON_FAILURE=1
45+
cmake --build build
46+
--config ${{ matrix.cmake.config }}
47+
--target ${{ matrix.cmake.test_target }}
48+
-v
49+
- name: Install
50+
run: >
51+
cmake --build build
52+
--config ${{ matrix.cmake.config }}
53+
--target ${{ matrix.cmake.install_target }}
54+
-v
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# ref: https://github.com/actions/runner-images
2+
name: arm64 MacOS CMake Python
3+
4+
on: [push, pull_request, workflow_dispatch]
5+
6+
# Building using the github runner environement directly.
7+
jobs:
8+
native:
9+
strategy:
10+
matrix:
11+
cmake: [
12+
{generator: "Xcode", config: Release, build_target: ALL_BUILD, test_target: RUN_TESTS, install_target: install},
13+
{generator: "Unix Makefiles", config: Release, build_target: all, test_target: test, install_target: install},
14+
]
15+
python: [
16+
{version: "3.9"},
17+
{version: "3.10"},
18+
{version: "3.11"},
19+
{version: "3.12"}
20+
]
21+
fail-fast: false
22+
name: MacOS • ${{ matrix.cmake.generator }} • Python-${{ matrix.python.version }}
23+
runs-on: macos-latest # macos arm64 based runner
24+
steps:
25+
- uses: actions/checkout@v4
26+
- name: Swig install
27+
run: |
28+
brew install swig
29+
swig -version
30+
- name: Setup Python
31+
uses: actions/setup-python@v4
32+
with:
33+
python-version: ${{ matrix.python.version }}
34+
- name: Update Path
35+
run: |
36+
echo "$HOME/Library/Python/${{ matrix.python.version }}/bin" >> $GITHUB_PATH
37+
echo "$HOME/.local/bin" >> $GITHUB_PATH
38+
- name: Check cmake
39+
run: cmake --version
40+
- name: Configure
41+
run: >
42+
cmake -S. -Bbuild
43+
-G "${{ matrix.cmake.generator }}"
44+
-DCMAKE_BUILD_TYPE=${{ matrix.cmake.config }}
45+
-DBUILD_CXX_SAMPLES=OFF -DBUILD_CXX_EXAMPLES=OFF
46+
-DBUILD_PYTHON=ON
47+
-DCMAKE_INSTALL_PREFIX=install
48+
- name: Build
49+
run: >
50+
cmake --build build
51+
--config ${{ matrix.cmake.config }}
52+
--target ${{ matrix.cmake.build_target }}
53+
-v -j2
54+
- name: Test
55+
run: >
56+
CTEST_OUTPUT_ON_FAILURE=1
57+
cmake --build build
58+
--config ${{ matrix.cmake.config }}
59+
--target ${{ matrix.cmake.test_target }}
60+
-v
61+
- name: Install
62+
run: >
63+
cmake --build build
64+
--config ${{ matrix.cmake.config }}
65+
--target ${{ matrix.cmake.install_target }}
66+
-v

bazel/README.md

+13-7
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
# OR-Tools Bazel Build Instructions
2-
| OS | C++ |
3-
|:-------- | :---: |
4-
| Linux | [![Status][linux_svg]][linux_link] |
5-
| MacOS | [![Status][macos_svg]][macos_link] |
6-
| Windows | [![Status][windows_svg]][windows_link] |
2+
| OS | C++ |
3+
|:---- | :---: |
4+
| amd64 Linux | [![Status][linux_svg]][linux_link] |
5+
| arm64 MacOS | [![Status][arm64_macos_svg]][arm64_macos_link] |
6+
| amd64 MacOS | [![Status][amd64_macos_svg]][amd64_macos_link] |
7+
| amd64 Windows | [![Status][windows_svg]][windows_link] |
78

89
[linux_svg]: ./../../../actions/workflows/amd64_linux_bazel.yml/badge.svg?branch=main
910
[linux_link]: ./../../../actions/workflows/amd64_linux_bazel.yml
10-
[macos_svg]: ./../../../actions/workflows/amd64_macos_bazel.yml/badge.svg?branch=main
11-
[macos_link]: ./../../../actions/workflows/amd64_macos_bazel.yml
11+
12+
[arm64_macos_svg]: ./../../../actions/workflows/arm64_macos_bazel.yml/badge.svg?branch=main
13+
[arm64_macos_link]: ./../../../actions/workflows/arm64_macos_bazel.yml
14+
15+
[amd64_macos_svg]: ./../../../actions/workflows/amd64_macos_bazel.yml/badge.svg?branch=main
16+
[amd64_macos_link]: ./../../../actions/workflows/amd64_macos_bazel.yml
17+
1218
[windows_svg]: ./../../../actions/workflows/amd64_windows_bazel.yml/badge.svg?branch=main
1319
[windows_link]: ./../../../actions/workflows/amd64_windows_bazel.yml
1420

cmake/README.md

+23-13
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
# OR-Tools CMake Build Instructions
22

3-
| OS | C++ | Python | Java | .NET |
4-
|:-------- | :---: | :------: | :----: | :----: |
5-
| Linux | [![Status][linux_cpp_svg]][linux_cpp_link] | [![Status][linux_python_svg]][linux_python_link] | [![Status][linux_java_svg]][linux_java_link] | [![Status][linux_dotnet_svg]][linux_dotnet_link] |
6-
| MacOS | [![Status][macos_cpp_svg]][macos_cpp_link] | [![Status][macos_python_svg]][macos_python_link] | [![Status][macos_java_svg]][macos_java_link] | [![Status][macos_dotnet_svg]][macos_dotnet_link] |
7-
| Windows | [![Status][windows_cpp_svg]][windows_cpp_link] | [![Status][windows_python_svg]][windows_python_link] | [![Status][windows_java_svg]][windows_java_link] | [![Status][windows_dotnet_svg]][windows_dotnet_link] |
3+
| OS | C++ | Python | Java | .NET |
4+
|:---- | :---: | :------: | :----: | :----: |
5+
| amd64 Linux | [![Status][linux_cpp_svg]][linux_cpp_link] | [![Status][linux_python_svg]][linux_python_link] | [![Status][linux_java_svg]][linux_java_link] | [![Status][linux_dotnet_svg]][linux_dotnet_link] |
6+
| arm64 MacOS | [![Status][arm64_macos_cpp_svg]][arm64_macos_cpp_link] | [![Status][arm64_macos_python_svg]][arm64_macos_python_link] | [![Status][arm64_macos_java_svg]][arm64_macos_java_link] | [![Status][arm64_macos_dotnet_svg]][arm64_macos_dotnet_link] |
7+
| amd64 MacOS | [![Status][amd64_macos_cpp_svg]][amd64_macos_cpp_link] | [![Status][amd64_macos_python_svg]][amd64_macos_python_link] | [![Status][amd64_macos_java_svg]][amd64_macos_java_link] | [![Status][amd64_macos_dotnet_svg]][amd64_macos_dotnet_link] |
8+
| amd64 Windows | [![Status][windows_cpp_svg]][windows_cpp_link] | [![Status][windows_python_svg]][windows_python_link] | [![Status][windows_java_svg]][windows_java_link] | [![Status][windows_dotnet_svg]][windows_dotnet_link] |
89

910
[linux_cpp_svg]: ./../../../actions/workflows/amd64_linux_cmake_cpp.yml/badge.svg?branch=main
1011
[linux_cpp_link]: ./../../../actions/workflows/amd64_linux_cmake_cpp.yml
@@ -15,14 +16,23 @@
1516
[linux_dotnet_svg]: ./../../../actions/workflows/amd64_linux_cmake_dotnet.yml/badge.svg?branch=main
1617
[linux_dotnet_link]: ./../../../actions/workflows/amd64_linux_cmake_dotnet.yml
1718

18-
[macos_cpp_svg]: ./../../../actions/workflows/amd64_macos_cmake_cpp.yml/badge.svg?branch=main
19-
[macos_cpp_link]: ./../../../actions/workflows/amd64_macos_cmake_cpp.yml
20-
[macos_python_svg]: ./../../../actions/workflows/amd64_macos_cmake_python.yml/badge.svg?branch=main
21-
[macos_python_link]: ./../../../actions/workflows/amd64_macos_cmake_python.yml
22-
[macos_java_svg]: ./../../../actions/workflows/amd64_macos_cmake_java.yml/badge.svg?branch=main
23-
[macos_java_link]: ./../../../actions/workflows/amd64_macos_cmake_java.yml
24-
[macos_dotnet_svg]: ./../../../actions/workflows/amd64_macos_cmake_dotnet.yml/badge.svg?branch=main
25-
[macos_dotnet_link]: ./../../../actions/workflows/amd64_macos_cmake_dotnet.yml
19+
[arm64_macos_cpp_svg]: ./../../../actions/workflows/arm64_macos_cmake_cpp.yml/badge.svg?branch=main
20+
[arm64_macos_cpp_link]: ./../../../actions/workflows/arm64_macos_cmake_cpp.yml
21+
[arm64_macos_python_svg]: ./../../../actions/workflows/arm64_macos_cmake_python.yml/badge.svg?branch=main
22+
[arm64_macos_python_link]: ./../../../actions/workflows/arm64_macos_cmake_python.yml
23+
[arm64_macos_java_svg]: ./../../../actions/workflows/arm64_macos_cmake_java.yml/badge.svg?branch=main
24+
[arm64_macos_java_link]: ./../../../actions/workflows/arm64_macos_cmake_java.yml
25+
[arm64_macos_dotnet_svg]: ./../../../actions/workflows/arm64_macos_cmake_dotnet.yml/badge.svg?branch=main
26+
[arm64_macos_dotnet_link]: ./../../../actions/workflows/arm64_macos_cmake_dotnet.yml
27+
28+
[amd64_macos_cpp_svg]: ./../../../actions/workflows/amd64_macos_cmake_cpp.yml/badge.svg?branch=main
29+
[amd64_macos_cpp_link]: ./../../../actions/workflows/amd64_macos_cmake_cpp.yml
30+
[amd64_macos_python_svg]: ./../../../actions/workflows/amd64_macos_cmake_python.yml/badge.svg?branch=main
31+
[amd64_macos_python_link]: ./../../../actions/workflows/amd64_macos_cmake_python.yml
32+
[amd64_macos_java_svg]: ./../../../actions/workflows/amd64_macos_cmake_java.yml/badge.svg?branch=main
33+
[amd64_macos_java_link]: ./../../../actions/workflows/amd64_macos_cmake_java.yml
34+
[amd64_macos_dotnet_svg]: ./../../../actions/workflows/amd64_macos_cmake_dotnet.yml/badge.svg?branch=main
35+
[amd64_macos_dotnet_link]: ./../../../actions/workflows/amd64_macos_cmake_dotnet.yml
2636

2737
[windows_cpp_svg]: ./../../../actions/workflows/amd64_windows_cmake_cpp.yml/badge.svg?branch=main
2838
[windows_cpp_link]: ./../../../actions/workflows/amd64_windows_cmake_cpp.yml

0 commit comments

Comments
 (0)