Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try to make etc/ci_test.sh work #1033

Merged
merged 6 commits into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ Manifest.toml
/tags
*.log
/coverage/
*.gcov
/override/
7 changes: 5 additions & 2 deletions etc/ci_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,20 @@ mkdir -p coverage
#
cd pkg/JuliaInterface
pwd
# Force recompilation of JuliaInterface with coverage instrumentation
CFLAGS="--coverage" LDFLAGS="--coverage" FORCE_JULIAINTERFACE_COMPILATION=true ${GAP} --nointeract
${GAP} makedoc.g
${GAP} --cover ../../coverage/JuliaInterface.coverage tst/testall.g || AnyFailures=Yes
gcov -o gen/src/.libs src/*.c*
gcov -o gen/src/ src/*.c*
# Remove JuliaInterface with coverage instrumentation
make clean
cd ../..
lgoettgens marked this conversation as resolved.
Show resolved Hide resolved

#
cd pkg/JuliaExperimental
pwd
${GAP} makedoc.g
${GAP} --cover ../../coverage/JuliaExperimental.coverage tst/testall.g || AnyFailures=Yes
gcov -o gen/src/.libs src/*.c*
cd ../..

if [ ${AnyFailures} = Yes ]
Expand Down
8 changes: 8 additions & 0 deletions src/julia-config.jl
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ function ldflags()
elseif !Sys.isapple()
fl = fl * " -Wl,--export-dynamic"
end
env_var = get(ENV, "LDFLAGS", nothing)
if !isnothing(env_var)
fl = fl * " " * env_var
end
return fl
end

Expand All @@ -63,5 +67,9 @@ function cflags()
if Sys.isunix()
print(flags, " -fPIC")
end
env_var = get(ENV, "CFLAGS", nothing)
if !isnothing(env_var)
print(flags, " ", env_var)
end
return String(take!(flags))
end
4 changes: 2 additions & 2 deletions src/setup.jl
Original file line number Diff line number Diff line change
Expand Up @@ -212,13 +212,13 @@ function build_JuliaInterface(sysinfo::Dict{String, String})
# paths involve spaces, but then we likely will haves problem in other
# places; in any case, if anybody ever cares about this, we can work on
# finding a better solution.
JULIA_CPPFLAGS = filter(c -> c != '\'', cflags())
JULIA_CFLAGS = filter(c -> c != '\'', cflags())
JULIA_LDFLAGS = filter(c -> c != '\'', ldflags())
JULIA_LIBS = filter(c -> c != '\'', ldlibs())

jipath = joinpath(@__DIR__, "..", "pkg", "JuliaInterface")
cd(jipath) do
withenv("CFLAGS" => JULIA_CPPFLAGS,
withenv("CFLAGS" => JULIA_CFLAGS,
"LDFLAGS" => JULIA_LDFLAGS * " " * JULIA_LIBS) do
run(pipeline(`./configure $(gaproot())`, stdout="build.log"))
run(pipeline(`make V=1 -j$(Sys.CPU_THREADS)`, stdout="build.log", append=true))
Expand Down
Loading