From 79df7d2386cd7d376456465a0d7341939af12694 Mon Sep 17 00:00:00 2001 From: Pierrick HYMBERT Date: Sun, 31 Mar 2024 12:23:52 +0200 Subject: [PATCH] ci: server: verify deps are coherent with the commit --- .github/workflows/server.yml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/server.yml b/.github/workflows/server.yml index f07d2553669af..bb6568b8495b2 100644 --- a/.github/workflows/server.yml +++ b/.github/workflows/server.yml @@ -11,12 +11,12 @@ on: push: branches: - 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] - 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: - - cron: '0 0 * * *' + - cron: '2 4 * * *' concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -63,6 +63,18 @@ jobs: language-pack-en \ libcurl4-openssl-dev + - name: Verify server deps + id: verify_server_deps + run: | + cd examples/server + ./deps.sh + not_ignored_files="$(git ls-files --others)" + 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 id: cmake_build run: |