Repository navigation
winmac #11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: winmac | |
| on: | |
| workflow_dispatch: | |
| env: | |
| FORCE_COLOR: 1 | |
| concurrency: | |
| group: ${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| continue-on-error: true | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - macos-latest | |
| - windows-latest | |
| host: | |
| - x64 | |
| target: | |
| - x64 | |
| node: | |
| - 24 | |
| include: | |
| - os: macos-latest | |
| node: 24 | |
| host: arm64 | |
| target: arm64 | |
| name: ${{ matrix.os }} (node=${{ matrix.node }}, host=${{ matrix.host }}, target=${{ matrix.target }}) | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| architecture: ${{ matrix.host }} | |
| - name: Add msbuild to PATH | |
| uses: microsoft/setup-msbuild@v3 | |
| if: contains(matrix.os, 'windows') | |
| with: | |
| msbuild-architecture: ${{ matrix.target }} | |
| - name: Add env vars | |
| shell: bash | |
| run: | | |
| echo "V=1" >> $GITHUB_ENV | |
| echo "TARGET=${{ matrix.target }}" >> $GITHUB_ENV | |
| - name: Install dependencies | |
| run: npm ci --ignore-scripts | |
| - name: Print build toolchain | |
| run: npx node-gyp --version | |
| - name: Configure build | |
| run: node node_modules/@mapbox/node-pre-gyp/bin/node-pre-gyp configure --target_arch=${{ env.TARGET }} | |
| - name: Build binaries | |
| run: node node_modules/@mapbox/node-pre-gyp/bin/node-pre-gyp build --target_arch=${{ env.TARGET }} | |
| - name: Test value compatibility | |
| run: node node_modules/mocha/bin/mocha --timeout 480000 test/datetime_compat.test.js test/value_compat.test.js | |
| - name: Package prebuilt binaries | |
| run: node node_modules/@mapbox/node-pre-gyp/bin/node-pre-gyp package --target_arch=${{ env.TARGET }} | |
| - name: Upload binaries to commit artifacts | |
| uses: actions/upload-artifact@v7 | |
| if: matrix.node == 24 | |
| with: | |
| name: prebuilt-binaries-${{ matrix.os }}-${{ matrix.target }} | |
| path: build/stage/*/* | |
| retention-days: 7 | |
| - name: Upload binaries to GitHub Release | |
| run: node tools/publish-prebuild.js | |
| if: matrix.node == 24 | |
| env: | |
| NODE_PRE_GYP_GITHUB_TOKEN: ${{ secrets.API_TOKEN }} |