mirror of
https://github.com/tsl0922/ttyd.git
synced 2025-12-27 14:04:23 +01:00
Add github workflow
This commit is contained in:
38
.github/workflows/backend.yml
vendored
Normal file
38
.github/workflows/backend.yml
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
name: backend
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- "CMakeLists.txt"
|
||||
- "src/*"
|
||||
pull_request:
|
||||
paths:
|
||||
- "CMakeLists.txt"
|
||||
- "src/*"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-16.04
|
||||
strategy:
|
||||
matrix:
|
||||
lws-version: [3.1.0, 2.4.2]
|
||||
steps:
|
||||
- name: install apt packages
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install build-essential cmake libjson-c-dev libssl-dev
|
||||
- name: compile libwebsockets-${{ matrix.node-version }} from source
|
||||
env:
|
||||
LWS_VERSION: ${{ matrix.lws-version }}
|
||||
run: |
|
||||
cd $(mktemp -d)
|
||||
curl -sLo- https://github.com/warmcat/libwebsockets/archive/v${LWS_VERSION}.tar.gz | tar xz
|
||||
cd libwebsockets-${LWS_VERSION}
|
||||
cmake -DLWS_UNIX_SOCK=ON -DLWS_IPV6=ON -DLWS_WITHOUT_TESTAPPS=ON -DCMAKE_BUILD_TYPE=RELEASE .
|
||||
make && sudo make install
|
||||
- uses: actions/checkout@v1
|
||||
- name: build ttyd
|
||||
run: |
|
||||
cmake -DCMAKE_BUILD_TYPE=RELEASE .
|
||||
make && sudo make install
|
||||
ttyd -v
|
||||
28
.github/workflows/frontend.yml
vendored
Normal file
28
.github/workflows/frontend.yml
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
name: frontend
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- "html/*"
|
||||
pull_request:
|
||||
paths:
|
||||
- "html/*"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-16.04
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [8.x, 10.x, 12.x]
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: yarn install, check and build
|
||||
run: |
|
||||
cd html
|
||||
yarn install
|
||||
yarn run check
|
||||
yarn run build
|
||||
Reference in New Issue
Block a user