forked from clj-kondo/clj-kondo
-
Notifications
You must be signed in to change notification settings - Fork 0
114 lines (99 loc) · 2.94 KB
/
ci.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
native:
if: "!contains(github.event.head_commit.message, 'skip ci')"
strategy:
matrix:
include:
- os: macos-12
name: macos
static: false
#- os: ubuntu-latest
# name: linux
# static: false
#- os: ubuntu-latest
# name: linux
# static: true
runs-on: ${{ matrix.os }}
env:
LEIN_ROOT: "true"
CLJ_KONDO_PLATFORM: linux # used in release script
CLJ_KONDO_TEST_ENV: native
steps:
- name: Git checkout
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Cache deps
uses: actions/cache@v2
id: cache-deps
with:
path: ~/.m2/repository
key: v1-dependencies-${{ hashFiles('deps.edn') }}
restore-keys: v1-dependencies-
- name: Install clojure tools
uses: DeLaGuardo/setup-clojure@12.5
with:
cli: latest
lein: latest
bb: latest
- name: Setup GraalVM
if: "matrix.static == false"
uses: graalvm/setup-graalvm@v1
with:
version: '22.3.0'
java-version: '11'
components: 'native-image'
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup GraalVM+musl
if: "matrix.static == true"
uses: graalvm/setup-graalvm@v1
with:
version: '22.3.0'
java-version: '11'
components: 'native-image'
native-image-musl: true
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install native dev tools
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get -y install build-essential zlib1g-dev
- name: Build native image
if: "matrix.static == false"
run: script/compile
- name: Build static native image
if: "matrix.static == true"
env:
CLJ_KONDO_STATIC: "true"
CLJ_KONDO_MUSL: "true"
run: script/compile
- name: Test binary
run: script/test
- name: Performace Report
run: .circleci/script/performance
- name: Release
run: .circleci/script/release
- name: clj-kondo version
id: clj-kondo-version
run: |
CLJ_KONDO_VERSION=$(cat resources/CLJ_KONDO_VERSION)
echo "##[set-output name=version;]${CLJ_KONDO_VERSION}"
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
path: clj-kondo
name: clj-kondo-${{ steps.clj-kondo-version.outputs.version }}-${{ matrix.name }}-amd64
- name: Upload static artifact
if: "matrix.static == true"
uses: actions/upload-artifact@v4
with:
path: clj-kondo
name: clj-kondo-${{ steps.clj-kondo-version.outputs.version }}-${{ matrix.name }}-static-amd64