Skip to content

install from ports#1

Merged
lispyclouds merged 2 commits into
babashka:mainfrom
fraggerfox:install-bb-from-native-ports
May 30, 2026
Merged

install from ports#1
lispyclouds merged 2 commits into
babashka:mainfrom
fraggerfox:install-bb-from-native-ports

Conversation

@fraggerfox

@fraggerfox fraggerfox commented May 30, 2026

Copy link
Copy Markdown
Contributor

This pull request updates the FreeBSD setup steps in the CI workflow to streamline package installation and ensure babashka is installed via the FreeBSD package manager instead of downloading a static binary. The changes improve reliability and maintainability of the CI process.

Upstream port details

Benchmark on baremetal FreeBSD

Tests from https://github.com/borkdude/cream#cream-vs-babashka

# bb -cp "$(clojure -Spath -Sdeps '{:deps {dev.weavejester/medley {:mvn/version "1.9.0"}}}')" -e '(time (require (quote [medley.core :as mc]))) (time (dotimes [i 100000] (mc/greatest 5 2 1 3 4)))'
"Elapsed time: 15.289707 msecs"
"Elapsed time: 145.200319 msecs"
#
# bb -cp "$(clojure -Spath -Sdeps '{:deps {camel-snake-kebab/camel-snake-kebab {:mvn/version "0.4.3"}}}')" -e '(time (require (quote [camel-snake-kebab.core :as csk]))) (time (dotimes [i 100000] (csk/->SCREAMING_SNAKE_CASE "I am constant")))'
"Elapsed time: 14.116047 msecs"
"Elapsed time: 1567.249085 msecs"
#

Loop provided by @lispyclouds

# bb -e "(time (let [x 0 j 10000000] (loop [i 0 j 10000000] (if (zero? j) i (recur (inc i) (dec j))))))"
"Elapsed time: 453.580157 msecs"
10000000
#

Pod test provided by @lispyclouds

# bb -e "(require '[babashka.pods :as pods]) (pods/load-pod 'org.babashka/go-sqlite3 \"0.3.9\") (require '[pod.babashka.go-sqlite3 :as sqlite]) (prn (sqlite/query \"/tmp/foo.db\" [\"select 1+1\"]))"
[{:1+1 2}]

CI workflow improvements:

  • Updated the FreeBSD package repository configuration in .github/workflows/ci.yml to explicitly set up the repository and use pkg update before installing packages.
  • Changed the installation method for babashka to use the FreeBSD package manager (pkg install -y babashka) instead of downloading and running a static Linux binary installer script.

@fraggerfox fraggerfox force-pushed the install-bb-from-native-ports branch from 59c75aa to 4bde246 Compare May 30, 2026 11:11
@fraggerfox fraggerfox marked this pull request as ready for review May 30, 2026 11:15
@lispyclouds

Copy link
Copy Markdown
Member

Looks good, lets add this as a test too:

bb -e "(require '[babashka.pods :as pods]) (pods/load-pod 'org.babashka/go-sqlite3 \"0.3.9\") (require '[pod.babashka.go-sqlite3 :as sqlite]) (prn (sqlite/query \"/tmp/foo.db\" [\"select 1+1\"]))"

@lispyclouds lispyclouds merged commit 7d94582 into babashka:main May 30, 2026
1 check passed
@lispyclouds

Copy link
Copy Markdown
Member

thanks a lot!

@fraggerfox fraggerfox deleted the install-bb-from-native-ports branch May 30, 2026 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants