mirror of
https://github.com/uNetworking/uWebSockets.js.git
synced 2025-12-30 03:02:09 -05:00
101 lines
3.5 KiB
YAML
101 lines
3.5 KiB
YAML
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]
|
|
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
|
|
name: Build on ${{ matrix.arch }}
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- arch: aarch64
|
|
os: ubuntu24.04
|
|
steps:
|
|
- name: Clone
|
|
run: git clone --recursive https://github.com/uNetworking/uWebSockets.js.git
|
|
- uses: uraimo/run-on-arch-action@v3.0.0
|
|
name: Compile binaries
|
|
with:
|
|
arch: ${{ matrix.arch }}
|
|
distro: ${{ matrix.os }}
|
|
dockerRunArgs: |
|
|
--volume "${PWD}/uWebSockets.js:/repository"
|
|
install: |
|
|
apt-get update -q -y
|
|
apt-get install -q -y build-essential cmake libz-dev golang curl libunwind-dev clang
|
|
run: |
|
|
cd /repository
|
|
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-${{ matrix.arch }} binaries" || true
|
|
git push "https://unetworkingab:${{ secrets.SECRET }}@github.com/uNetworking/uWebSockets.js" binaries
|