Hmm #93
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: Build | |
| on: | |
| push: | |
| branches: [ master ] | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [windows-latest, macos-15, ubuntu-24.04, ubuntu-24.04-arm] | |
| steps: | |
| - name: Set up environment | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - name: Install Windows tools | |
| if: matrix.os == 'windows-latest' | |
| uses: ilammy/msvc-dev-cmd@v1 | |
| - name: Install NASM for Windows | |
| if: matrix.os == 'windows-latest' | |
| uses: ilammy/[email protected] | |
| - name: Install Unix dependencies | |
| if: matrix.os != 'windows-latest' | |
| run: | | |
| uname -a | |
| sudo apt update || true | |
| brew install go || true | |
| - name: Build and update binaries | |
| shell: bash | |
| run: | | |
| git clone --recursive https://github.com/uNetworking/uWebSockets.js.git | |
| cd uWebSockets.js | |
| if [ "${{ matrix.os }}" == "windows-latest" ]; then | |
| nmake | |
| else | |
| make | |
| fi | |
| cp dist/*.node . | |
| cp dist/*.js . | |
| git checkout master docs/index.d.ts && mv docs/index.d.ts . | |
| git fetch origin binaries:binaries | |
| git add *.node *.js index.d.ts | |
| git checkout binaries | |
| git status | |
| git config --global user.email "[email protected]" | |
| git config --global user.name "Alex Hultman" | |
| git commit -m "[GitHub Actions] Updated ${{ matrix.os }} binaries" || true | |
| git push "https://unetworkingab:${{ secrets.SECRET }}@github.com/uNetworking/uWebSockets.js" binaries | |
| git checkout master -- tests/smoke.js | |
| npm install ws | |
| node tests/smoke.js |