uWebSockets.js/.github/workflows/c-cpp.yml

52 lines
1.8 KiB
YAML
Raw Normal View History

2020-09-18 18:32:09 +00:00
name: Build
on:
push:
branches: [ master ]
jobs:
2020-09-18 20:36:43 +00:00
build-windows:
runs-on: windows-latest
steps:
- uses: ilammy/msvc-dev-cmd@v1
2021-10-24 20:39:41 +00:00
- uses: ilammy/setup-nasm@v1.2.1
2020-09-18 20:36:43 +00:00
- name: Update binaries
run: |
$ErrorActionPreference = 'SilentlyContinue'
git clone --recursive https://github.com/uNetworking/uWebSockets.js.git
cd uWebSockets.js
nmake
2021-10-24 20:52:00 +00:00
git fetch origin binaries:binaries
2020-09-18 20:36:43 +00:00
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://alexhultman:${{ secrets.SECRET }}@github.com/uNetworking/uWebSockets.js" binaries
2020-09-18 18:32:09 +00:00
build-unix:
runs-on: ${{ matrix.os }}
strategy:
matrix:
2020-10-22 21:07:14 +00:00
os: [macos-11.0, ubuntu-latest]
2020-09-18 18:32:09 +00:00
steps:
- name: Update binaries
run: |
2020-10-22 21:07:14 +00:00
sudo xcode-select -switch /Applications/Xcode_12.2.app || true
2020-09-18 18:32:09 +00:00
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
2021-10-24 20:52:00 +00:00
git fetch origin binaries:binaries
2020-09-18 18:32:09 +00:00
git checkout binaries
cp dist/*.node .
git status
2021-01-25 13:26:15 +00:00
git rev-parse master > source_commit
git checkout master docs/index.d.ts && mv docs/index.d.ts .
2020-09-18 18:32:09 +00:00
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://alexhultman:${{ secrets.SECRET }}@github.com/uNetworking/uWebSockets.js" binaries