Skip to content

Commit 65c5502

Browse files
committed
ci: move to macos13
macos12 CI is gone
1 parent 7c72a13 commit 65c5502

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

.github/workflows/tests.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ jobs:
7070
castxml-epic: 1
7171
cppstd: "-std=c++11"
7272

73-
- os: macos-12
73+
- os: macos-13
7474
compiler: xcode
7575
version: "default"
7676
python-version: "3.8"
@@ -96,7 +96,7 @@ jobs:
9696
run: |
9797
wget -q -O - https://data.kitware.com/api/v1/file/hashsum/sha512/bdbb67a10c5f8d1b738cd19cb074f409d4803e8077cb8c1072ef4eaf738fa871a73643f9c8282d58cae28d188df842c82ad6620b6d590b0396a0172a27438dce/download | tar zxf - -C ~/
9898
- name: Setup castxml for Mac
99-
if: matrix.os == 'macos-12'
99+
if: matrix.os == 'macos-13'
100100
run: |
101101
wget -q -O - https://data.kitware.com/api/v1/file/hashsum/sha512/5d937e938f7b882a3a3e7941e68f8312d0898aaf2082e00003dd362b1ba70b98b0a08706a1be28e71652a6a0f1e66f89768b5eaa20e5a100592d5b3deefec3f0/download | tar zxf - -C ~/
102102
- name: Run tests

tests/test_remove_template_defaults.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
# Distributed under the Boost Software License, Version 1.0.
44
# See http://www.boost.org/LICENSE_1_0.txt
55

6+
import platform
7+
68
import pytest
79

810
from . import autoconfig
@@ -20,7 +22,12 @@
2022
def global_ns():
2123
COMPILATION_MODE = parser.COMPILATION_MODE.ALL_AT_ONCE
2224
config = autoconfig.cxx_parsers_cfg.config.clone()
23-
config.cflags = "-std=c++11"
25+
if platform.system() == "Darwin":
26+
config.cflags = "-std=c++11 -Dat_quick_exit=atexit -Dquick_exit=exit"
27+
# https://fr.mathworks.com/matlabcentral/answers/2013982-clibgen-generatelibrarydefinition-error-the-global-scope-has-no-quick_exit-on-mac-m2#answer_1439856
28+
# https://github.com/jetbrains/kotlin/commit/d50f585911dedec5723213da8835707ac95e1c01
29+
else:
30+
config.cflags = "-std=c++11"
2431
decls = parser.parse(TEST_FILES, config, COMPILATION_MODE)
2532
global_ns = declarations.get_global_namespace(decls)
2633
global_ns.init_optimizer()

tests/test_source_reader.py

+6
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
# Distributed under the Boost Software License, Version 1.0.
44
# See http://www.boost.org/LICENSE_1_0.txt
55

6+
import platform
7+
68
import pytest
79

810
from . import autoconfig
@@ -19,6 +21,10 @@
1921
def global_ns():
2022
COMPILATION_MODE = parser.COMPILATION_MODE.ALL_AT_ONCE
2123
config = autoconfig.cxx_parsers_cfg.config.clone()
24+
if platform.system() == "Darwin":
25+
config.cflags = "-Dat_quick_exit=atexit -Dquick_exit=exit"
26+
# https://fr.mathworks.com/matlabcentral/answers/2013982-clibgen-generatelibrarydefinition-error-the-global-scope-has-no-quick_exit-on-mac-m2#answer_1439856
27+
# https://github.com/jetbrains/kotlin/commit/d50f585911dedec5723213da8835707ac95e1c01
2228
decls = parser.parse(TEST_FILES, config, COMPILATION_MODE)
2329
global_ns = declarations.get_global_namespace(decls)
2430
global_ns.init_optimizer()

0 commit comments

Comments
 (0)