diff --git a/python/sdist/setup.py b/python/sdist/setup.py index 9dd268953a..d01a0ec75c 100755 --- a/python/sdist/setup.py +++ b/python/sdist/setup.py @@ -152,7 +152,9 @@ def get_extensions(): cmake_configure_options=[ *global_cmake_configure_options, "-Werror=dev" - if "GITHUB_ACTIONS" in os.environ + # Turn warnings in to errors on GitHub Actions, + # match original repo and forks with default name + if os.environ.get("GITHUB_REPOSITORY", "").endswith("/AMICI") else "-Wno-error=dev", "-DAMICI_PYTHON_BUILD_EXT_ONLY=ON", f"-DPython3_EXECUTABLE={Path(sys.executable).as_posix()}", diff --git a/scripts/buildAmici.sh b/scripts/buildAmici.sh index cb2428579c..22faece983 100755 --- a/scripts/buildAmici.sh +++ b/scripts/buildAmici.sh @@ -13,7 +13,7 @@ amici_build_dir="${amici_path}/build" mkdir -p "${amici_build_dir}" cd "${amici_build_dir}" -if [ "${GITHUB_ACTIONS:-}" = true ] || +if [[ "${GITHUB_REPOSITORY:-}" = *"/AMICI" ]] || [ "${ENABLE_AMICI_DEBUGGING:-}" = TRUE ] || [ "${ENABLE_GCOV_COVERAGE:-}" = TRUE ]; then # Running on CI server