Skip to content

Commit 5069776

Browse files
committed
chore: start implementation on github actions
1 parent 875cbcf commit 5069776

File tree

5 files changed

+110
-0
lines changed

5 files changed

+110
-0
lines changed

.github/renovate.json5

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3+
"extends": [
4+
"config:recommended",
5+
],
6+
"packageRules": [
7+
]
8+
}

.github/workflows/ci.yml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
---
2+
name: "ci_checks"
3+
"on":
4+
pull_request: null
5+
push:
6+
branches:
7+
- "main"
8+
- "initial-version"
9+
workflow_dispatch: null
10+
concurrency:
11+
group: "${{ github.workflow }}-${{ github.ref }}"
12+
cancel-in-progress: true
13+
jobs:
14+
gradleCheck:
15+
name: "run checks using gradlew"
16+
runs-on: "ubuntu-latest"
17+
env:
18+
SEGMENT_DOWNLOAD_TIMEOUT_MINS: "15"
19+
steps:
20+
- name: "Checkout"
21+
uses: "actions/checkout@v4"
22+
with:
23+
fetch-depth: 0
24+
- name: "Install JDK 21"
25+
uses: "actions/setup-java@v4"
26+
with:
27+
distribution: "graalvm"
28+
java-version: 21
29+
- name: "Setup Gradle"
30+
uses: "gradle/actions/setup-gradle@v4"
31+
- name: "Run check on build-logic subproject"
32+
run: "./gradlew :build-logic:check --no-configuration-cache"
33+
- name: "Make sure usage files are up to date"
34+
run: "./gradlew generateUsage"
35+
- name: "Run check on project"
36+
run: "./gradlew check"
37+
- name: "junit result"
38+
uses: "mikepenz/action-junit-report@v4"
39+
if: "always()"
40+
with:
41+
check_name: "JUnit Report"
42+
report_paths: "**/build/test-results/test/*.xml"
43+
nativeCompile:
44+
name: "run nativeCompile on relevant platforms"
45+
needs: "gradleCheck"
46+
strategy:
47+
matrix:
48+
runner:
49+
- "ubuntu-latest"
50+
- "ubuntu-24.04-arm"
51+
- "windows-latest"
52+
- "macos-latest"
53+
- "macos-13"
54+
fail-fast: false
55+
runs-on: "${{ matrix.runner }}"
56+
env:
57+
SEGMENT_DOWNLOAD_TIMEOUT_MINS: "15"
58+
BUILDCACHE_LOCAL_DEFAULT_DIRECTORY: "true"
59+
steps:
60+
- name: "Checkout"
61+
uses: "actions/checkout@v4"
62+
with:
63+
fetch-depth: 0
64+
- name: "Install JDK 21"
65+
uses: "actions/setup-java@v4"
66+
with:
67+
distribution: "graalvm"
68+
java-version: 21
69+
- name: "Setup Gradle"
70+
uses: "gradle/actions/setup-gradle@v4"
71+
- name: "Run gradle build"
72+
run: "./gradlew nativeCompile"
73+
- name: "Check if binary works"
74+
run: "./gradlew testCliNative testCliNativeNpm"
75+
- name: "junit result"
76+
uses: "mikepenz/action-junit-report@v4"
77+
if: "always()"
78+
with:
79+
check_name: "JUnit Report"
80+
report_paths: "**/build/test-results/test/*.xml"
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
plugins {
2+
id 'buildlogic.spotless-common-conventions'
3+
}
4+
5+
spotless {
6+
format 'json', {
7+
target '.github/**/*.json', '*.json', 'src/**/*.json'
8+
prettier()
9+
}
10+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
plugins {
2+
id 'buildlogic.spotless-common-conventions'
3+
}
4+
5+
spotless {
6+
yaml {
7+
target '.github/workflows/*.yml'
8+
prettier()
9+
}
10+
}

build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
plugins {
22
id 'buildlogic.spotless-gradle-conventions'
3+
id 'buildlogic.spotless-json-conventions'
34
id 'buildlogic.spotless-markdown-conventions'
5+
id 'buildlogic.spotless-yaml-conventions'
46
id 'buildlogic.changelog-conventions'
57
}
68

0 commit comments

Comments
 (0)