Commit graph

176 commits

Author SHA1 Message Date
Michiel Borkent
b7461756bf
chore: Upgrade to GraalVM 22.0.0.2 2022-01-25 18:04:38 +01:00
James Carnegie
3602b89512 Add metabom jars to all built docker images 2022-01-18 07:34:36 +00:00
Rahul De
2f6d363ee8
Revert: Add metabom jar to docker image(9cf6a1ae71) 2022-01-11 21:34:36 +00:00
James Carnegie
9cf6a1ae71 Add metabom jar to docker image 2022-01-11 19:03:51 +00:00
Gabriel Horner
665ae4dd97
Finish up library tests (#1120)
* Add tests for markdown-clj and tools.namespace

See comment for why only one markdown test could be run.
Closes #1069 and #1064

* Convert 10 test libs using add-libtest

Also improved add-libtest to only require maven artifact
and rely on clojars for getting git-url most of the time

* Convert 8 more test libs using add-libtest

Also updated table and added comment for newline test

* Fix doric test

* Disable tools.namespace test that fails on windows

* Added dozen manual test libs and converted 2 test libs

add-libtest.clj supports manually-added and test-directories options

* Converts last tests to test namespaces and write libraries.csv

* Add a number of library tests from projects.md

Also add more docs around adding test libs and tweak add script

* Use :sha for gitlib and older clojure cli

* Revert "Use :sha for gitlib and older clojure cli"

This reverts commit c663ab8368.

* Fix and disable failing tests

Disabled tests that fail consistently and fixed windows one
2021-12-29 16:35:14 +01:00
Michiel Borkent
818f2a9931
Upgrade Clojure CLI (#1121) 2021-12-28 11:09:31 +01:00
Michiel Borkent
8c770b41ac oops 2021-12-26 23:24:48 +01:00
Michiel Borkent
8abf58112e Publish dev release 2021-12-26 23:11:58 +01:00
Michiel Borkent
e710c66dcb Publish dev builds 2021-12-26 21:15:36 +01:00
Michiel Borkent
fb7f984389
[#1110] Load tasks and deps from other bb.edn file (#1117)
Co-authored-by: Bob <highpressurecarsalesman@gmail.com>
2021-12-26 17:26:35 +01:00
Gabriel Horner
3a30a11c1f
Add more library tests (#1114)
* Add environ and table tests

Also allow for directory option and fix nasty nil test-dir bug

* Add 7 libraries via add-libtest.clj

Added :branch option and saved additional info to bb-tested-libs.edn to
reproduce test fetching later

* Disable intermittent failing test
2021-12-22 21:27:29 +01:00
Gabriel Horner
4e7d04f672
Add libtest (#1112)
* Add add-libtest script and add 2 libraries with it

* Add tests for 3 existing libraries
2021-12-21 19:25:10 +01:00
Wes Morgan
bf51eeb26d
Allow building x86_64 or arm64 Docker images (#1095) 2021-12-07 22:15:57 +00:00
Johannes Lötzsch
ec4f9f95fb
fix script/compile #1089 (#1090)
Co-authored-by: Johannes Lötzsch <git@johannesloetzsch.de>
2021-12-05 12:05:05 +01:00
Nik
f06a749249
Add support for SQLite via a BABASHKA_FEATURE_SQLITE feature flag (#1079)
* implement native sqlite support as a feature flag following [1]

([1] is mentioned as a checklist of sorts as to how to add a new 
feature flag in [2])

[1] 13f65f05ae
[2] https://github.com/babashka/babashka/blob/master/doc/build.md

* bump to latest sqlite-jdbc, remove some no longer needed config+libs

based on feedback from borkdude here [1], bump xerial/sqlite-jdbc
3.36.0.3, which includes the graalvm classes and resource config
previously implemented via ericdallo/sqlite-jni-graal-fix and a `-H`
flag in `script/compile`

[1]: https://github.com/babashka/babashka/pull/1079#issuecomment-980533178
2021-11-28 09:34:54 +01:00
Michiel Borkent
c48ae27da3
Disable some service loader features for smaller image size (#1054)
This also excludes `java.awt.Toolkit`.

```
     -H:ServiceLoaderFeatureExcludeServices=java.net.ContentHandlerFactory \
     -H:ServiceLoaderFeatureExcludeServices=java.nio.charset.spi.CharsetProvider
```
2021-11-05 10:39:48 +01:00
Michiel Borkent
73c9f3b3ba
Add alias for musl (#1053) 2021-11-04 11:27:41 +01:00
Michiel Borkent
a9cc6e301e Bump to GraalVM 21.3.0 JVM 11 2021-11-04 11:01:41 +01:00
Bob
7df81f1273
make core.async and rewrite-clj integral (#1014)
* make core.async integral (not a feature)

tasks (in particular, parallel tasks) require core.async

* make rewrite_clj integral (not a feature)

* cleanup mistakes
2021-09-23 18:15:01 +02:00
Thiago Kenji Okada
9ca3a3bd31
Use Debian bullseye on CI/CD/Dockerfile (#1005)
* Migrate `Dockerfile` to use a bullseye-based image

Also, some QoL changes on the `Dockerfile`:
- Parametrize GRAALVM_VERSION to make it easier to update
- Remove installing programs already included on base image
- Remove `deps.edn` from `.dockerignore` since it is necessary to build

* Migrate CircleCI to use a bullseye-based image

Also some modifications necessary to make it work:
- Migrate from `circleci` images to `clojure` since they're out-of-date
  and also seem to be considered legacy:
  https://circleci.com/docs/2.0/circleci-images/#legacy-language-images
- Remove unnecessary usage of `sudo`, since all commands runs as root
- Sync packages with `Dockerfile`. This will make easier to test locally
  if everything will work (of course, it is not 100% guarantee)

* Remove lsof

* Remove "Install {Clojure,Leiningen}" steps

Already included on the base image.

* Do not change directory when downloading GraalVM

* Move "Download GraalVM" to script/download-graalvm

* Set GRAALVM_HOME correctly

* Unbreak mac build

* Revert "Set GRAALVM_HOME correctly"

This reverts commit 5e2a6158dc.

* Set GRAALVM_HOME correctly, take 2

* Improve download-graalvm script

* Re-added "Install Clojure" steps

* Set amd64 as default GRAALVM_ARCH

* Unbreak linux-aarch64

* Ubreak jvm

* Do not change directory

* Fix yaml

* Fix mac/linux-aarch64

* Add missing Clojure

* Fix cache

* Move GraalVM installation to /tmp

* Use script/install-clojure

* Use /opt instead of /tmp to install GraalVM

* Revert "Use /opt instead of /tmp to install GraalVM"

This reverts commit 3cfad03c8e.

* Use CircleCI's Clojure images again

* Go back to installing GraalVM on $HOME
2021-09-13 23:28:13 +02:00
Michiel Borkent
0f723a1e7c
Fix aarch64 test (#1007) 2021-09-11 18:13:12 +02:00
Michael Glaesemann
125e227976
Java http insecure context (#994)
* Add support for creating insecure context.

* Add BABASHKA_FEATURE_JAVA_NET_HTTP flag.

* Clean up java.net.http tests
2021-08-31 17:37:11 +02:00
Michiel Borkent
cebdd19c00
Upgrade to GraalVM 21.2.0 2021-08-30 20:16:18 +02:00
Bob
242c3d442f
Logging feature flag and tools.logging.readable (#981) (#987)
* put tools.logging behind a feature flag

* add tools.logging.readable

- move logging namespace to feature folder
- add logging.readable namespace
- add tests for logging.readable

* cleanup logging changes

- add logging env var to compile script
- remove unconditional require of logging namespace

* move old-config capture to before alter

* remove feature check from logging tests
2021-08-29 23:43:53 +02:00
Eric Dallo
72d3afa698
Migrate GraalVM configuration to jar (#973) 2021-08-22 23:19:28 +02:00
Thiago Kenji Okada
ef0af1244d
script: use musl from bullseye instead of unstable (#974)
Now that bullseye was released, Debian is starting to make bigger
changes on unstable. To avoid breakage, let's use musl from bullseye
that is the correct version that we were using until now (1.22-1):
https://packages.debian.org/bullseye/musl-tools

Eventually a better solution would be to simply use Debian bullseye to
compile everything, however the official Clojure image from Docker is
still using stretch. So this is a temporary solution until them.
2021-08-22 19:54:12 +02:00
Bob
ffd66d514a
add META-INF resource to windows compilation (to mirror linux compilation) (fixes #963) (#964) 2021-08-04 14:20:59 +02:00
Michiel Borkent
64fc58cd80 Update deps.edn on uberjar [skip ci] 2021-08-03 16:49:35 +02:00
Michiel Borkent
84430c60f8
[#720, #733] print-deps (#958) 2021-07-27 11:29:00 +02:00
Bob
a9e445e5a1
fix windows lib tests (#956)
- add lib-tests path to deps.edn and remove it from shell scripts
- change windows lib test batch script to write a bb.edn file
- re-enable native lib tests on windows
2021-07-25 23:49:01 +02:00
Bob
af6f94ef81
run lib tests in Windows CI (#933)
* run lib tests in Windows CI

- add batch scripts for invoking tests
- skip some tests on windows
- tweak a couple tests to run on linux and windows

* configure git to checkout with Windows line endings on Appveyor
2021-07-12 00:00:14 +02:00
Bob
16911a54f0
add more windows testing (#902)
- add default test selector to skip "windows only" tests
- in cases where the differences between *nix shell and windows shell
  make the test very messy, add a separate "windows only" test
- make more tests work on Windows
2021-06-24 22:34:57 +02:00
Bob
35e2cd9d05
make tests run on windows as the default (#235) (#898)
* make tests run on windows as the default

- change from selecting tests to run to selecting tests to skip (remove all :windows tags, add
  :skip-windows tag to tests that don't currently work on windows)
- handfuls of calls to `normalize` and `escape-file-paths` to handle platform differences
- split `task-test` to make most of the tests run on windows, and exclude just a couple of Unix-y tests

* make a binding name clearer

* skip nrepl-server-test on Windows

- test fails on CI, so disabling it for now

* unset bb environment vars after running tests

* unset bb environment var after running release-artifact

BABASHKA_EDN being set can interfere with some tests, so unset it before running the
native tests

* skip uberjar test on Windows

uberjar-test's 'throw on empty classpath' test failing on Windows native
 (but passes on JVM) - skip it for now
2021-06-20 09:23:58 +02:00
Bob
ce4702318a
add more windows testing (#894)
- just handling line endings and escaping backslashes in file paths
2021-06-18 23:51:46 +02:00
Bob
e056cb96aa
add more windows testing (#891)
- add `normalize` call to `bb-native` output
- add `escape-file-paths` function to double up backslashes for Windows paths
  passed as strings
- add :windows selector to about 10 more tests, along with various small changes
  for Windows testing
- update test.bat to more closely mirror the Linux/Mac test script
2021-06-17 19:43:43 +02:00
Michiel Borkent
90ac55d588
Start porting Windows tests (#235) (#887) 2021-06-16 11:01:17 +02:00
Michiel Borkent
35103f40ef
Upgrade to graal 21.1, fixes #884 (#885) 2021-06-13 21:53:07 +02:00
Michiel Borkent
6e4044c623 Async is not optional 2021-06-10 12:10:47 +02:00
Thiago Kenji Okada
4b4ada9617
Improve script/setup-musl (#867) 2021-05-25 18:52:30 +02:00
Michiel Borkent
6aca41a48a
[#829] Allow thread-first in combination with shell 2021-05-13 13:10:56 +02:00
Michiel Borkent
00fd7820c3 Fix Windows httpkit config 2021-05-11 14:16:35 +02:00
Thiago Kenji Okada
14e053e0a3
Add BABASHKA_MUSL build variable (#834)
This allows building a Babashka binary using musl C libraries instead,
instead of hardcoding this accordingly to the CPU arch.
2021-05-11 00:10:11 +02:00
Michiel Borkent
f8944f1286 Another bash fix 2021-05-10 23:27:54 +02:00
Michiel Borkent
a8528e4a4a Fix bash 2021-05-10 23:16:59 +02:00
Michiel Borkent
f4fb27be98 Fix bash script 2021-05-10 23:08:11 +02:00
Michiel Borkent
3800245849 musl 2021-05-10 23:03:46 +02:00
Michiel Borkent
798ec2e3d4 musl 2021-05-10 23:03:39 +02:00
Michiel Borkent
34bbea0204
Move setup-musl to .circleci scripts (#833) 2021-05-10 22:46:32 +02:00
Michiel Borkent
6edc26c834
[#831] Workaround for musl stack size issues 2021-05-10 18:29:26 +02:00
Thiago Kenji Okada
73d454be46
Add sha256sum check to zlib (#830)
Just to make sure that we are using the correct source code.
2021-05-10 17:33:10 +02:00