Skip to content

Commit 561c8b8

Browse files
committed
ci: server: verify deps are coherent with the commit
1 parent c50a82c commit 561c8b8

File tree

1 file changed

+29
-10
lines changed

1 file changed

+29
-10
lines changed

.github/workflows/server.yml

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ on:
1111
push:
1212
branches:
1313
- master
14-
paths: ['.github/workflows/server.yml', '**/CMakeLists.txt', '**/Makefile', '**/*.h', '**/*.hpp', '**/*.c', '**/*.cpp', '**/*.cu', '**/*.swift', '**/*.m', 'examples/server/tests/**.*']
15-
pull_request:
14+
paths: ['.github/workflows/server.yml', '**/CMakeLists.txt', '**/Makefile', '**/*.h', '**/*.hpp', '**/*.c', '**/*.cpp', '**/*.cu', '**/*.swift', '**/*.m', 'examples/server/**.*']
15+
pull_request_target:
1616
types: [opened, synchronize, reopened]
17-
paths: ['.github/workflows/server.yml', '**/CMakeLists.txt', '**/Makefile', '**/*.h', '**/*.hpp', '**/*.c', '**/*.cpp', '**/*.cu', '**/*.swift', '**/*.m', 'examples/server/tests/**.*']
17+
paths: ['.github/workflows/server.yml', '**/CMakeLists.txt', '**/Makefile', '**/*.h', '**/*.hpp', '**/*.c', '**/*.cpp', '**/*.cu', '**/*.swift', '**/*.m', 'examples/server/**.*']
1818
schedule:
19-
- cron: '0 0 * * *'
19+
- cron: '2 4 * * *'
2020

2121
concurrency:
2222
group: ${{ github.workflow }}-${{ github.ref }}
@@ -44,25 +44,44 @@ jobs:
4444
options: --cpus 4
4545

4646
steps:
47-
- name: Clone
48-
id: checkout
49-
uses: actions/checkout@v3
50-
with:
51-
fetch-depth: 0
52-
5347
- name: Dependencies
5448
id: depends
5549
run: |
5650
apt-get update
5751
apt-get -y install \
5852
build-essential \
53+
xxd \
5954
git \
6055
cmake \
6156
python3-pip \
57+
curl \
6258
wget \
6359
language-pack-en \
6460
libcurl4-openssl-dev
6561
62+
- name: Clone
63+
id: checkout
64+
uses: actions/checkout@v3
65+
with:
66+
fetch-depth: 0
67+
68+
- name: Verify server deps
69+
id: verify_server_deps
70+
run: |
71+
git config --global --add safe.directory $(realpath .)
72+
cd examples/server
73+
git ls-files --others --modified
74+
git status
75+
./deps.sh
76+
git status
77+
not_ignored_files="$(git ls-files --others --modified)"
78+
echo "Modified files: ${not_ignored_files}"
79+
if [ -n "${not_ignored_files}" ]; then
80+
echo "Repository is dirty or server deps are not built as expected"
81+
echo "${not_ignored_files}"
82+
exit 1
83+
fi
84+
6685
- name: Build
6786
id: cmake_build
6887
run: |

0 commit comments

Comments
 (0)