Update README.md #287
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
branches: [ master ] | |
jobs: | |
build-windows: | |
runs-on: windows-latest | |
steps: | |
- uses: ilammy/msvc-dev-cmd@v1 | |
- uses: ilammy/[email protected] | |
- 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 "[email protected]" | |
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 | |
build-unix: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macos-11.0, ubuntu-20.04] | |
steps: | |
- name: Update binaries | |
run: | | |
sudo xcode-select -switch /Applications/Xcode_12.2.app || true | |
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 . | |
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 "[email protected]" | |
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 | |
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/[email protected] | |
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 "[email protected]" | |
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 |