Skip to content

Commit 1bc069a

Browse files
Update build.yml
1 parent d4ac21d commit 1bc069a

File tree

1 file changed

+32
-26
lines changed

1 file changed

+32
-26
lines changed

.github/workflows/build.yml

Lines changed: 32 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,49 +5,55 @@ on:
55
branches: [ master ]
66

77
jobs:
8-
build:
8+
build-windows:
9+
runs-on: windows-latest
10+
steps:
11+
- uses: ilammy/msvc-dev-cmd@v1
12+
- uses: ilammy/setup-nasm@v1.2.1
13+
- name: Update binaries
14+
run: |
15+
$ErrorActionPreference = 'SilentlyContinue'
16+
git clone --recursive https://github.com/uNetworking/uWebSockets.js.git
17+
cd uWebSockets.js
18+
nmake
19+
git fetch origin binaries:binaries
20+
git checkout binaries
21+
xcopy /Y dist\*.node .
22+
git status
23+
git config --global user.email "alexhultman@gmail.com"
24+
git config --global user.name "Alex Hultman"
25+
git commit -a -m "[GitHub Actions] Updated windows-latest binaries"
26+
git push "https://unetworkingab:${{ secrets.SECRET }}@github.com/uNetworking/uWebSockets.js" binaries
27+
git checkout master -- tests/smoke.js
28+
npm install ws
29+
node tests/smoke.js
30+
build-unix:
931
runs-on: ${{ matrix.os }}
1032
strategy:
1133
matrix:
12-
os: [windows-latest, macos-15, ubuntu-24.04, ubuntu-24.04-arm]
34+
os: [macos-15, ubuntu-24.04, ubuntu-24.04-arm]
1335
steps:
14-
- name: Set up environment
15-
uses: actions/setup-node@v4
36+
- uses: actions/setup-node@v4
1637
with:
1738
node-version: 20
18-
- name: Install Windows tools
19-
if: matrix.os == 'windows-latest'
20-
uses: ilammy/msvc-dev-cmd@v1
21-
- name: Install NASM for Windows
22-
if: matrix.os == 'windows-latest'
23-
uses: ilammy/setup-nasm@v1.2.1
24-
- name: Install Unix dependencies
25-
if: matrix.os != 'windows-latest'
39+
- name: Update binaries
2640
run: |
2741
uname -a
2842
sudo apt update || true
2943
brew install go || true
30-
- name: Build and update binaries
31-
shell: bash
32-
run: |
44+
sudo apt install -y g++-aarch64-linux-gnu || true
3345
git clone --recursive https://github.com/uNetworking/uWebSockets.js.git
3446
cd uWebSockets.js
35-
if [ "${{ matrix.os }}" == "windows-latest" ]; then
36-
nmake
37-
else
38-
make
39-
fi
40-
cp dist/*.node .
41-
cp dist/*.js .
42-
git checkout master docs/index.d.ts && mv docs/index.d.ts .
47+
make
4348
git fetch origin binaries:binaries
44-
git add *.node *.js index.d.ts
45-
git stash
4649
git checkout binaries
50+
cp dist/*.node .
51+
cp dist/*.js .
4752
git status
53+
git rev-parse master > source_commit
54+
git checkout master docs/index.d.ts && mv docs/index.d.ts .
4855
git config --global user.email "alexhultman@gmail.com"
4956
git config --global user.name "Alex Hultman"
50-
git stash apply
5157
git commit -a -m "[GitHub Actions] Updated ${{ matrix.os }} binaries" || true
5258
git push "https://unetworkingab:${{ secrets.SECRET }}@github.com/uNetworking/uWebSockets.js" binaries
5359
git checkout master -- tests/smoke.js

0 commit comments

Comments
 (0)