-
Notifications
You must be signed in to change notification settings - Fork 578
98 lines (96 loc) · 3.47 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
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
build-unix:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-12, ubuntu-20.04]
steps:
- name: Update binaries
run: |
uname -a
sudo apt update || 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-latest
name: Build on ${{ matrix.arch }}
strategy:
matrix:
include:
- arch: aarch64
os: ubuntu20.04
- arch: armv7
os: bullseye
steps:
- name: Clone
run: git clone --recursive https://github.com/uNetworking/uWebSockets.js.git
- uses: uraimo/run-on-arch-action@v2.3.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