|
@@ -4,6 +4,10 @@ name: Server
|
|
|
on:
|
|
on:
|
|
|
workflow_dispatch: # allows manual triggering
|
|
workflow_dispatch: # allows manual triggering
|
|
|
inputs:
|
|
inputs:
|
|
|
|
|
+ sha:
|
|
|
|
|
+ description: 'Commit SHA1 to build'
|
|
|
|
|
+ required: false
|
|
|
|
|
+ type: string
|
|
|
slow_tests:
|
|
slow_tests:
|
|
|
description: 'Run slow tests'
|
|
description: 'Run slow tests'
|
|
|
required: true
|
|
required: true
|
|
@@ -11,12 +15,12 @@ on:
|
|
|
push:
|
|
push:
|
|
|
branches:
|
|
branches:
|
|
|
- master
|
|
- master
|
|
|
- paths: ['.github/workflows/server.yml', '**/CMakeLists.txt', '**/Makefile', '**/*.h', '**/*.hpp', '**/*.c', '**/*.cpp', '**/*.cu', '**/*.swift', '**/*.m', 'examples/server/tests/**.*']
|
|
|
|
|
- pull_request:
|
|
|
|
|
|
|
+ paths: ['.github/workflows/server.yml', '**/CMakeLists.txt', '**/Makefile', '**/*.h', '**/*.hpp', '**/*.c', '**/*.cpp', '**/*.cu', '**/*.swift', '**/*.m', 'examples/server/**.*']
|
|
|
|
|
+ pull_request_target:
|
|
|
types: [opened, synchronize, reopened]
|
|
types: [opened, synchronize, reopened]
|
|
|
- paths: ['.github/workflows/server.yml', '**/CMakeLists.txt', '**/Makefile', '**/*.h', '**/*.hpp', '**/*.c', '**/*.cpp', '**/*.cu', '**/*.swift', '**/*.m', 'examples/server/tests/**.*']
|
|
|
|
|
|
|
+ paths: ['.github/workflows/server.yml', '**/CMakeLists.txt', '**/Makefile', '**/*.h', '**/*.hpp', '**/*.c', '**/*.cpp', '**/*.cu', '**/*.swift', '**/*.m', 'examples/server/**.*']
|
|
|
schedule:
|
|
schedule:
|
|
|
- - cron: '0 0 * * *'
|
|
|
|
|
|
|
+ - cron: '2 4 * * *'
|
|
|
|
|
|
|
|
concurrency:
|
|
concurrency:
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
@@ -44,25 +48,45 @@ jobs:
|
|
|
options: --cpus 4
|
|
options: --cpus 4
|
|
|
|
|
|
|
|
steps:
|
|
steps:
|
|
|
- - name: Clone
|
|
|
|
|
- id: checkout
|
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
- with:
|
|
|
|
|
- fetch-depth: 0
|
|
|
|
|
-
|
|
|
|
|
- name: Dependencies
|
|
- name: Dependencies
|
|
|
id: depends
|
|
id: depends
|
|
|
run: |
|
|
run: |
|
|
|
apt-get update
|
|
apt-get update
|
|
|
apt-get -y install \
|
|
apt-get -y install \
|
|
|
build-essential \
|
|
build-essential \
|
|
|
|
|
+ xxd \
|
|
|
git \
|
|
git \
|
|
|
cmake \
|
|
cmake \
|
|
|
python3-pip \
|
|
python3-pip \
|
|
|
|
|
+ curl \
|
|
|
wget \
|
|
wget \
|
|
|
language-pack-en \
|
|
language-pack-en \
|
|
|
libcurl4-openssl-dev
|
|
libcurl4-openssl-dev
|
|
|
|
|
|
|
|
|
|
+ - name: Clone
|
|
|
|
|
+ id: checkout
|
|
|
|
|
+ uses: actions/checkout@v3
|
|
|
|
|
+ with:
|
|
|
|
|
+ fetch-depth: 0
|
|
|
|
|
+ ref: ${{ github.event.inputs.sha || github.event.pull_request.head.sha || github.sha || github.head_ref || github.ref_name }}
|
|
|
|
|
+
|
|
|
|
|
+ - name: Verify server deps
|
|
|
|
|
+ id: verify_server_deps
|
|
|
|
|
+ run: |
|
|
|
|
|
+ git config --global --add safe.directory $(realpath .)
|
|
|
|
|
+ cd examples/server
|
|
|
|
|
+ git ls-files --others --modified
|
|
|
|
|
+ git status
|
|
|
|
|
+ ./deps.sh
|
|
|
|
|
+ git status
|
|
|
|
|
+ not_ignored_files="$(git ls-files --others --modified)"
|
|
|
|
|
+ echo "Modified files: ${not_ignored_files}"
|
|
|
|
|
+ if [ -n "${not_ignored_files}" ]; then
|
|
|
|
|
+ echo "Repository is dirty or server deps are not built as expected"
|
|
|
|
|
+ echo "${not_ignored_files}"
|
|
|
|
|
+ exit 1
|
|
|
|
|
+ fi
|
|
|
|
|
+
|
|
|
- name: Build
|
|
- name: Build
|
|
|
id: cmake_build
|
|
id: cmake_build
|
|
|
run: |
|
|
run: |
|