Skip to content

Commit cc0f17b

Browse files
committed
change to use rid
1 parent 5bc88e7 commit cc0f17b

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

.github/workflows/opencv.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,16 @@ env:
3636
jobs:
3737
build:
3838
name: Build OpenCV
39-
runs-on: ${{ matrix.os }}
40-
4139
strategy:
4240
matrix:
43-
os: [ubuntu-22.04, ubuntu-24.04, windows-2022, macos-15]
41+
rid: [ubuntu.22.04-x64, ubuntu.24.04-x64, win-x64, osx-arm64]
42+
43+
runs-on: ${{
44+
contains(matrix.rid, 'ubuntu.22.04') && 'ubuntu-22.04' ||
45+
contains(matrix.rid, 'ubuntu.24.04') && 'ubuntu-24.04' ||
46+
contains(matrix.rid, 'win-x64') && 'windows-2022' ||
47+
contains(matrix.rid, 'osx-arm64') && 'macos-15'
48+
}}
4449

4550
steps:
4651
- name: Install Dependencies
@@ -71,7 +76,12 @@ jobs:
7176
7277
- name: Build OpenCV
7378
run: |
74-
cd opencv/build && make -j$(nproc)
79+
cd opencv/build
80+
if [[ ${{ matrix.rid }} == win-* ]]; then
81+
make -j %NUMBER_OF_PROCESSORS%
82+
else
83+
make -j$(nproc)
84+
fi
7585
7686
- name: Install OpenCV
7787
run: |

0 commit comments

Comments
 (0)