ci/lint: Set up tmate session #7
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: | |
run_lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up tmate session | |
uses: mxschmitt/action-tmate@v3 | |
timeout-minutes: 5 | |
with: | |
limit-access-to-actor: true | |
detached: true | |
- name: Set up compiler | |
uses: egor-tensin/setup-clang@v1 | |
with: | |
version: latest | |
platform: x64 | |
- name: Find intercept-build | |
run: | | |
echo $PATH | |
ls /bin | |
ls /usr/bin | |
ls /usr/local/bin | |
- 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 sh build.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 |