Skip to content

Commit 823d6fc

Browse files
committed
update all workflow
1 parent 2bdfb34 commit 823d6fc

File tree

3 files changed

+83
-9
lines changed

3 files changed

+83
-9
lines changed

.github/workflows/prebuild-linux.yml

+8-7
Original file line numberDiff line numberDiff line change
@@ -42,30 +42,31 @@ jobs:
4242

4343
steps:
4444
- uses: actions/checkout@v4
45-
- name: Install OpenCV ${{ matrix.opencv_version }}
46-
run: |
47-
sudo apt update
48-
sudo apt install libopencv-dev
49-
5045
- name: Install Node.js ${{ matrix.node_version }}
5146
uses: actions/setup-node@v4
5247
with:
5348
node-version: ${{ matrix.node_version }}
49+
cache: 'pnpm'
5450

51+
- name: Install OpenCV ${{ matrix.opencv_version }}
52+
run: |
53+
sudo apt update
54+
sudo apt install libopencv-dev
55+
5556
- uses: pnpm/action-setup@v3
5657
name: Install pnpm
5758
with:
5859
version: 8
5960
run_install: |
6061
- recursive: true
61-
args: [--frozen-lockfile, --strict-peer-dependencies]
62+
args: [--strict-peer-dependencies]
6263
6364
- name: pnpm run prepack
6465
run: pnpm run prepack
6566

6667
- name: install deps in test
6768
working-directory: ./test
68-
run: pnpm install --frozen-lockfile
69+
run: pnpm install
6970

7071
- name: run test-appveyor test
7172
working-directory: ./test

.github/workflows/prebuild-mac.yml

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: Use openCV from Brew
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
paths:
7+
- "cc/**"
8+
- "install/**"
9+
- "lib/**"
10+
- "test/**"
11+
- "typings/**"
12+
- "package.json"
13+
- ".github/workflows/prebuild-mac.yml"
14+
pull_request:
15+
branches: [ "master" ]
16+
paths:
17+
- "cc/**"
18+
- "install/**"
19+
- "lib/**"
20+
- "test/**"
21+
- "typings/**"
22+
- "package.json"
23+
- ".github/workflows/prebuild-mac.yml"
24+
25+
env:
26+
OPENCV4NODEJS_DISABLE_AUTOBUILD: 1
27+
28+
permissions:
29+
contents: read
30+
31+
jobs:
32+
build:
33+
runs-on: macos-latest
34+
strategy:
35+
matrix:
36+
opencv_version:
37+
- 4
38+
node_version:
39+
# - 16
40+
# - 18
41+
- 20
42+
43+
steps:
44+
- uses: actions/checkout@v4
45+
- name: Install Node.js ${{ matrix.node_version }}
46+
uses: actions/setup-node@v4
47+
with:
48+
node-version: ${{ matrix.node_version }}
49+
cache: 'pnpm'
50+
51+
- name: Install OpenCV ${{ matrix.opencv_version }}
52+
run: |
53+
brew install opencv@${{ matrix.opencv_version }}
54+
55+
56+
- uses: pnpm/action-setup@v3
57+
name: Install pnpm
58+
with:
59+
version: 8
60+
run_install: |
61+
- recursive: true
62+
args: [--strict-peer-dependencies]
63+
64+
- name: pnpm run prepack
65+
run: pnpm run prepack
66+
67+
- name: install deps in test
68+
working-directory: ./test
69+
run: pnpm install
70+
71+
- name: run test-appveyor test
72+
working-directory: ./test
73+
run: pnpm run test-appveyor

.github/workflows/win64-prebuild.yml .github/workflows/prebuild-win64.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
- "test/**"
1111
- "typings/**"
1212
- "package.json"
13-
- ".github/workflows/win64-prebuild.yml"
13+
- ".github/workflows/prebuild-win64.yml"
1414
pull_request:
1515
branches: [ "master" ]
1616
paths:
@@ -20,7 +20,7 @@ on:
2020
- "test/**"
2121
- "typings/**"
2222
- "package.json"
23-
- ".github/workflows/win64-prebuild.yml"
23+
- ".github/workflows/prebuild-win64.yml"
2424

2525
env:
2626
# Path to the solution file relative to the root of the project.

0 commit comments

Comments
 (0)