-
Notifications
You must be signed in to change notification settings - Fork 23
78 lines (77 loc) · 2.71 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
66
67
68
69
70
71
72
73
74
75
76
77
78
name: Build
on:
pull_request:
paths-ignore:
- 'docs/**'
- 'samples/**'
- '*.md'
push:
branches:
- 'master'
paths-ignore:
- 'docs/**'
- 'samples/**'
- '*.md'
jobs:
test:
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
include:
- os: ubuntu-latest
GRADLE_ARGS: |
apiCheck
:test:check
:colormath:compileKotlinLinuxArm64
:colormath:compileKotlinWasmJs
:extensions:colormath-ext-jetpack-compose:check
:extensions:colormath-ext-android-colorint:check
:extensions:colormath-ext-android-color:check
--stacktrace
- os: macos-latest
GRADLE_ARGS: |
macosX64Test
:colormath:compileKotlinMacosArm64
iosX64Test
tvosX64Test
iosSimulatorArm64Test
tvosSimulatorArm64Test
watchosSimulatorArm64Test
--stacktrace
- os: windows-latest
GRADLE_ARGS: mingwX64Test --stacktrace
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 21
- uses: gradle/actions/setup-gradle@v3
- run: ./gradlew ${{matrix.GRADLE_ARGS}}
- name: Upload the build report
if: failure()
uses: actions/upload-artifact@master
with:
name: build-report-${{ matrix.os }}
path: '**/build/reports'
publish:
needs: test
runs-on: macos-latest
if: ${{ github.ref == 'refs/heads/master' && github.repository == 'ajalt/colormath' }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 21
- uses: gradle/actions/setup-gradle@v3
- name: Deploy to sonatype
# disable configuration cache due to https://github.com/gradle/gradle/issues/22779
run: ./gradlew publishToMavenCentral -PsnapshotVersion=true --no-configuration-cache
env:
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.ORG_GRADLE_PROJECT_mavenCentralPassword }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.ORG_GRADLE_PROJECT_signingInMemoryKey }}
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.ORG_GRADLE_PROJECT_mavenCentralUsername }}
env:
GRADLE_OPTS: -Dorg.gradle.configureondemand=true -Dorg.gradle.parallel=false -Dkotlin.incremental=false -Dorg.gradle.project.kotlin.incremental.multiplatform=false -Dorg.gradle.project.kotlin.native.disableCompilerDaemon=true -Dorg.gradle.jvmargs="-Dfile.encoding=UTF-8"