tests/chown: Add dependency to test to make sure dependency files are… #209
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Linting and extra checks | |
on: [push, workflow_dispatch] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up compiler | |
uses: egor-tensin/setup-clang@v1 | |
with: | |
version: latest | |
platform: x64 | |
- name: Install intercept-build | |
run: sudo apt install clang-tools | |
- name: Get all source files | |
run: echo "SRC=$(find src -name "*.[ch]" -print0 -o -path src/flamingo -prune -type f | xargs -0 echo)" >> $GITHUB_ENV | |
- name: Build (with LSP output) | |
run: intercept-build-15 sh bootstrap.sh | |
- name: Run clang-tidy | |
run: clang-tidy $SRC | |
- name: Make sure 'mkdir_wrapped' is used everywhere (except for once for 'fsutils.c') | |
run: | | |
if [ $(cat $SRC | grep "[^\"]mkdir(" | wc -l) -gt 1 ]; then | |
echo "Error: 'mkdir' is used in multiple places. Use 'mkdir_wrapped' instead." | |
exit 1 | |
fi | |
- name: Make sure 'realerpath' is used everywhere (except for once for 'fsutils.c') | |
run: | | |
if [ $(cat $SRC | grep "[^\"]realpath(" | wc -l) -gt 1 ]; then | |
echo "Error: 'realpath' is used in multiple places. Use 'realerpath' instead." | |
exit 1 | |
fi | |
- name: Set up tmate session | |
if: ${{ failure() }} | |
uses: mxschmitt/action-tmate@v3 | |
timeout-minutes: 5 | |
with: | |
limit-access-to-actor: true | |
detached: true |