-
Notifications
You must be signed in to change notification settings - Fork 12
56 lines (53 loc) · 1.64 KB
/
main.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
name: main
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ '8', '11', '17', '21']
name: Java ${{ matrix.java }}
steps:
- uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
architecture: x64
- name: Cache m2 repository
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/project.clj') }}
restore-keys: |
${{ runner.os }}-m2-
- name: Install dependencies
run: lein deps
- name: Run lein check
if: matrix.java == '11'
run: >-
! lein update-in :global-vars assoc '*unchecked-math*' :warn-on-boxed -- check 2>&1 > /dev/null |
grep cljam |
sed -E 's/^Reflection warning, ([^:]+):([0-9]+):([0-9]+) - (.*)$/::warning file=\1,line=\2,col=\3::\4/;s/^Boxed math warning, ([^:]+):([0-9]+):([0-9]+) - (.*)$/::warning file=\1,line=\2,col=\3::\4/' |
grep '::warning'
- name: Run tests
run: |
lein with-profile +dev:+1.8:+1.9 test
deploy:
needs: [build]
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'temurin'
architecture: x64
- name: Deploy
env:
CLOJARS_USERNAME: ${{ secrets.CLOJARS_USERNAME }}
CLOJARS_PASSWORD: ${{ secrets.CLOJARS_PASSWORD }}
run: ./deploy-snapshot.sh