Test compiler and tools for memory leaks #8
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: Test compiler and tools for memory leaks | |
on: | |
# This is for passing required checks | |
pull_request: | |
merge_group: | |
jobs: | |
leaktest: | |
# Skip this for PRs | |
if: github.event_name != 'pull_request' | |
name: Compiler and tools leak test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Decrease kernel address randomization | |
# Works around https://github.com/actions/runner-images/issues/9491 | |
run: sudo sysctl vm.mmap_rnd_bits=28 | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
filter: tree:0 | |
- name: Enable annotations | |
run: echo "::add-matcher::.github/nim-problem-matcher.json" | |
- name: Build release binaries with LeakSanitizer | |
run: | | |
./koch.py all-strict \ | |
-d:useMalloc \ | |
-d:leakTest \ | |
--passC:-fsanitize=leak \ | |
--passC:"-fno-omit-frame-pointer -mno-omit-leaf-frame-pointer" \ | |
--passL:-fsanitize=leak \ | |
--debuginfo \ | |
--linedir | |
- name: Run tools tests | |
run: ./koch.py testTools | |
# NOTE: We don't run the full test suite here as self-bootstrap | |
# and tools testsuite can be considered enough to rat out memory leaks | |
# within the compiler itself. |