2019-08-09 12:51:42 +00:00
|
|
|
# Clojure CircleCI 2.0 configuration file
|
|
|
|
|
#
|
|
|
|
|
# Check https://circleci.com/docs/2.0/language-clojure/ for more details
|
|
|
|
|
#
|
|
|
|
|
version: 2.1
|
|
|
|
|
jobs:
|
|
|
|
|
jvm:
|
2020-02-29 12:24:16 +00:00
|
|
|
docker:
|
2019-08-09 12:51:42 +00:00
|
|
|
# specify the version you desire here
|
2020-05-23 12:53:28 +00:00
|
|
|
- image: circleci/clojure:lein-2.9.1
|
2019-08-09 12:51:42 +00:00
|
|
|
working_directory: ~/repo
|
|
|
|
|
environment:
|
|
|
|
|
LEIN_ROOT: "true"
|
2020-01-04 19:04:29 +00:00
|
|
|
BABASHKA_PLATFORM: linux # could be used in jar name
|
2020-04-05 21:51:26 +00:00
|
|
|
resource_class: large
|
2019-08-09 12:51:42 +00:00
|
|
|
steps:
|
|
|
|
|
- checkout
|
2019-08-17 10:42:20 +00:00
|
|
|
- run:
|
|
|
|
|
name: "Pull Submodules"
|
|
|
|
|
command: |
|
|
|
|
|
git submodule init
|
2019-09-04 12:37:07 +00:00
|
|
|
git submodule update
|
2019-08-09 12:51:42 +00:00
|
|
|
- restore_cache:
|
|
|
|
|
keys:
|
2020-06-17 11:30:22 +00:00
|
|
|
- v1-dependencies-{{ checksum "project.clj" }}-{{ checksum "deps.edn" }}
|
2019-08-09 12:51:42 +00:00
|
|
|
# fallback to using the latest cache if no exact match is found
|
|
|
|
|
- v1-dependencies-
|
|
|
|
|
- run:
|
|
|
|
|
name: Install Clojure
|
|
|
|
|
command: |
|
|
|
|
|
wget -nc https://download.clojure.org/install/linux-install-1.10.1.447.sh
|
|
|
|
|
chmod +x linux-install-1.10.1.447.sh
|
|
|
|
|
sudo ./linux-install-1.10.1.447.sh
|
2019-09-02 10:50:37 +00:00
|
|
|
- run:
|
|
|
|
|
name: Install lsof
|
|
|
|
|
command: |
|
|
|
|
|
sudo apt-get install lsof
|
2019-08-09 12:51:42 +00:00
|
|
|
- run:
|
|
|
|
|
name: Run JVM tests
|
|
|
|
|
command: |
|
2020-05-18 15:08:34 +00:00
|
|
|
export BABASHKA_FEATURE_JDBC=true
|
|
|
|
|
export BABASHKA_FEATURE_POSTGRESQL=true
|
2019-08-09 12:51:42 +00:00
|
|
|
script/test
|
2020-02-19 22:58:49 +00:00
|
|
|
script/run_lib_tests
|
2019-08-09 12:51:42 +00:00
|
|
|
# - run:
|
|
|
|
|
# name: Run as tools.deps dependency
|
|
|
|
|
# command: |
|
|
|
|
|
# .circleci/script/tools.deps
|
|
|
|
|
- run:
|
|
|
|
|
name: Run as lein command
|
|
|
|
|
command: |
|
|
|
|
|
.circleci/script/lein
|
2020-01-01 20:57:46 +00:00
|
|
|
- run:
|
|
|
|
|
name: Create uberjar
|
|
|
|
|
command: |
|
|
|
|
|
mkdir -p /tmp/release
|
2020-04-28 10:03:01 +00:00
|
|
|
script/uberjar
|
2020-01-01 20:57:46 +00:00
|
|
|
VERSION=$(cat resources/BABASHKA_VERSION)
|
2021-04-20 22:10:59 +00:00
|
|
|
jar=target/babashka-$VERSION-standalone.jar
|
|
|
|
|
cp $jar /tmp/release
|
|
|
|
|
|
|
|
|
|
java -jar $jar script/reflection.clj
|
|
|
|
|
reflection="babashka-$VERSION-reflection.json"
|
|
|
|
|
BABASHKA_EDN=".build/bb.edn" java -jar "$jar" release-artifact "$jar"
|
|
|
|
|
BABASHKA_EDN=".build/bb.edn" java -jar "$jar" release-artifact "$reflection"
|
2020-01-01 20:57:46 +00:00
|
|
|
- store_artifacts:
|
|
|
|
|
path: /tmp/release
|
|
|
|
|
destination: release
|
2019-08-09 12:51:42 +00:00
|
|
|
- save_cache:
|
|
|
|
|
paths:
|
|
|
|
|
- ~/.m2
|
2020-06-17 11:30:22 +00:00
|
|
|
key: v1-dependencies-{{ checksum "project.clj" }}-{{ checksum "deps.edn" }}
|
2019-08-09 12:51:42 +00:00
|
|
|
linux:
|
|
|
|
|
docker:
|
2020-05-23 12:53:28 +00:00
|
|
|
- image: circleci/clojure:lein-2.9.1
|
2019-08-09 12:51:42 +00:00
|
|
|
working_directory: ~/repo
|
|
|
|
|
environment:
|
|
|
|
|
LEIN_ROOT: "true"
|
2021-02-07 11:23:20 +00:00
|
|
|
GRAALVM_HOME: /home/circleci/graalvm-ce-java11-21.0.0
|
2019-08-09 12:51:42 +00:00
|
|
|
BABASHKA_PLATFORM: linux # used in release script
|
|
|
|
|
BABASHKA_TEST_ENV: native
|
2020-05-23 12:53:28 +00:00
|
|
|
BABASHKA_XMX: "-J-Xmx6500m"
|
2020-04-05 21:51:26 +00:00
|
|
|
resource_class: large
|
2020-02-23 21:05:00 +00:00
|
|
|
steps:
|
|
|
|
|
- checkout
|
|
|
|
|
- run:
|
|
|
|
|
name: "Pull Submodules"
|
|
|
|
|
command: |
|
|
|
|
|
git submodule init
|
|
|
|
|
git submodule update
|
|
|
|
|
- restore_cache:
|
|
|
|
|
keys:
|
|
|
|
|
- linux-{{ checksum "project.clj" }}-{{ checksum ".circleci/config.yml" }}
|
|
|
|
|
- run:
|
|
|
|
|
name: Install Clojure
|
|
|
|
|
command: |
|
|
|
|
|
wget https://download.clojure.org/install/linux-install-1.10.1.447.sh
|
|
|
|
|
chmod +x linux-install-1.10.1.447.sh
|
|
|
|
|
sudo ./linux-install-1.10.1.447.sh
|
|
|
|
|
- run:
|
|
|
|
|
name: Install lsof
|
|
|
|
|
command: |
|
|
|
|
|
sudo apt-get install lsof
|
|
|
|
|
- run:
|
|
|
|
|
name: Install native dev tools
|
|
|
|
|
command: |
|
|
|
|
|
sudo apt-get update
|
|
|
|
|
sudo apt-get -y install gcc g++ zlib1g-dev
|
|
|
|
|
- run:
|
|
|
|
|
name: Download GraalVM
|
|
|
|
|
command: |
|
|
|
|
|
cd ~
|
2021-02-07 11:23:20 +00:00
|
|
|
if ! [ -d graalvm-ce-java11-21.0.0 ]; then
|
|
|
|
|
curl -O -sL https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-21.0.0/graalvm-ce-java11-linux-amd64-21.0.0.tar.gz
|
|
|
|
|
tar xzf graalvm-ce-java11-linux-amd64-21.0.0.tar.gz
|
2020-02-23 21:05:00 +00:00
|
|
|
fi
|
|
|
|
|
- run:
|
|
|
|
|
name: Build binary
|
|
|
|
|
command: |
|
2020-04-28 10:03:01 +00:00
|
|
|
script/uberjar
|
2020-02-23 21:05:00 +00:00
|
|
|
script/compile
|
|
|
|
|
no_output_timeout: 30m
|
|
|
|
|
- run:
|
|
|
|
|
name: Run tests
|
|
|
|
|
command: |
|
|
|
|
|
script/test
|
|
|
|
|
script/run_lib_tests
|
|
|
|
|
- run:
|
|
|
|
|
name: Release
|
|
|
|
|
command: |
|
|
|
|
|
.circleci/script/release
|
2021-01-02 16:43:33 +00:00
|
|
|
- persist_to_workspace:
|
|
|
|
|
root: /tmp
|
|
|
|
|
paths:
|
|
|
|
|
- release
|
2020-02-23 21:05:00 +00:00
|
|
|
- save_cache:
|
|
|
|
|
paths:
|
|
|
|
|
- ~/.m2
|
2021-02-07 11:23:20 +00:00
|
|
|
- ~/graalvm-ce-java11-21.0.0
|
2020-02-23 21:05:00 +00:00
|
|
|
key: linux-{{ checksum "project.clj" }}-{{ checksum ".circleci/config.yml" }}
|
|
|
|
|
- store_artifacts:
|
|
|
|
|
path: /tmp/release
|
|
|
|
|
destination: release
|
|
|
|
|
- run:
|
|
|
|
|
name: Publish artifact link to Slack
|
|
|
|
|
command: |
|
2021-02-07 11:23:20 +00:00
|
|
|
./bb .circleci/script/publish_artifact.clj || true
|
2020-02-23 21:05:00 +00:00
|
|
|
linux-static:
|
|
|
|
|
docker:
|
2020-05-23 12:53:28 +00:00
|
|
|
- image: circleci/clojure:lein-2.9.1
|
2020-02-23 21:05:00 +00:00
|
|
|
working_directory: ~/repo
|
|
|
|
|
environment:
|
|
|
|
|
LEIN_ROOT: "true"
|
2021-02-07 11:23:20 +00:00
|
|
|
GRAALVM_HOME: /home/circleci/graalvm-ce-java11-21.0.0
|
2021-04-09 15:40:01 +00:00
|
|
|
BABASHKA_PLATFORM: linux # used in release script
|
2020-02-23 21:05:00 +00:00
|
|
|
BABASHKA_TEST_ENV: native
|
2021-01-02 15:00:28 +00:00
|
|
|
BABASHKA_STATIC: "true"
|
2020-05-23 12:53:28 +00:00
|
|
|
BABASHKA_XMX: "-J-Xmx6500m"
|
2020-04-05 21:51:26 +00:00
|
|
|
resource_class: large
|
2019-08-09 12:51:42 +00:00
|
|
|
steps:
|
|
|
|
|
- checkout
|
2021-01-03 13:18:34 +00:00
|
|
|
- attach_workspace:
|
|
|
|
|
at: /tmp
|
2019-08-17 10:42:20 +00:00
|
|
|
- run:
|
|
|
|
|
name: "Pull Submodules"
|
|
|
|
|
command: |
|
|
|
|
|
git submodule init
|
2019-09-04 12:37:07 +00:00
|
|
|
git submodule update
|
2021-01-03 14:57:30 +00:00
|
|
|
- run:
|
|
|
|
|
name: "Short circuit on SNAPSHOT"
|
|
|
|
|
command: |
|
|
|
|
|
VERSION=$(cat resources/BABASHKA_VERSION)
|
|
|
|
|
if [[ "$VERSION" == *-SNAPSHOT ]]
|
|
|
|
|
then
|
|
|
|
|
circleci task halt
|
|
|
|
|
fi
|
2019-08-09 12:51:42 +00:00
|
|
|
- restore_cache:
|
|
|
|
|
keys:
|
|
|
|
|
- linux-{{ checksum "project.clj" }}-{{ checksum ".circleci/config.yml" }}
|
|
|
|
|
- run:
|
|
|
|
|
name: Install Clojure
|
|
|
|
|
command: |
|
|
|
|
|
wget https://download.clojure.org/install/linux-install-1.10.1.447.sh
|
|
|
|
|
chmod +x linux-install-1.10.1.447.sh
|
|
|
|
|
sudo ./linux-install-1.10.1.447.sh
|
2019-09-02 10:50:37 +00:00
|
|
|
- run:
|
|
|
|
|
name: Install lsof
|
|
|
|
|
command: |
|
|
|
|
|
sudo apt-get install lsof
|
2019-08-09 12:51:42 +00:00
|
|
|
- run:
|
|
|
|
|
name: Install native dev tools
|
|
|
|
|
command: |
|
|
|
|
|
sudo apt-get update
|
2019-11-20 20:34:31 +00:00
|
|
|
sudo apt-get -y install gcc g++ zlib1g-dev
|
2019-08-09 12:51:42 +00:00
|
|
|
- run:
|
|
|
|
|
name: Download GraalVM
|
|
|
|
|
command: |
|
|
|
|
|
cd ~
|
2021-02-07 11:23:20 +00:00
|
|
|
if ! [ -d graalvm-ce-java11-21.0.0 ]; then
|
|
|
|
|
curl -O -sL https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-21.0.0/graalvm-ce-java11-linux-amd64-21.0.0.tar.gz
|
|
|
|
|
tar xzf graalvm-ce-java11-linux-amd64-21.0.0.tar.gz
|
2019-08-09 12:51:42 +00:00
|
|
|
fi
|
|
|
|
|
- run:
|
|
|
|
|
name: Build binary
|
|
|
|
|
command: |
|
2020-04-28 10:03:01 +00:00
|
|
|
script/uberjar
|
2019-08-09 12:51:42 +00:00
|
|
|
script/compile
|
|
|
|
|
no_output_timeout: 30m
|
|
|
|
|
- run:
|
|
|
|
|
name: Run tests
|
|
|
|
|
command: |
|
|
|
|
|
script/test
|
2020-01-07 08:33:37 +00:00
|
|
|
script/run_lib_tests
|
2019-08-09 12:51:42 +00:00
|
|
|
- run:
|
|
|
|
|
name: Release
|
|
|
|
|
command: |
|
|
|
|
|
.circleci/script/release
|
2021-01-03 13:18:34 +00:00
|
|
|
- persist_to_workspace:
|
|
|
|
|
root: /tmp
|
|
|
|
|
paths:
|
|
|
|
|
- release
|
2019-08-09 12:51:42 +00:00
|
|
|
- save_cache:
|
|
|
|
|
paths:
|
|
|
|
|
- ~/.m2
|
2021-02-07 11:23:20 +00:00
|
|
|
- ~/graalvm-ce-java11-21.0.0
|
2019-08-09 12:51:42 +00:00
|
|
|
key: linux-{{ checksum "project.clj" }}-{{ checksum ".circleci/config.yml" }}
|
|
|
|
|
- store_artifacts:
|
|
|
|
|
path: /tmp/release
|
|
|
|
|
destination: release
|
2020-01-07 11:58:27 +00:00
|
|
|
- run:
|
|
|
|
|
name: Publish artifact link to Slack
|
|
|
|
|
command: |
|
2021-02-07 11:23:20 +00:00
|
|
|
./bb .circleci/script/publish_artifact.clj || true
|
2021-03-15 15:56:32 +00:00
|
|
|
linux-aarch64:
|
|
|
|
|
machine:
|
|
|
|
|
enabled: true
|
|
|
|
|
image: ubuntu-2004:202101-01
|
|
|
|
|
resource_class: arm.large
|
|
|
|
|
working_directory: ~/repo
|
|
|
|
|
environment:
|
|
|
|
|
LEIN_ROOT: "true"
|
|
|
|
|
GRAALVM_HOME: /home/circleci/graalvm-ce-java11-21.0.0
|
|
|
|
|
BABASHKA_PLATFORM: linux # used in release script
|
|
|
|
|
BABASHKA_ARCH: aarch64
|
|
|
|
|
BABASHKA_TEST_ENV: native
|
|
|
|
|
BABASHKA_XMX: "-J-Xmx6500m"
|
|
|
|
|
steps:
|
|
|
|
|
- checkout
|
|
|
|
|
- run:
|
|
|
|
|
name: "Pull Submodules"
|
|
|
|
|
command: |
|
|
|
|
|
git submodule init
|
|
|
|
|
git submodule update
|
2021-04-09 14:59:20 +00:00
|
|
|
- run:
|
|
|
|
|
name: "Short circuit on SNAPSHOT"
|
|
|
|
|
command: |
|
|
|
|
|
VERSION=$(cat resources/BABASHKA_VERSION)
|
|
|
|
|
if [[ "$VERSION" == *-SNAPSHOT ]]
|
|
|
|
|
then
|
|
|
|
|
circleci task halt
|
|
|
|
|
fi
|
2021-04-09 14:56:26 +00:00
|
|
|
- restore_cache:
|
|
|
|
|
keys:
|
|
|
|
|
- linux-aarch64-{{ checksum "project.clj" }}-{{ checksum ".circleci/config.yml" }}
|
2021-03-15 15:56:32 +00:00
|
|
|
- run:
|
2021-04-09 14:56:26 +00:00
|
|
|
name: Install Leiningen
|
2021-03-15 15:56:32 +00:00
|
|
|
command: |
|
2021-04-09 14:56:26 +00:00
|
|
|
sudo script/install-leiningen
|
|
|
|
|
- run:
|
|
|
|
|
name: Install Clojure
|
|
|
|
|
command: |
|
|
|
|
|
wget https://download.clojure.org/install/linux-install-1.10.1.447.sh
|
|
|
|
|
chmod +x linux-install-1.10.1.447.sh
|
|
|
|
|
sudo ./linux-install-1.10.1.447.sh
|
|
|
|
|
- run:
|
|
|
|
|
name: Install lsof
|
|
|
|
|
command: |
|
|
|
|
|
sudo apt-get install lsof
|
|
|
|
|
- run:
|
|
|
|
|
name: Install native dev tools
|
|
|
|
|
command: |
|
|
|
|
|
sudo apt-get update
|
|
|
|
|
sudo apt-get -y install gcc g++ zlib1g-dev
|
|
|
|
|
- run:
|
|
|
|
|
name: Download GraalVM
|
|
|
|
|
command: |
|
|
|
|
|
cd ~
|
|
|
|
|
if ! [ -d graalvm-ce-java11-21.0.0 ]; then
|
|
|
|
|
curl -O -sL https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-21.0.0/graalvm-ce-java11-linux-aarch64-21.0.0.tar.gz
|
|
|
|
|
tar xzf graalvm-ce-java11-linux-aarch64-21.0.0.tar.gz
|
2021-03-15 15:56:32 +00:00
|
|
|
fi
|
2021-04-09 14:56:26 +00:00
|
|
|
- run:
|
|
|
|
|
name: Build binary
|
|
|
|
|
command: |
|
|
|
|
|
script/uberjar
|
|
|
|
|
script/compile
|
|
|
|
|
no_output_timeout: 30m
|
|
|
|
|
- run:
|
|
|
|
|
name: Run tests
|
|
|
|
|
command: |
|
|
|
|
|
script/test
|
|
|
|
|
script/run_lib_tests
|
|
|
|
|
- run:
|
|
|
|
|
name: Release
|
|
|
|
|
command: |
|
|
|
|
|
.circleci/script/release
|
|
|
|
|
- persist_to_workspace:
|
|
|
|
|
root: /tmp
|
|
|
|
|
paths:
|
|
|
|
|
- release
|
|
|
|
|
- save_cache:
|
|
|
|
|
paths:
|
|
|
|
|
- ~/.m2
|
|
|
|
|
- ~/graalvm-ce-java11-21.0.0
|
|
|
|
|
key: linux-aarch64-{{ checksum "project.clj" }}-{{ checksum ".circleci/config.yml" }}
|
|
|
|
|
- store_artifacts:
|
|
|
|
|
path: /tmp/release
|
|
|
|
|
destination: release
|
|
|
|
|
- run:
|
|
|
|
|
name: Publish artifact link to Slack
|
|
|
|
|
command: |
|
|
|
|
|
./bb .circleci/script/publish_artifact.clj || true
|
|
|
|
|
linux-aarch64-static:
|
|
|
|
|
machine:
|
|
|
|
|
enabled: true
|
|
|
|
|
image: ubuntu-2004:202101-01
|
|
|
|
|
resource_class: arm.large
|
|
|
|
|
working_directory: ~/repo
|
|
|
|
|
environment:
|
|
|
|
|
LEIN_ROOT: "true"
|
|
|
|
|
GRAALVM_HOME: /home/circleci/graalvm-ce-java11-21.0.0
|
2021-04-09 15:40:01 +00:00
|
|
|
BABASHKA_PLATFORM: linux # used in release script
|
2021-04-09 14:56:26 +00:00
|
|
|
BABASHKA_ARCH: aarch64
|
|
|
|
|
BABASHKA_TEST_ENV: native
|
|
|
|
|
BABASHKA_XMX: "-J-Xmx6500m"
|
|
|
|
|
BABASHKA_STATIC: "true"
|
|
|
|
|
steps:
|
|
|
|
|
- checkout
|
|
|
|
|
- run:
|
|
|
|
|
name: "Pull Submodules"
|
|
|
|
|
command: |
|
|
|
|
|
git submodule init
|
|
|
|
|
git submodule update
|
2021-04-11 19:37:12 +00:00
|
|
|
- run:
|
|
|
|
|
name: "Short circuit on SNAPSHOT"
|
|
|
|
|
command: |
|
|
|
|
|
VERSION=$(cat resources/BABASHKA_VERSION)
|
|
|
|
|
if [[ "$VERSION" == *-SNAPSHOT ]]
|
|
|
|
|
then
|
|
|
|
|
circleci task halt
|
|
|
|
|
fi
|
2021-03-15 15:56:32 +00:00
|
|
|
- restore_cache:
|
|
|
|
|
keys:
|
2021-03-15 22:03:38 +00:00
|
|
|
- linux-aarch64-{{ checksum "project.clj" }}-{{ checksum ".circleci/config.yml" }}
|
2021-03-15 15:56:32 +00:00
|
|
|
- run:
|
|
|
|
|
name: Install Leiningen
|
|
|
|
|
command: |
|
|
|
|
|
sudo script/install-leiningen
|
|
|
|
|
- run:
|
|
|
|
|
name: Install Clojure
|
|
|
|
|
command: |
|
|
|
|
|
wget https://download.clojure.org/install/linux-install-1.10.1.447.sh
|
|
|
|
|
chmod +x linux-install-1.10.1.447.sh
|
|
|
|
|
sudo ./linux-install-1.10.1.447.sh
|
|
|
|
|
- run:
|
|
|
|
|
name: Install lsof
|
|
|
|
|
command: |
|
|
|
|
|
sudo apt-get install lsof
|
|
|
|
|
- run:
|
|
|
|
|
name: Install native dev tools
|
|
|
|
|
command: |
|
|
|
|
|
sudo apt-get update
|
|
|
|
|
sudo apt-get -y install gcc g++ zlib1g-dev
|
|
|
|
|
- run:
|
|
|
|
|
name: Download GraalVM
|
|
|
|
|
command: |
|
|
|
|
|
cd ~
|
|
|
|
|
if ! [ -d graalvm-ce-java11-21.0.0 ]; then
|
|
|
|
|
curl -O -sL https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-21.0.0/graalvm-ce-java11-linux-aarch64-21.0.0.tar.gz
|
|
|
|
|
tar xzf graalvm-ce-java11-linux-aarch64-21.0.0.tar.gz
|
|
|
|
|
fi
|
|
|
|
|
- run:
|
|
|
|
|
name: Build binary
|
|
|
|
|
command: |
|
|
|
|
|
script/uberjar
|
|
|
|
|
script/compile
|
|
|
|
|
no_output_timeout: 30m
|
|
|
|
|
- run:
|
|
|
|
|
name: Run tests
|
|
|
|
|
command: |
|
|
|
|
|
script/test
|
|
|
|
|
script/run_lib_tests
|
|
|
|
|
- run:
|
|
|
|
|
name: Release
|
|
|
|
|
command: |
|
|
|
|
|
.circleci/script/release
|
|
|
|
|
- persist_to_workspace:
|
|
|
|
|
root: /tmp
|
|
|
|
|
paths:
|
|
|
|
|
- release
|
|
|
|
|
- save_cache:
|
|
|
|
|
paths:
|
|
|
|
|
- ~/.m2
|
|
|
|
|
- ~/graalvm-ce-java11-21.0.0
|
2021-03-15 22:03:38 +00:00
|
|
|
key: linux-aarch64-{{ checksum "project.clj" }}-{{ checksum ".circleci/config.yml" }}
|
2021-03-15 15:56:32 +00:00
|
|
|
- store_artifacts:
|
|
|
|
|
path: /tmp/release
|
|
|
|
|
destination: release
|
|
|
|
|
- run:
|
|
|
|
|
name: Publish artifact link to Slack
|
|
|
|
|
command: |
|
|
|
|
|
./bb .circleci/script/publish_artifact.clj || true
|
2019-08-09 12:51:42 +00:00
|
|
|
mac:
|
|
|
|
|
macos:
|
2020-09-18 19:32:08 +00:00
|
|
|
xcode: "12.0.0"
|
2019-08-09 12:51:42 +00:00
|
|
|
environment:
|
2020-09-22 11:13:45 +00:00
|
|
|
MACOSX_DEPLOYMENT_TARGET: 10.13 # 10.12 is EOL
|
2021-02-07 11:23:20 +00:00
|
|
|
GRAALVM_HOME: /Users/distiller/graalvm-ce-java11-21.0.0/Contents/Home
|
2019-08-09 12:51:42 +00:00
|
|
|
BABASHKA_PLATFORM: macos # used in release script
|
|
|
|
|
BABASHKA_TEST_ENV: native
|
2020-05-23 12:53:28 +00:00
|
|
|
BABASHKA_XMX: "-J-Xmx6500m"
|
2020-04-05 21:51:26 +00:00
|
|
|
resource_class: large
|
2019-08-09 12:51:42 +00:00
|
|
|
steps:
|
|
|
|
|
- checkout
|
2019-08-17 10:42:20 +00:00
|
|
|
- run:
|
|
|
|
|
name: "Pull Submodules"
|
|
|
|
|
command: |
|
|
|
|
|
git submodule init
|
2019-09-04 12:37:07 +00:00
|
|
|
git submodule update
|
2019-08-09 12:51:42 +00:00
|
|
|
- restore_cache:
|
|
|
|
|
keys:
|
|
|
|
|
- mac-{{ checksum "project.clj" }}-{{ checksum ".circleci/config.yml" }}
|
|
|
|
|
- run:
|
|
|
|
|
name: Install Clojure
|
|
|
|
|
command: |
|
2020-03-30 18:29:08 +00:00
|
|
|
script/install-clojure /usr/local
|
2019-08-09 12:51:42 +00:00
|
|
|
- run:
|
|
|
|
|
name: Install Leiningen
|
|
|
|
|
command: |
|
2020-03-30 18:29:08 +00:00
|
|
|
script/install-leiningen
|
2019-08-09 12:51:42 +00:00
|
|
|
- run:
|
|
|
|
|
name: Download GraalVM
|
|
|
|
|
command: |
|
|
|
|
|
cd ~
|
|
|
|
|
ls -la
|
2021-02-07 11:23:20 +00:00
|
|
|
if ! [ -d graalvm-ce-java11-21.0.0 ]; then
|
|
|
|
|
curl -O -sL https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-21.0.0/graalvm-ce-java11-darwin-amd64-21.0.0.tar.gz
|
|
|
|
|
tar xzf graalvm-ce-java11-darwin-amd64-21.0.0.tar.gz
|
2019-08-09 12:51:42 +00:00
|
|
|
fi
|
|
|
|
|
- run:
|
|
|
|
|
name: Build binary
|
|
|
|
|
command: |
|
2020-05-23 12:53:28 +00:00
|
|
|
export PATH=$GRAALVM_HOME/bin:$PATH
|
2020-04-28 10:03:01 +00:00
|
|
|
script/uberjar
|
2019-08-09 12:51:42 +00:00
|
|
|
script/compile
|
|
|
|
|
no_output_timeout: 30m
|
|
|
|
|
- run:
|
|
|
|
|
name: Run tests
|
|
|
|
|
command: |
|
2020-05-23 12:53:28 +00:00
|
|
|
export PATH=$GRAALVM_HOME/bin:$PATH
|
2019-08-09 12:51:42 +00:00
|
|
|
script/test
|
2020-01-07 08:33:37 +00:00
|
|
|
script/run_lib_tests
|
2019-08-09 12:51:42 +00:00
|
|
|
- run:
|
|
|
|
|
name: Release
|
|
|
|
|
command: |
|
|
|
|
|
.circleci/script/release
|
|
|
|
|
- save_cache:
|
|
|
|
|
paths:
|
|
|
|
|
- ~/.m2
|
2021-02-07 11:23:20 +00:00
|
|
|
- ~/graalvm-ce-java11-21.0.0
|
2019-08-09 12:51:42 +00:00
|
|
|
key: mac-{{ checksum "project.clj" }}-{{ checksum ".circleci/config.yml" }}
|
|
|
|
|
- store_artifacts:
|
|
|
|
|
path: /tmp/release
|
|
|
|
|
destination: release
|
2020-01-07 11:58:27 +00:00
|
|
|
- run:
|
|
|
|
|
name: Publish artifact link to Slack
|
|
|
|
|
command: |
|
2021-02-07 11:23:20 +00:00
|
|
|
./bb .circleci/script/publish_artifact.clj || true
|
2019-08-09 12:51:42 +00:00
|
|
|
deploy:
|
2020-04-05 21:51:26 +00:00
|
|
|
resource_class: large
|
2019-08-09 12:51:42 +00:00
|
|
|
docker:
|
2020-05-23 12:53:28 +00:00
|
|
|
- image: circleci/clojure:lein-2.9.1
|
2019-08-09 12:51:42 +00:00
|
|
|
working_directory: ~/repo
|
|
|
|
|
environment:
|
|
|
|
|
LEIN_ROOT: "true"
|
|
|
|
|
steps:
|
|
|
|
|
- checkout
|
2019-08-17 10:42:20 +00:00
|
|
|
- run:
|
|
|
|
|
name: "Pull Submodules"
|
|
|
|
|
command: |
|
|
|
|
|
git submodule init
|
2019-09-04 12:37:07 +00:00
|
|
|
git submodule update
|
2019-08-09 12:51:42 +00:00
|
|
|
- restore_cache:
|
|
|
|
|
keys:
|
|
|
|
|
- v1-dependencies-{{ checksum "project.clj" }}
|
|
|
|
|
# fallback to using the latest cache if no exact match is found
|
|
|
|
|
- v1-dependencies-
|
|
|
|
|
- run: .circleci/script/deploy
|
|
|
|
|
- save_cache:
|
|
|
|
|
paths:
|
|
|
|
|
- ~/.m2
|
|
|
|
|
key: v1-dependencies-{{ checksum "project.clj" }}
|
2020-02-09 21:55:12 +00:00
|
|
|
docker:
|
|
|
|
|
docker:
|
|
|
|
|
- image: circleci/buildpack-deps:stretch
|
|
|
|
|
steps:
|
|
|
|
|
- checkout
|
2021-01-02 15:00:28 +00:00
|
|
|
- attach_workspace:
|
2021-01-02 16:43:33 +00:00
|
|
|
at: /tmp
|
2020-10-01 10:23:34 +00:00
|
|
|
- setup_remote_docker:
|
|
|
|
|
version: 19.03.12
|
2020-02-09 21:55:12 +00:00
|
|
|
- run:
|
|
|
|
|
name: Build Docker image
|
|
|
|
|
command: .circleci/script/docker
|
2019-08-09 12:51:42 +00:00
|
|
|
|
|
|
|
|
workflows:
|
|
|
|
|
version: 2
|
|
|
|
|
ci:
|
|
|
|
|
jobs:
|
|
|
|
|
- jvm
|
|
|
|
|
- linux
|
2020-02-23 21:05:00 +00:00
|
|
|
- linux-static
|
2019-08-09 12:51:42 +00:00
|
|
|
- mac
|
2021-03-15 15:56:32 +00:00
|
|
|
- linux-aarch64
|
2021-04-09 14:59:20 +00:00
|
|
|
- linux-aarch64-static
|
2019-08-09 12:51:42 +00:00
|
|
|
- deploy:
|
|
|
|
|
filters:
|
|
|
|
|
branches:
|
|
|
|
|
only: master
|
|
|
|
|
requires:
|
|
|
|
|
- jvm
|
|
|
|
|
- linux
|
|
|
|
|
- mac
|
2020-02-09 21:55:12 +00:00
|
|
|
- docker:
|
|
|
|
|
filters:
|
|
|
|
|
branches:
|
|
|
|
|
only: master
|
|
|
|
|
requires:
|
|
|
|
|
- linux
|
2021-01-03 13:18:34 +00:00
|
|
|
- linux-static
|