@@ -3,12 +3,13 @@ let install_project_deps opam_repo_commit os arch =
33 match os with
44 | `Macos -> " ~/local"
55 | `Linux -> " /usr"
6+ | `Freebsd -> " /usr/local"
67 | `Windows | `Cygwin -> failwith " Windows and Cygwin not supported"
78 in
89 let ln =
910 match os with
1011 | `Macos -> " ln"
11- | `Linux -> " sudo ln"
12+ | `Linux | `Freebsd -> " sudo ln"
1213 | `Windows | `Cygwin -> failwith " Windows and Cygwin not supported"
1314 in
1415 let open Obuilder_spec in
@@ -26,19 +27,24 @@ let install_project_deps opam_repo_commit os arch =
2627 Obuilder_spec.Cache. v " homebrew"
2728 ~target: " /Users/mac1000/Library/Caches/Homebrew" ;
2829 ]
30+ | `Freebsd ->
31+ [
32+ Obuilder_spec.Cache. v " opam-archives"
33+ ~target: " /usr/home/opam/.opam/download-cache" ;
34+ ]
2935 | `Windows | `Cygwin -> failwith " Windows and Cygwin not supported"
3036 in
3137 let network = [ " host" ] in
3238 let home_dir =
3339 match os with
3440 | `Macos -> None
35- | `Linux -> Some " /src"
41+ | `Linux | `Freebsd -> Some " /src"
3642 | `Windows | `Cygwin -> failwith " Windows and Cygwin not supported"
3743 in
3844 let work_dir =
3945 match os with
4046 | `Macos -> " ./src/"
41- | `Linux -> " ./"
47+ | `Linux | `Freebsd -> " ./"
4248 | `Windows | `Cygwin -> failwith " Windows and Cygwin not supported"
4349 in
4450 let setup_pins =
@@ -103,7 +109,7 @@ let v opam_repo_commit base os arch =
103109 let home_dir =
104110 match os with
105111 | `Macos -> " ./src"
106- | `Linux -> " /src"
112+ | `Linux | `Freebsd -> " /src"
107113 | `Windows | `Cygwin -> failwith " Windows and Cygwin not supported"
108114 in
109115 let run_build =
@@ -116,7 +122,7 @@ let v opam_repo_commit base os arch =
116122 in
117123 match os with
118124 | `Macos -> run " cd ./src && %s" build_and_test
119- | `Linux -> run " %s" build_and_test
125+ | `Linux | `Freebsd -> run " %s" build_and_test
120126 | `Windows | `Cygwin -> failwith " Windows and Cygwin not supported"
121127 in
122128 let opam_repo_commit = Current_git.Commit_id. hash opam_repo_commit in
0 commit comments