@@ -4,19 +4,23 @@ name: Server
44on :
55  workflow_dispatch : #  allows manual triggering
66    inputs :
7+       sha :
8+         description : ' Commit SHA1 to build' 
9+         required : false 
10+         type : string 
711      slow_tests :
812        description : ' Run slow tests' 
913        required : true 
1014        type : boolean 
1115  push :
1216    branches :
1317      - 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 :
1620    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/**.*'] 
1822  schedule :
19-     -  cron : ' 0 0  * * *' 
23+     -  cron : ' 2 4  * * *' 
2024
2125concurrency :
2226  group : ${{ github.workflow }}-${{ github.ref }} 
@@ -44,25 +48,45 @@ jobs:
4448      options : --cpus 4 
4549
4650    steps :
47-       - name : Clone 
48-         id : checkout 
49-         uses : actions/checkout@v3 
50-         with :
51-           fetch-depth : 0 
52- 
5351      - name : Dependencies 
5452        id : depends 
5553        run : | 
5654          apt-get update 
5755          apt-get -y install \ 
5856            build-essential \ 
57+             xxd \ 
5958            git \ 
6059            cmake \ 
6160            python3-pip \ 
61+             curl \ 
6262            wget \ 
6363            language-pack-en \ 
6464            libcurl4-openssl-dev 
6565
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+ 
6690       - name : Build 
6791        id : cmake_build 
6892        run : | 
0 commit comments