0
0
Fork 0
mirror of https://github.com/netdata/netdata.git synced 2025-03-14 13:12:55 +00:00
netdata_netdata/.github/workflows/checks.yml
dependabot[bot] c9dead369c
Bump tj-actions/changed-files from 44 to 45 (#18408)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-26 10:59:05 +03:00

122 lines
3.8 KiB
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
name: Checks
on:
push:
branches:
- master
pull_request: null
env:
DISABLE_TELEMETRY: 1
concurrency:
group: checks-${{ github.ref }}
cancel-in-progress: true
jobs:
file-check: # Check what files changed if were being run in a PR or on a push.
name: Check Modified Files
runs-on: ubuntu-latest
outputs:
run: ${{ steps.check-run.outputs.run }}
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: Check source files
id: check-source-files
uses: tj-actions/changed-files@v45
with:
since_last_remote_commit: ${{ github.event_name != 'pull_request' }}
files: |
**/*.c
**/*.cc
**/*.h
**/*.hh
**/*.in
**/*.patch
src/aclk/aclk-schemas/
src/ml/dlib/
src/fluent-bit/
src/web/server/h2o/libh2o/
files_ignore: |
netdata.spec.in
**/*.md
- name: Check build files
id: check-build-files
uses: tj-actions/changed-files@v45
with:
since_last_remote_commit: ${{ github.event_name != 'pull_request' }}
files: |
**/*.cmake
CMakeLists.txt
.gitignore
.github/data/distros.yml
.github/workflows/build.yml
packaging/cmake/
packaging/*.version
packaging/*.checksums
files_ignore: |
**/*.md
packaging/repoconfig/
- name: List all changed files in pattern
continue-on-error: true
env:
CHANGED_SOURCE_FILES: ${{ steps.check-source-files.outputs.all_changed_files }}
CHANGED_BUILD_FILES: ${{ steps.check-build-files.outputs.all_changed_files }}
run: |
for file in ${CHANGED_SOURCE_FILES} ${CHANGED_BUILD_FILES} ; do
echo "$file was changed"
done
- name: Check Run
id: check-run
run: |
if [ "${{ steps.check-source-files.outputs.any_modified }}" == "true" ] || [ "${{ steps.check-build-files.outputs.any_modified }}" == "true" ] || [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
echo 'run=true' >> "${GITHUB_OUTPUT}"
else
echo 'run=false' >> "${GITHUB_OUTPUT}"
fi
libressl-checks:
name: LibreSSL
needs:
- file-check
runs-on: ubuntu-latest
steps:
- name: Skip Check
id: skip
if: needs.file-check.outputs.run != 'true'
run: echo "SKIPPED"
- name: Checkout
if: needs.file-check.outputs.run == 'true'
uses: actions/checkout@v4
with:
submodules: recursive
- name: Build
if: needs.file-check.outputs.run == 'true'
run: >
docker run -v "$PWD":/netdata -w /netdata alpine:latest /bin/sh -c
'apk add bash;
./packaging/installer/install-required-packages.sh --dont-wait --non-interactive netdata;
apk del openssl openssl-dev;
apk add libressl libressl-dev protobuf-dev;
./netdata-installer.sh --disable-telemetry --dont-start-it --dont-wait --one-time-build --disable-go;'
clang-checks:
name: Clang
needs:
- file-check
runs-on: ubuntu-latest
steps:
- name: Skip Check
id: skip
if: needs.file-check.outputs.run != 'true'
run: echo "SKIPPED"
- name: Checkout
if: needs.file-check.outputs.run == 'true'
uses: actions/checkout@v4
with:
submodules: recursive
- name: Build
if: needs.file-check.outputs.run == 'true'
run: docker build -f .github/dockerfiles/Dockerfile.clang .