|
5 | 5 | branches: [ master ] |
6 | 6 |
|
7 | 7 | 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: |
9 | 31 | runs-on: ${{ matrix.os }} |
10 | 32 | strategy: |
11 | 33 | 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] |
13 | 35 | steps: |
14 | | - - name: Set up environment |
15 | | - uses: actions/setup-node@v4 |
| 36 | + - uses: actions/setup-node@v4 |
16 | 37 | with: |
17 | 38 | 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 |
26 | 40 | run: | |
27 | 41 | uname -a |
28 | 42 | sudo apt update || true |
29 | 43 | 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 |
33 | 45 | git clone --recursive https://github.com/uNetworking/uWebSockets.js.git |
34 | 46 | 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 |
43 | 48 | git fetch origin binaries:binaries |
44 | | - git add *.node *.js index.d.ts |
45 | | - git stash |
46 | 49 | git checkout binaries |
| 50 | + cp dist/*.node . |
| 51 | + cp dist/*.js . |
47 | 52 | git status |
| 53 | + git rev-parse master > source_commit |
| 54 | + git checkout master docs/index.d.ts && mv docs/index.d.ts . |
48 | 55 | git config --global user.email "alexhultman@gmail.com" |
49 | 56 | git config --global user.name "Alex Hultman" |
50 | | - git stash apply |
51 | 57 | git commit -a -m "[GitHub Actions] Updated ${{ matrix.os }} binaries" || true |
52 | 58 | git push "https://unetworkingab:${{ secrets.SECRET }}@github.com/uNetworking/uWebSockets.js" binaries |
53 | 59 | git checkout master -- tests/smoke.js |
|
0 commit comments