File tree Expand file tree Collapse file tree 4 files changed +81
-54
lines changed Expand file tree Collapse file tree 4 files changed +81
-54
lines changed Original file line number Diff line number Diff line change
1
+ name : Build and test on different host systems
2
+
3
+ on :
4
+ workflow_call :
5
+ inputs :
6
+ upload-code-coverage :
7
+ type : boolean
8
+ description : " enabled uploading coverage report to codecov"
9
+ required : false
10
+ default : false
11
+ secrets :
12
+ CODECOV_TOKEN :
13
+ description : " token to upload codecov report"
14
+ required : false
15
+ jobs :
16
+ check-style :
17
+ runs-on : ubuntu-latest
18
+ steps :
19
+ - name : ' Checkout Repository'
20
+ uses : actions/checkout@v4
21
+ - uses : actions/setup-java@v4
22
+ with :
23
+ distribution : temurin
24
+ java-version-file : .java-version
25
+ - name : Validate Gradle Wrapper
26
+ uses : gradle/actions/wrapper-validation@v3
27
+ - name : Cache konan
28
+ uses : actions/cache@v4
29
+ with :
30
+ path : ~/.konan
31
+ key : ${{ runner.os }}-gradle-${{ hashFiles('*.gradle.kts') }}
32
+ restore-keys : |
33
+ ${{ runner.os }}-gradle-
34
+ - name : Cache unicode data
35
+ uses : actions/cache@v4
36
+ with :
37
+ path : build/unicode_dump
38
+ key : unicode-dump-${{ hashFiles('build/unicode_dump/*') }}
39
+ restore-keys : |
40
+ unicode-dump-
41
+ - name : Setup Gradle
42
+ uses : gradle/actions/setup-gradle@v3
43
+ with :
44
+ gradle-version : wrapper
45
+ - name : Build
46
+ run : ./gradlew --no-daemon --continue detekt detektAll ktlintCheck apiCheck
47
+ check-linux :
48
+ uses : ./.github/workflows/check.yml
49
+ with :
50
+ run-on : ubuntu-latest
51
+ task : linuxAllTest
52
+ upload-code-coverage : ${{ inputs.upload-code-coverage }}
53
+ secrets :
54
+ CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
55
+ check-macos :
56
+ uses : ./.github/workflows/check.yml
57
+ with :
58
+ run-on : macos-latest
59
+ task : macOsAllTest
60
+ check-windows :
61
+ uses : ./.github/workflows/check.yml
62
+ with :
63
+ run-on : windows-latest
64
+ task : windowsAllTest
Original file line number Diff line number Diff line change @@ -11,52 +11,9 @@ concurrency:
11
11
cancel-in-progress : true
12
12
13
13
jobs :
14
- check-style :
15
- runs-on : ubuntu-latest
16
- steps :
17
- - name : ' Checkout Repository'
18
- uses : actions/checkout@v4
19
- - uses : actions/setup-java@v4
20
- with :
21
- distribution : temurin
22
- java-version-file : .java-version
23
- - name : Validate Gradle Wrapper
24
- uses : gradle/actions/wrapper-validation@v3
25
- - name : Cache konan
26
- uses : actions/cache@v4
27
- with :
28
- path : ~/.konan
29
- key : ${{ runner.os }}-gradle-${{ hashFiles('*.gradle.kts') }}
30
- restore-keys : |
31
- ${{ runner.os }}-gradle-
32
- - name : Cache unicode data
33
- uses : actions/cache@v4
34
- with :
35
- path : build/unicode_dump
36
- key : unicode-dump-${{ hashFiles('build/unicode_dump/*') }}
37
- restore-keys : |
38
- unicode-dump-
39
- - name : Setup Gradle
40
- uses : gradle/actions/setup-gradle@v3
41
- with :
42
- gradle-version : wrapper
43
- - name : Build
44
- run : ./gradlew --no-daemon --continue detekt detektAll ktlintCheck apiCheck
45
- check-linux :
46
- uses : ./.github/workflows/check.yml
14
+ check-pr :
15
+ uses : ./.github/workflows/build-and-test.yml
47
16
with :
48
- run-on : ubuntu-latest
49
- task : linuxAllTest
50
17
upload-code-coverage : true
51
18
secrets :
52
19
CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
53
- check-macos :
54
- uses : ./.github/workflows/check.yml
55
- with :
56
- run-on : macos-latest
57
- task : macOsAllTest
58
- check-windows :
59
- uses : ./.github/workflows/check.yml
60
- with :
61
- run-on : windows-latest
62
- task : windowsAllTest
Original file line number Diff line number Diff line change 24
24
version-source : file
25
25
version-file : ${{ env.VERSION_FILE }}
26
26
version-file-extraction-pattern : ${{ env.VERSION_PATTERN }}
27
+ build-and-test :
28
+ uses : ./.github/workflows/build-and-test.yml
27
29
publish_artifacts :
28
30
needs :
29
31
- version
32
+ - build-and-test
30
33
runs-on : macos-latest
31
34
steps :
32
35
- name : ' Checkout Repository'
61
64
with :
62
65
gradle-version : wrapper
63
66
- name : Build and publish release
64
- run : ./gradlew --no-daemon --info build publish closeAndReleaseStagingRepository -Pversion=${{ needs.version.outputs.RELEASE_VERSION }} -x :benchmark:benchmark
67
+ run : ./gradlew --no-daemon --info assemble publish closeAndReleaseStagingRepository -Pversion=${{ needs.version.outputs.RELEASE_VERSION }} -x :benchmark:benchmark
65
68
env :
66
69
SIGNING_KEY_ID : ${{ secrets.SIGNING_KEY_ID }}
67
70
SIGNING_PASSWORD : ${{ secrets.SIGNING_PASSWORD }}
Original file line number Diff line number Diff line change 12
12
- ' .github/workflows/benchmark.yml'
13
13
14
14
jobs :
15
+ build-and-test :
16
+ uses : ./.github/workflows/build-and-test.yml
17
+ with :
18
+ upload-code-coverage : true
19
+ secrets :
20
+ CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
15
21
publish :
22
+ needs :
23
+ - build-and-test
16
24
runs-on : macos-latest
17
25
steps :
18
26
- name : ' Checkout Repository'
@@ -51,17 +59,12 @@ jobs:
51
59
./gradlew
52
60
--no-daemon
53
61
--info
54
- build publish koverXmlReport
62
+ assemble
63
+ publish
55
64
-x :benchmark:benchmark
56
- -x :linkDebugTestLinuxX64
57
- -x :test-suites:linkDebugTestLinuxX64
58
65
env :
59
66
SIGNING_KEY_ID : ${{ secrets.SIGNING_KEY_ID }}
60
67
SIGNING_PASSWORD : ${{ secrets.SIGNING_PASSWORD }}
61
68
SIGNING_SECRET_KEY : ${{ secrets.SIGNING_SECRET_KEY }}
62
69
OSSRH_USERNAME : ${{ secrets.OSSRH_USERNAME }}
63
- OSSRH_PASSWORD : ${{ secrets.OSSRH_PASSWORD }}
64
- - name : Upload coverage reports to Codecov
65
- uses : codecov/codecov-action@v4
66
- with :
67
- token : ${{ secrets.CODECOV_TOKEN }}
70
+ OSSRH_PASSWORD : ${{ secrets.OSSRH_PASSWORD }}
You can’t perform that action at this time.
0 commit comments