Commit a30b965f authored by Louis Gesbert's avatar Louis Gesbert
Browse files

Static linking in CI

parent 717fb1ea
......@@ -18,9 +18,36 @@ build:
stage: build
image: registry.ocamlpro.com/ocamlpro/ocaml-docker-images:4.12
before_script:
- sudo apk add openssl-libs-static
- opam switch create . ocaml-system --deps-only --locked
- opam clean --switch-cleanup
script:
- |
echo >src/linking.sexp "\
(
-noautolink -verbose
-cclib -Wl,-Bstatic
-cclib -static
-cclib -no-pie
-cclib -static-libgcc
-cclib -lssl_stubs
-cclib -lssl
-cclib -lcrypto
-cclib -lcamlstr
-cclib -loverlap_stubs_stubs
-cclib -ldigestif_c_stubs
-cclib -lmtime_clock_stubs
-cclib -lrt
-cclib -lmirage_crypto_rng_unix_stubs
-cclib -lmirage_crypto_stubs
-cclib -lcstruct_stubs
-cclib -llwt_unix_stubs
-cclib -lev
-cclib -lthreadsnat
-cclib -lunix
-cclib -lbigstringaf_stubs
-cclib -lc
)"
- opam exec -- dune build --profile release @all
- opam exec -- dune runtest
- mv _build/default/src/server.exe .
......
......@@ -10,7 +10,7 @@
(name ocpsite)
(depends
(ocaml
(>= 4.12))
(>= 4.10))
(dream
(>= 1.0.0~alpha2))
(crunch
......
......@@ -3,7 +3,7 @@ opam-version: "2.0"
license: "ISC"
depends: [
"dune" {>= "2.0"}
"ocaml" {>= "4.12"}
"ocaml" {>= "4.10"}
"dream" {>= "1.0.0~alpha2"}
"crunch" {>= "3.2.0"}
"omd" {>= "2.0.0~alpha2"}
......
(executable
(public_name server)
(modules content server template)
(flags (:standard (:include linking.sexp)))
(libraries dream omd))
(rule
(target linking.sexp)
(mode fallback)
(action (with-stdout-to %{target} (run echo "()"))))
(rule
(targets template.ml)
(deps template.eml.html)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment