From 1bf57f291bbab7e5871f28e975000cfc7ee8f162 Mon Sep 17 00:00:00 2001 From: Srikanth Kotagiri Date: Mon, 8 Jul 2024 16:43:45 +0000 Subject: [PATCH] Split windows and macos jobs --- .github/workflows/prebuild.yml | 53 ++++++++++++++++++---------------- 1 file changed, 28 insertions(+), 25 deletions(-) diff --git a/.github/workflows/prebuild.yml b/.github/workflows/prebuild.yml index 7673d55..15aebcf 100644 --- a/.github/workflows/prebuild.yml +++ b/.github/workflows/prebuild.yml @@ -37,16 +37,35 @@ jobs: # - name: prebuild for Linux (arm64) # run: npx prebuild --runtime napi --arch arm64 --include-regex '(\.node|\.dylib|ffmpeg|ffprobe)$' --upload ${{ secrets.GITHUB_TOKEN }} - package: + windows-package: permissions: contents: write - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: - - macos-latest - - windows-latest + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + lfs: true + - name: Use nodejs + uses: actions/setup-node@v1 + with: + node-version: 16.13.0 + + - name: npm install + run: npm install + env: + PREBUILD: true + + - name: install Windows dependencies + run: node ./install_ffmpeg.js + + - name: prebuild for Windows + run: npx prebuild --runtime napi --include-regex '.node|.dll|.exe' --verbose --upload ${{ secrets.GITHUB_TOKEN }} + shell: bash + + macos-package: + permissions: + contents: write + runs-on: macos-latest steps: - uses: actions/checkout@v2 with: @@ -59,9 +78,7 @@ jobs: - name: install Mac build dependencies (brew) run: | - brew install nasm pkg-config - python3 -m pip install packaging setuptools - if: ${{ runner.os == 'macOS'}} + brew install nasm pkg-config python-packaging python-setuptools - name: npm install run: npm install @@ -70,29 +87,15 @@ jobs: - name: install Mac dependencies (shared release x64) run: node ./install_ffmpeg.js --arch x64 - if: ${{ runner.os == 'macOS'}} - name: install Mac dependencies (shared release arm64) run: node ./install_ffmpeg.js --arch arm64 - if: ${{ runner.os == 'macOS'}} - - - name: install Windows dependencies - run: node ./install_ffmpeg.js - if: ${{ runner.os == 'Windows'}} - name: prebuild Release for macOS (x64) run: npx prebuild --runtime napi --arch x64 --include-regex '(\.node|\.dylib|ffmpeg|ffprobe)$' --verbose --upload ${{ secrets.GITHUB_TOKEN }} - if: ${{ runner.os == 'macOS'}} - name: clean build directory for cross-compiling run: rm ./build/Release/*.dylib || true - if: ${{ runner.os == 'macOS'}} - name: prebuild Release for macOS (arm64) run: npx prebuild --runtime napi --arch arm64 --include-regex '(\.node|\.dylib|ffmpeg|ffprobe)$' --verbose --upload ${{ secrets.GITHUB_TOKEN }} - if: ${{ runner.os == 'macOS'}} - - - name: prebuild for Windows - run: npx prebuild --runtime napi --include-regex '.node|.dll|.exe' --verbose --upload ${{ secrets.GITHUB_TOKEN }} - shell: bash - if: ${{ runner.os == 'Windows'}}