Remove unused bindings and files from lvtk #20
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: Check Node Prebuilds | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - n-api | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: macos-latest | |
| arch: x86_64 | |
| node_arch: x64 | |
| - os: macos-latest | |
| arch: arm64 | |
| node_arch: arm64 | |
| # - os: ubuntu-latest | |
| # arch: x64 | |
| # - os: windows-latest | |
| # arch: x64 | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Install system dependencies (macOS) | |
| if: runner.os == 'macOS' | |
| run: echo "CMake and Ninja pre-installed" | |
| - name: Install system dependencies (Linux) | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libx11-dev libgl1-mesa-dev ninja-build cmake | |
| - name: Build lui library (Unix) | |
| if: runner.os != 'Windows' | |
| run: | | |
| if [ "${{ runner.os }}" = "macOS" ]; then | |
| ARCH_FLAG="-DCMAKE_OSX_ARCHITECTURES=${{ matrix.arch }}" | |
| else | |
| ARCH_FLAG="" | |
| fi | |
| cmake -B build-node -G Ninja \ | |
| -DLUI_BUILD_TESTS=OFF \ | |
| -DLUI_BUILD_DEMO=OFF \ | |
| -DLUI_BUILD_CAIRO=OFF \ | |
| -DLUI_NODE=ON $ARCH_FLAG | |
| ninja -C build-node src/liblui-0.0.a | |
| mkdir -p build-node/lib | |
| cp build-node/src/liblui-0.0.a build-node/lib/ | |
| - name: Build lui library (Windows) | |
| if: runner.os == 'Windows' | |
| run: | | |
| cmake -B build-node -G Ninja -DLUI_BUILD_TESTS=OFF -DLUI_BUILD_DEMO=OFF -DLUI_NODE=ON | |
| ninja -C build-node src/lui-0.0.lib | |
| mkdir -p build-node/lib | |
| copy build-node/src/lui-0.0.lib build-node/lib/ | |
| shell: cmd | |
| - name: Install Node.js dependencies | |
| working-directory: bindings/node | |
| run: npm install --include=dev | |
| - name: Prebuild native addon | |
| working-directory: bindings/node | |
| run: npx prebuildify --napi --strip --arch ${{ matrix.node_arch }} | |
| - name: Upload prebuilds | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: prebuilds-${{ matrix.os }}-${{ matrix.arch }} | |
| path: bindings/node/prebuilds/ | |
| retention-days: 30 |