-
Notifications
You must be signed in to change notification settings - Fork 28
65 lines (63 loc) · 1.97 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: build
on:
- push
- pull_request
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: lein with-profile +test deps
- name: Check Clojure code style
run: lein with-profile +test cljfmt check
- name: Run the static code analyzer
run: lein with-profile +test kibit
- name: Lint the code with Eastwood
run: lein with-profile +test eastwood || true
- name: Check the dependencies are up-to-date
run: lein with-profile +test ancient || true
test:
runs-on: ubuntu-latest
name: ${{ matrix.java }}
strategy:
matrix:
java: [ '8', '11', '16' ]
env:
LIBSODIUM_VERSION: 1.0.18
steps:
- uses: actions/checkout@v2
- name: Setup JDK
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: ${{ matrix.java }}
- name: Cache dependencies
uses: actions/cache@v2
env:
cache-name: cache-deps
with:
path: |
~/.lein
~/.m2
libsodium-build
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.LIBSODIUM_VERSION }}-${{ hashFiles('project.clj') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-${{ env.LIBSODIUM_VERSION }}-
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Show lein/JDK version
run: lein version
- name: Install libsodium
run: ./.github/scripts/install-libsodium.sh
- name: Install dependencies
run: lein with-profile +test deps
- name: Run tests
run: lein test
- name: Gather code coverage stats
run: lein with-profile +test cloverage --codecov
- name: Upload coverage data to codecov.io
run: bash <(curl -s https://codecov.io/bash) -f target/coverage/codecov.json
- name: Attempt to AOT compile caesium.sodium
run: lein compile caesium.sodium