Skip to content

Commit 0d498da

Browse files
committed
Compile with AddressSanitizer
1 parent 5312e5f commit 0d498da

File tree

2 files changed

+21
-6
lines changed

2 files changed

+21
-6
lines changed

.github/workflows/linux.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,26 @@ jobs:
2828
python-is-python3
2929
robodoc
3030
31-
- name: Build etsf-io
31+
- name: Configure etsf-io
3232
run: |
3333
bash -e autogen.sh
3434
mkdir build/
3535
cd build/
3636
../configure
3737
make -j V=1
38+
env:
39+
FFLAGS: "-O0 -g3 -fno-omit-frame-pointer -fsanitize=address"
40+
LDFLAGS: "-fsanitize=address"
41+
42+
- name: Compile etsf-io
43+
working-directory: build/
44+
run: |
45+
make -j V=1
3846
3947
- name: Test etsf-io
48+
working-directory: build/
4049
run: |
41-
cd build/
42-
make check V=1
50+
make -j check V=1
4351
4452
- uses: actions/upload-artifact@v4
4553
if: always()

.github/workflows/macos.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,26 @@ jobs:
2424
echo PATH="/opt/homebrew/opt/libtool/libexec/gnubin:$PATH" >> $GITHUB_ENV
2525
echo FC=gfortran-14 >> $GITHUB_ENV
2626
27-
- name: Build etsf-io
27+
- name: Configure etsf-io
2828
run: |
2929
mkdir src/group_level/
3030
bash -e autogen.sh
3131
mkdir build/
3232
cd build/
3333
../configure --with-netcdf-incs="$(pkg-config --cflags netcdf-fortran)" --with-netcdf-libs="$(pkg-config --libs netcdf-fortran)"
34+
env:
35+
FFLAGS: "-O0 -g3 -fno-omit-frame-pointer -fsanitize=address"
36+
LDFLAGS: "-fsanitize=address"
37+
38+
- name: Compile etsf-io
39+
working-directory: build/
40+
run: |
3441
make -j V=1
3542
3643
# - name: Test etsf-io
44+
# working-directory: build/
3745
# run: |
38-
# cd build/
39-
# make check V=1
46+
# make -j check V=1
4047

4148
- uses: actions/upload-artifact@v4
4249
if: always()

0 commit comments

Comments
 (0)