Skip to content

Commit 365df52

Browse files
committed
Only run asan on ubuntu and not macos
1 parent f9b5b2c commit 365df52

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,16 @@ jobs:
7979
runs-on: ${{ matrix.os }}
8080
name: ${{ matrix.os == 'macos-14' && 'MacOS ARM' || (matrix.os == 'macos-13' && 'MacOS Intel' || 'Ubuntu') }} Build, Check, and Test
8181
timeout-minutes: 15
82+
env:
83+
asan-flag:
8284
steps:
85+
8386
- uses: actions/checkout@v4
8487

8588
- name: Download LLVM (Linux)
8689
if: matrix.os == 'ubuntu-latest'
90+
env:
91+
asan-flag: -sanitize:address
8792
run: |
8893
wget https://apt.llvm.org/llvm.sh
8994
chmod +x llvm.sh
@@ -124,13 +129,13 @@ jobs:
124129
- name: Odin check vendor/sdl3
125130
run: ./odin check vendor/sdl3 -strict-style -vet -disallow-do -no-entry-point
126131
- name: Normal Core library tests
127-
run: ./odin test tests/core/normal.odin -file -all-packages -vet -strict-style -disallow-do -define:ODIN_TEST_FANCY=false -define:ODIN_TEST_FAIL_ON_BAD_MEMORY=true -sanitize:address
132+
run: ./odin test tests/core/normal.odin -file -all-packages -vet -strict-style -disallow-do -define:ODIN_TEST_FANCY=false -define:ODIN_TEST_FAIL_ON_BAD_MEMORY=true $asan-flag
128133
- name: Optimized Core library tests
129-
run: ./odin test tests/core/speed.odin -o:speed -file -all-packages -vet -strict-style -disallow-do -define:ODIN_TEST_FANCY=false -define:ODIN_TEST_FAIL_ON_BAD_MEMORY=true -sanitize:address
134+
run: ./odin test tests/core/speed.odin -o:speed -file -all-packages -vet -strict-style -disallow-do -define:ODIN_TEST_FANCY=false -define:ODIN_TEST_FAIL_ON_BAD_MEMORY=true $asan-flag
130135
- name: Vendor library tests
131-
run: ./odin test tests/vendor -all-packages -vet -strict-style -disallow-do -define:ODIN_TEST_FANCY=false -define:ODIN_TEST_FAIL_ON_BAD_MEMORY=true -sanitize:address
136+
run: ./odin test tests/vendor -all-packages -vet -strict-style -disallow-do -define:ODIN_TEST_FANCY=false -define:ODIN_TEST_FAIL_ON_BAD_MEMORY=true $asan-flag
132137
- name: Internals tests
133-
run: ./odin test tests/internal -all-packages -vet -strict-style -disallow-do -define:ODIN_TEST_FANCY=false -define:ODIN_TEST_FAIL_ON_BAD_MEMORY=true -sanitize:address
138+
run: ./odin test tests/internal -all-packages -vet -strict-style -disallow-do -define:ODIN_TEST_FANCY=false -define:ODIN_TEST_FAIL_ON_BAD_MEMORY=true $asan-flag
134139
- name: GitHub Issue tests
135140
run: |
136141
cd tests/issues

0 commit comments

Comments
 (0)