mirror of
https://github.com/uNetworking/uWebSockets.js.git
synced 2025-12-19 18:10:26 -05:00
Update build.yml
This commit is contained in:
58
.github/workflows/build.yml
vendored
58
.github/workflows/build.yml
vendored
@@ -5,49 +5,55 @@ on:
|
|||||||
branches: [ master ]
|
branches: [ master ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
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
|
||||||
|
build-unix:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [windows-latest, macos-15, ubuntu-24.04, ubuntu-24.04-arm]
|
os: [macos-15, ubuntu-24.04, ubuntu-24.04-arm]
|
||||||
steps:
|
steps:
|
||||||
- name: Set up environment
|
- uses: actions/setup-node@v4
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 20
|
||||||
- name: Install Windows tools
|
- name: Update binaries
|
||||||
if: matrix.os == 'windows-latest'
|
|
||||||
uses: ilammy/msvc-dev-cmd@v1
|
|
||||||
- name: Install NASM for Windows
|
|
||||||
if: matrix.os == 'windows-latest'
|
|
||||||
uses: ilammy/setup-nasm@v1.2.1
|
|
||||||
- name: Install Unix dependencies
|
|
||||||
if: matrix.os != 'windows-latest'
|
|
||||||
run: |
|
run: |
|
||||||
uname -a
|
uname -a
|
||||||
sudo apt update || true
|
sudo apt update || true
|
||||||
brew install go || true
|
brew install go || true
|
||||||
- name: Build and update binaries
|
sudo apt install -y g++-aarch64-linux-gnu || true
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
git clone --recursive https://github.com/uNetworking/uWebSockets.js.git
|
git clone --recursive https://github.com/uNetworking/uWebSockets.js.git
|
||||||
cd uWebSockets.js
|
cd uWebSockets.js
|
||||||
if [ "${{ matrix.os }}" == "windows-latest" ]; then
|
make
|
||||||
nmake
|
git fetch origin binaries:binaries
|
||||||
else
|
git checkout binaries
|
||||||
make
|
|
||||||
fi
|
|
||||||
cp dist/*.node .
|
cp dist/*.node .
|
||||||
cp dist/*.js .
|
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 stash
|
|
||||||
git checkout binaries
|
|
||||||
git status
|
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.email "alexhultman@gmail.com"
|
||||||
git config --global user.name "Alex Hultman"
|
git config --global user.name "Alex Hultman"
|
||||||
git stash apply
|
|
||||||
git commit -a -m "[GitHub Actions] Updated ${{ matrix.os }} binaries" || true
|
git commit -a -m "[GitHub Actions] Updated ${{ matrix.os }} binaries" || true
|
||||||
git push "https://unetworkingab:${{ secrets.SECRET }}@github.com/uNetworking/uWebSockets.js" binaries
|
git push "https://unetworkingab:${{ secrets.SECRET }}@github.com/uNetworking/uWebSockets.js" binaries
|
||||||
git checkout master -- tests/smoke.js
|
git checkout master -- tests/smoke.js
|
||||||
|
|||||||
Reference in New Issue
Block a user