Skip to content

Commit c924ecc

Browse files
authored
Setup for clj-commons (#25)
1 parent 83452cb commit c924ecc

File tree

3 files changed

+149
-5
lines changed

3 files changed

+149
-5
lines changed

.circleci/config.yml

+135
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
version: 2.1
2+
3+
workflows:
4+
build-deploy:
5+
jobs:
6+
- build:
7+
filters:
8+
tags:
9+
only: /.*/
10+
11+
- deploy:
12+
requires:
13+
- build
14+
filters:
15+
tags:
16+
only: /Release-.*/
17+
context:
18+
- CLOJARS_DEPLOY
19+
20+
jobs:
21+
build:
22+
docker:
23+
# specify the version you desire here
24+
- image: clojure:openjdk-8-lein-2.9.8-bullseye
25+
26+
# Specify service dependencies here if necessary
27+
# CircleCI maintains a library of pre-built images
28+
# documented at https://circleci.com/docs/2.0/circleci-images/
29+
# - image: circleci/postgres:9.4
30+
31+
working_directory: ~/repo
32+
33+
environment:
34+
LEIN_ROOT: "true"
35+
# Customize the JVM maximum heap limit
36+
JVM_OPTS: -Xmx3200m
37+
38+
steps:
39+
- checkout
40+
41+
# Download and cache dependencies
42+
- restore_cache:
43+
keys:
44+
- v1-dependencies-{{ checksum "project.clj" }}
45+
# fallback to using the latest cache if no exact match is found
46+
- v1-dependencies-
47+
48+
- run: lein deps
49+
50+
- save_cache:
51+
paths:
52+
- ~/.m2
53+
key: v1-dependencies-{{ checksum "project.clj" }}
54+
55+
- run:
56+
name: Ensure No Reflection Warnings
57+
command: "! lein check 2>&1 | grep 'Reflection warning'"
58+
59+
# run tests!
60+
- run: lein do clean, test
61+
62+
deploy:
63+
docker:
64+
# specify the version you desire here
65+
- image: clojure:openjdk-8-lein-2.9.8-bullseye
66+
# Specify service dependencies here if necessary
67+
# CircleCI maintains a library of pre-built images
68+
# documented at https://circleci.com/docs/2.0/circleci-images/
69+
# - image: circleci/postgres:9.4
70+
71+
working_directory: ~/repo
72+
73+
environment:
74+
LEIN_ROOT: "true"
75+
# Customize the JVM maximum heap limit
76+
JVM_OPTS: -Xmx3200m
77+
78+
steps:
79+
- checkout
80+
81+
# Download and cache dependencies
82+
- restore_cache:
83+
keys:
84+
- v1-dependencies-{{ checksum "project.clj" }}
85+
# fallback to using the latest cache if no exact match is found
86+
- v1-dependencies-
87+
88+
# Download and cache dependencies
89+
- restore_cache:
90+
keys:
91+
- v1-dependencies-{{ checksum "project.clj" }}
92+
# fallback to using the latest cache if no exact match is found
93+
- v1-dependencies-
94+
95+
- run:
96+
name: Install babashka
97+
command: |
98+
curl -s https://raw.githubusercontent.com/borkdude/babashka/master/install -o install.sh
99+
bash install.sh
100+
rm install.sh
101+
- run:
102+
name: Install deployment-script
103+
command: |
104+
curl -s https://raw.githubusercontent.com/clj-commons/infra/main/deployment/circle-maybe-deploy.bb -o circle-maybe-deploy.bb
105+
chmod a+x circle-maybe-deploy.bb
106+
107+
- run: lein deps
108+
109+
- run:
110+
name: Setup GPG signing key
111+
command: |
112+
apt-get update
113+
apt-get install -y make gnupg
114+
GNUPGHOME="$HOME/.gnupg"
115+
export GNUPGHOME
116+
mkdir -p "$GNUPGHOME"
117+
chmod 0700 "$GNUPGHOME"
118+
119+
echo "$GPG_KEY" \
120+
| base64 --decode --ignore-garbage \
121+
| gpg --batch --allow-secret-key-import --import
122+
123+
gpg --keyid-format LONG --list-secret-keys
124+
125+
- save_cache:
126+
paths:
127+
- ~/.m2
128+
key: v1-dependencies-{{ checksum "project.clj" }}
129+
- run:
130+
name: Deploy
131+
command: |
132+
GPG_TTY=$(tty)
133+
export GPG_TTY
134+
echo $GPG_TTY
135+
./circle-maybe-deploy.bb lein deploy clojars

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
[![Clojars Project](https://img.shields.io/clojars/v/org.clj-commons/durable-queue.svg)](https://clojars.org/org.clj-commons/durable-queue)
2+
[![cljdoc badge](https://cljdoc.org/badge/org.clj-commons/durable-queue)](https://cljdoc.org/d/org.clj-commons/durable-queue)
3+
[![CircleCI](https://circleci.com/gh/clj-commons/durable-queue.svg?style=svg)](https://circleci.com/gh/clj-commons/durable-queue)
4+
15
![](docs/EasterIsland.jpg)
26

37
This library implements a disk-backed task queue, allowing for queues that can survive processes dying, and whose size is bounded by available disk rather than memory. It is a small, purely-Clojure implementation focused entirely on the in-process use case, meaning that it is both simpler and more easily embedded than network-aware queue implementations such as Kafka and ActiveMQ.

project.clj

+10-5
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
1-
(defproject factual/durable-queue "0.1.6"
1+
(defproject org.clj-commons/durable-queue
2+
(or (System/getenv "PROJECT_VERSION") "0.1.6")
23
:description "a in-process task-queue that is backed by disk."
4+
:url "https://github.com/clj-commons/durable-queue"
35
:license {:name "Eclipse Public License"
46
:url "http://www.eclipse.org/legal/epl-v10.html"}
7+
:deploy-repositories [["clojars" {:url "https://repo.clojars.org"
8+
:username :env/clojars_username
9+
:password :env/clojars_password
10+
:sign-releases true}]]
511
:dependencies [[com.taoensso/nippy "2.8.0"]
612
[primitive-math "0.1.4"]
713
[byte-streams "0.2.2"]]
8-
:profiles {:dev {:dependencies [[org.clojure/clojure "1.5.1"]
9-
[criterium "0.4.3"]
10-
[codox-md "0.2.0" :exclusions [org.clojure/clojure]]]}}
14+
:profiles {:dev {:dependencies [[org.clojure/clojure "1.10.0"]
15+
[criterium "0.4.6"]
16+
]}}
1117
:global-vars {*warn-on-reflection* true}
1218
:test-selectors {:default #(not (some #{:benchmark :stress} (keys %)))
1319
:benchmark :benchmark
1420
:stress :stress}
15-
:plugins [[codox "0.6.6"]]
1621
:codox {:writer codox-md.writer/write-docs
1722
:include [durable-queue]}
1823
:jvm-opts ^:replace ["-server" "-Xmx100m"])

0 commit comments

Comments
 (0)