diff --git a/.github/workflows/prebuild-linux.yml b/.github/workflows/prebuild-linux.yml index fe615361f..247e9e3c2 100644 --- a/.github/workflows/prebuild-linux.yml +++ b/.github/workflows/prebuild-linux.yml @@ -42,30 +42,31 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Install OpenCV ${{ matrix.opencv_version }} - run: | - sudo apt update - sudo apt install libopencv-dev - - name: Install Node.js ${{ matrix.node_version }} uses: actions/setup-node@v4 with: node-version: ${{ matrix.node_version }} + cache: 'pnpm' + - name: Install OpenCV ${{ matrix.opencv_version }} + run: | + sudo apt update + sudo apt install libopencv-dev + - uses: pnpm/action-setup@v3 name: Install pnpm with: version: 8 run_install: | - recursive: true - args: [--frozen-lockfile, --strict-peer-dependencies] + args: [--strict-peer-dependencies] - name: pnpm run prepack run: pnpm run prepack - name: install deps in test working-directory: ./test - run: pnpm install --frozen-lockfile + run: pnpm install - name: run test-appveyor test working-directory: ./test diff --git a/.github/workflows/prebuild-mac.yml b/.github/workflows/prebuild-mac.yml new file mode 100644 index 000000000..a50fc1e0b --- /dev/null +++ b/.github/workflows/prebuild-mac.yml @@ -0,0 +1,73 @@ +name: Use openCV from Brew + +on: + push: + branches: [ "master" ] + paths: + - "cc/**" + - "install/**" + - "lib/**" + - "test/**" + - "typings/**" + - "package.json" + - ".github/workflows/prebuild-mac.yml" + pull_request: + branches: [ "master" ] + paths: + - "cc/**" + - "install/**" + - "lib/**" + - "test/**" + - "typings/**" + - "package.json" + - ".github/workflows/prebuild-mac.yml" + +env: + OPENCV4NODEJS_DISABLE_AUTOBUILD: 1 + +permissions: + contents: read + +jobs: + build: + runs-on: macos-latest + strategy: + matrix: + opencv_version: + - 4 + node_version: + # - 16 + # - 18 + - 20 + + steps: + - uses: actions/checkout@v4 + - name: Install Node.js ${{ matrix.node_version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node_version }} + cache: 'pnpm' + + - name: Install OpenCV ${{ matrix.opencv_version }} + run: | + brew install opencv@${{ matrix.opencv_version }} + + + - uses: pnpm/action-setup@v3 + name: Install pnpm + with: + version: 8 + run_install: | + - recursive: true + args: [--strict-peer-dependencies] + + - name: pnpm run prepack + run: pnpm run prepack + + - name: install deps in test + working-directory: ./test + run: pnpm install + + - name: run test-appveyor test + working-directory: ./test + run: pnpm run test-appveyor diff --git a/.github/workflows/win64-prebuild.yml b/.github/workflows/prebuild-win64.yml similarity index 96% rename from .github/workflows/win64-prebuild.yml rename to .github/workflows/prebuild-win64.yml index 1f5d6e9cf..624122b7f 100644 --- a/.github/workflows/win64-prebuild.yml +++ b/.github/workflows/prebuild-win64.yml @@ -10,7 +10,7 @@ on: - "test/**" - "typings/**" - "package.json" - - ".github/workflows/win64-prebuild.yml" + - ".github/workflows/prebuild-win64.yml" pull_request: branches: [ "master" ] paths: @@ -20,7 +20,7 @@ on: - "test/**" - "typings/**" - "package.json" - - ".github/workflows/win64-prebuild.yml" + - ".github/workflows/prebuild-win64.yml" env: # Path to the solution file relative to the root of the project.