Add ARM architecture to build matrix #86
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-windows: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: ilammy/msvc-dev-cmd@v1 | |
| - uses: ilammy/setup-nasm@v1.2.1 | |
| - name: Update binaries | |
| run: | | |
| $ErrorActionPreference = 'SilentlyContinue' | |
| git clone --recursive https://github.com/uNetworking/uWebSockets.js.git | |
| cd uWebSockets.js | |
| nmake | |
| git fetch origin binaries:binaries | |
| git checkout binaries | |
| xcopy /Y dist\*.node . | |
| git status | |
| git config --global user.email "alexhultman@gmail.com" | |
| git config --global user.name "Alex Hultman" | |
| git commit -a -m "[GitHub Actions] Updated windows-latest binaries" | |
| 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 || true | |
| build-unix: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [macos-15, ubuntu-24.04, ubuntu-24.04-arm] | |
| steps: | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - name: Update binaries | |
| run: | | |
| uname -a | |
| sudo apt update || true | |
| brew install go || true | |
| sudo apt install -y g++-aarch64-linux-gnu || true | |
| git clone --recursive https://github.com/uNetworking/uWebSockets.js.git | |
| cd uWebSockets.js | |
| make | |
| git fetch origin binaries:binaries | |
| git checkout binaries | |
| cp dist/*.node . | |
| cp dist/*.js . | |
| git status | |
| git rev-parse master > source_commit | |
| git checkout master docs/index.d.ts && mv docs/index.d.ts . | |
| git config --global user.email "alexhultman@gmail.com" | |
| git config --global user.name "Alex Hultman" | |
| git commit -a -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 | |
| build-arm: | |
| runs-on: [ubuntu-24.04, arm64] | |
| name: Build on ARM64 | |
| steps: | |
| - name: Clone | |
| run: git clone --recursive https://github.com/uNetworking/uWebSockets.js.git | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update -q -y | |
| sudo apt-get install -q -y build-essential cmake libz-dev golang curl libunwind-dev clang | |
| - name: Compile binaries | |
| run: | | |
| cd uWebSockets.js | |
| make | |
| - name: Update binaries | |
| run: | | |
| cd uWebSockets.js | |
| git fetch origin binaries:binaries | |
| git checkout binaries | |
| cp dist/*.node . | |
| cp dist/*.js . | |
| git status | |
| git rev-parse master > source_commit | |
| git checkout master docs/index.d.ts && mv docs/index.d.ts . | |
| git config --global user.email "alexhultman@gmail.com" | |
| git config --global user.name "Alex Hultman" | |
| git add *.node *.js | |
| git commit -a -m "[GitHub Actions] Updated linux-arm64 binaries" || true | |
| git push "https://unetworkingab:${{ secrets.SECRET }}@github.com/uNetworking/uWebSockets.js" binaries |