@@ -4,19 +4,23 @@ name: Server
4
4
on :
5
5
workflow_dispatch : # allows manual triggering
6
6
inputs :
7
+ sha :
8
+ description : ' Commit SHA1 to build'
9
+ required : false
10
+ type : string
7
11
slow_tests :
8
12
description : ' Run slow tests'
9
13
required : true
10
14
type : boolean
11
15
push :
12
16
branches :
13
17
- master
14
- paths : ['.github/workflows/server.yml', '**/CMakeLists.txt', '**/Makefile', '**/*.h', '**/*.hpp', '**/*.c', '**/*.cpp', '**/*.cu', '**/*.swift', '**/*.m', 'examples/server/tests/ **.*']
15
- pull_request :
18
+ paths : ['.github/workflows/server.yml', '**/CMakeLists.txt', '**/Makefile', '**/*.h', '**/*.hpp', '**/*.c', '**/*.cpp', '**/*.cu', '**/*.swift', '**/*.m', 'examples/server/**.*']
19
+ pull_request_target :
16
20
types : [opened, synchronize, reopened]
17
- paths : ['.github/workflows/server.yml', '**/CMakeLists.txt', '**/Makefile', '**/*.h', '**/*.hpp', '**/*.c', '**/*.cpp', '**/*.cu', '**/*.swift', '**/*.m', 'examples/server/tests/ **.*']
21
+ paths : ['.github/workflows/server.yml', '**/CMakeLists.txt', '**/Makefile', '**/*.h', '**/*.hpp', '**/*.c', '**/*.cpp', '**/*.cu', '**/*.swift', '**/*.m', 'examples/server/**.*']
18
22
schedule :
19
- - cron : ' 0 0 * * *'
23
+ - cron : ' 2 4 * * *'
20
24
21
25
concurrency :
22
26
group : ${{ github.workflow }}-${{ github.ref }}
@@ -44,25 +48,45 @@ jobs:
44
48
options : --cpus 4
45
49
46
50
steps :
47
- - name : Clone
48
- id : checkout
49
- uses : actions/checkout@v3
50
- with :
51
- fetch-depth : 0
52
-
53
51
- name : Dependencies
54
52
id : depends
55
53
run : |
56
54
apt-get update
57
55
apt-get -y install \
58
56
build-essential \
57
+ xxd \
59
58
git \
60
59
cmake \
61
60
python3-pip \
61
+ curl \
62
62
wget \
63
63
language-pack-en \
64
64
libcurl4-openssl-dev
65
65
66
+ - name : Clone
67
+ id : checkout
68
+ uses : actions/checkout@v3
69
+ with :
70
+ fetch-depth : 0
71
+ ref : ${{ github.event.inputs.sha || github.event.pull_request.head.sha || github.sha || github.head_ref || github.ref_name }}
72
+
73
+ - name : Verify server deps
74
+ id : verify_server_deps
75
+ run : |
76
+ git config --global --add safe.directory $(realpath .)
77
+ cd examples/server
78
+ git ls-files --others --modified
79
+ git status
80
+ ./deps.sh
81
+ git status
82
+ not_ignored_files="$(git ls-files --others --modified)"
83
+ echo "Modified files: ${not_ignored_files}"
84
+ if [ -n "${not_ignored_files}" ]; then
85
+ echo "Repository is dirty or server deps are not built as expected"
86
+ echo "${not_ignored_files}"
87
+ exit 1
88
+ fi
89
+
66
90
- name : Build
67
91
id : cmake_build
68
92
run : |
0 commit comments