fix mac build by AOT-ing sci (#9)

This commit is contained in:
Michiel Borkent 2019-08-15 09:02:43 +02:00 committed by GitHub
parent 5b414072f9
commit 9bb15c5411
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 19 additions and 12 deletions

View file

@ -46,7 +46,7 @@ jobs:
working_directory: ~/repo
environment:
LEIN_ROOT: "true"
GRAALVM_HOME: /home/circleci/graalvm-ce-19.1.1
GRAALVM_HOME: /home/circleci/graalvm-ce-19.2.0-dev
BABASHKA_PLATFORM: linux # used in release script
BABASHKA_TEST_ENV: native
steps:
@ -69,9 +69,9 @@ jobs:
name: Download GraalVM
command: |
cd ~
if ! [ -d graalvm-ce-19.1.1 ]; then
curl -O -sL https://github.com/oracle/graal/releases/download/vm-19.1.1/graalvm-ce-linux-amd64-19.1.1.tar.gz
tar xzf graalvm-ce-linux-amd64-19.1.1.tar.gz
if ! [ -d graalvm-ce-19.2.0-dev ]; then
curl -O -sL https://github.com/oracle/graal/releases/download/vm-19.2.0-dev-b01/graalvm-ce-linux-amd64-19.2.0-dev-b01.tar.gz
tar xzf graalvm-ce-linux-amd64-19.2.0-dev-b01.tar.gz
fi
- run:
name: Build binary
@ -93,7 +93,7 @@ jobs:
- save_cache:
paths:
- ~/.m2
- ~/graalvm-ce-19.1.1
- ~/graalvm-ce-19.2.0-dev
key: linux-{{ checksum "project.clj" }}-{{ checksum ".circleci/config.yml" }}
- store_artifacts:
path: /tmp/release
@ -102,7 +102,7 @@ jobs:
macos:
xcode: "9.0"
environment:
GRAALVM_HOME: /Users/distiller/graalvm-ce-19.1.1/Contents/Home
GRAALVM_HOME: /Users/distiller/graalvm-ce-19.2.0-dev/Contents/Home
BABASHKA_PLATFORM: macos # used in release script
BABASHKA_TEST_ENV: native
steps:
@ -124,9 +124,9 @@ jobs:
command: |
cd ~
ls -la
if ! [ -d graalvm-ce-19.1.1 ]; then
curl -O -sL https://github.com/oracle/graal/releases/download/vm-19.1.1/graalvm-ce-darwin-amd64-19.1.1.tar.gz
tar xzf graalvm-ce-darwin-amd64-19.1.1.tar.gz
if ! [ -d graalvm-ce-19.2.0-dev ]; then
curl -O -sL https://github.com/oracle/graal/releases/download/vm-19.2.0-dev-b01/graalvm-ce-darwin-amd64-19.2.0-dev-b01.tar.gz
tar xzf graalvm-ce-darwin-amd64-19.2.0-dev-b01.tar.gz
fi
- run:
name: Build binary
@ -148,7 +148,7 @@ jobs:
- save_cache:
paths:
- ~/.m2
- ~/graalvm-ce-19.1.1
- ~/graalvm-ce-19.2.0-dev
key: mac-{{ checksum "project.clj" }}-{{ checksum ".circleci/config.yml" }}
- store_artifacts:
path: /tmp/release

1
.gitignore vendored
View file

@ -12,3 +12,4 @@ pom.xml.asc
.hg/
/bb
.clj-kondo/.cache
/src/sci

View file

@ -9,7 +9,7 @@
:url "http://opensource.org/licenses/eclipse-1.0.php"}
:source-paths ["src"]
:dependencies [[org.clojure/clojure "1.9.0"]
[borkdude/sci "0.0.7-SNAPSHOT"]]
[borkdude/sci "0.0.7"]]
:profiles {:clojure-1.9.0 {:dependencies [[org.clojure/clojure "1.9.0"]]}
:clojure-1.10.1 {:dependencies [[org.clojure/clojure "1.10.1"]]}
:test {:dependencies [[clj-commons/conch "0.9.2"]]}

View file

@ -1,14 +1,20 @@
#!/usr/bin/env bash
set -eo pipefail
if [ -z "$GRAALVM_HOME" ]; then
echo "Please set GRAALVM_HOME"
exit 1
fi
"$GRAALVM_HOME/bin/gu" install native-image
"$GRAALVM_HOME/bin/gu" install native-image || true
BABASHKA_VERSION=$(cat resources/BABASHKA_VERSION)
( cd /tmp; git clone https://github.com/borkdude/sci 2> /dev/null || true )
mkdir -p src/sci
cp -R /tmp/sci/src/* src
lein with-profiles +clojure-1.10.1 do clean, uberjar
$GRAALVM_HOME/bin/native-image \
-jar target/babashka-$BABASHKA_VERSION-standalone.jar \