-
Notifications
You must be signed in to change notification settings - Fork 44
97 lines (85 loc) · 3.01 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: Build + Test
on:
push:
branches:
- main
- dev
pull_request:
branches:
- main
- dev
- alpha-dev
workflow_dispatch:
jobs:
build-and-test:
runs-on: ${{ matrix.os }}
name: Testing on ${{ matrix.os }} with Python ${{ matrix.python }}
strategy:
matrix:
os:
- ubuntu-latest
# Disable MacOS for now - we do not yet officially support it and we need to invest a bit
# more efforts into investigating broken LAZ files written by Helios on MacOS.
# - macos-latest
- windows-latest
python:
- "3.8"
- "3.12"
defaults:
run:
# Conda requires a login shell in order to work properly
shell: bash -l {0}
steps:
- uses: actions/checkout@v4
- name: Create Helios dev environment
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
auto-activate-base: false
activate-environment: helios-dev
environment-file: environment-dev.yml
python-version: ${{ matrix.python }}
- name: Install Helios
run: |
python -m pip install -v .
- name: Run tests
run: |
python -m pytest -m exe
python -m pytest -m pyh
address-sanitizer:
name: Address Sanitizer
runs-on: ubuntu-latest
env:
ASAN_OPTIONS: "detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1"
defaults:
run:
# Conda requires a login shell in order to work properly
shell: bash -l {0}
steps:
- uses: actions/checkout@v4
- name: Create Helios dev environment
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
auto-activate-base: false
activate-environment: helios-dev
environment-file: environment-dev.yml
python-version: "3.11"
- name: Install Helios
run: |
python -m pip install -v .
env:
SKBUILD_CMAKE_BUILD_TYPE: "Debug"
SKBUILD_CMAKE_ARGS: "-DCMAKE_CXX_FLAGS=\"-fsanitize=address -fsanitize-address-use-after-scope -fno-omit-frame-pointer\""
- name: run python tests
shell: bash
# for LD_PRELOAD see https://github.com/google/sanitizers/issues/934#issuecomment-649516500
run: |
echo "leak:/usr/bin/bash" > supp.txt
# hack to prevent external libs from dlclosing libraries,
# which otherwise results in <module not found> LSAN leaks that cannot be suppressed
# https://github.com/google/sanitizers/issues/89#issuecomment-406316683
echo "#include <stdio.h>" > dlclose.c
echo "int dlclose(void *handle) { return 0; }" >> dlclose.c
clang -shared dlclose.c -o libdlclose.so
LSAN_OPTIONS=suppressions="$(pwd)/supp.txt" LD_PRELOAD="$(gcc -print-file-name=libasan.so) /usr/lib/x86_64-linux-gnu/libstdc++.so.6 $(pwd)/libdlclose.so" PYTHONMALLOC=malloc pytest -s