Skip to content

Commit e58e52c

Browse files
Add framework, instrumentation, fuzzers pubications on GitHub Packages (#258)
1 parent 339cdf6 commit e58e52c

File tree

4 files changed

+65
-40
lines changed

4 files changed

+65
-40
lines changed

.github/workflows/publish-on-github-packages.yml

Lines changed: 12 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,13 @@ on:
99
description: "commit SHA: e.g. cab4799c"
1010

1111
jobs:
12-
build_and_run_tests:
12+
publish_on_github_packages:
1313
if: ${{ github.actor == 'korifey' || github.actor == 'denis-fokin' || github.actor == 'victoriafomina' ||
1414
github.actor == 'bissquit' }}
1515
runs-on: ubuntu-20.04
16+
permissions:
17+
packages: write
18+
contents: read
1619
steps:
1720
- uses: actions/checkout@v3
1821
- uses: actions/setup-java@v3
@@ -24,12 +27,17 @@ jobs:
2427
- uses: gradle/gradle-build-action@v2
2528
with:
2629
gradle-version: 6.8
27-
30+
31+
- name: Check out ${{ github.event.inputs.commit-sha }} commit
32+
run: |
33+
git fetch
34+
git checkout ${{ github.event.inputs.commit-sha }}
35+
2836
- name: "UTBot Java: build and run tests"
2937
run: |
3038
export KOTLIN_HOME="/usr"
3139
gradle clean build --no-daemon
32-
40+
3341
- name: Upload utbot-framework logs
3442
if: ${{ failure() }}
3543
uses: actions/upload-artifact@v2
@@ -43,45 +51,11 @@ jobs:
4351
with:
4452
name: utbot_framework_tests_report
4553
path: utbot-framework/build/reports/tests/test/*
46-
47-
publish_utbot:
48-
needs: build_and_run_tests
49-
runs-on: ubuntu-20.04
50-
permissions:
51-
packages: write
52-
contents: read
53-
steps:
54-
- uses: actions/checkout@v3
55-
- uses: actions/setup-java@v3
56-
with:
57-
java-version: '8'
58-
distribution: 'zulu'
59-
java-package: jdk+fx
60-
cache: gradle
54+
6155
- uses: gradle/gradle-build-action@v2
6256
with:
6357
gradle-version: 6.8
6458
arguments: publish
6559
env:
6660
GITHUB_ACTOR: ${{ github.actor }}
6761
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
68-
69-
- name: Check out ${{ github.event.inputs.commit-sha }} commit
70-
run: |
71-
git fetch
72-
git checkout ${{ github.event.inputs.commit-sha }}
73-
74-
- name: "utbot-framework-api: build and run tests"
75-
run: |
76-
cd utbot-framework-api
77-
gradle clean build --no-daemon
78-
79-
- name: "utbot-api: build"
80-
run: |
81-
cd utbot-api
82-
gradle clean build --no-daemon
83-
84-
- name: "utbot-core: build"
85-
run: |
86-
cd utbot-core
87-
gradle clean build --no-daemon

utbot-framework/build.gradle

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
plugins {
2+
id 'maven-publish'
3+
}
4+
15
apply from: "${parent.projectDir}/gradle/include/jvm-project.gradle"
26

37
repositories {
@@ -74,4 +78,17 @@ test {
7478
if (System.getProperty('DEBUG', 'false') == 'true') {
7579
jvmArgs '-Xdebug', '-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=9009'
7680
}
77-
}
81+
}
82+
83+
publishing {
84+
repositories {
85+
maven {
86+
name = "GitHubPackages"
87+
url = "https://maven.pkg.github.com/UnitTestBot/UTBotJava"
88+
credentials {
89+
username = System.getenv("GITHUB_ACTOR")
90+
password = System.getenv("GITHUB_TOKEN")
91+
}
92+
}
93+
}
94+
}

utbot-fuzzers/build.gradle

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
plugins {
2+
id 'maven-publish'
3+
}
4+
15
apply from: "${parent.projectDir}/gradle/include/jvm-project.gradle"
26

37
dependencies {
@@ -9,3 +13,16 @@ dependencies {
913
compileJava {
1014
options.compilerArgs = []
1115
}
16+
17+
publishing {
18+
repositories {
19+
maven {
20+
name = "GitHubPackages"
21+
url = "https://maven.pkg.github.com/UnitTestBot/UTBotJava"
22+
credentials {
23+
username = System.getenv("GITHUB_ACTOR")
24+
password = System.getenv("GITHUB_TOKEN")
25+
}
26+
}
27+
}
28+
}

utbot-instrumentation/build.gradle

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
plugins {
2+
id 'maven-publish'
3+
}
4+
15
apply from: "${parent.projectDir}/gradle/include/jvm-project.gradle"
26

37
dependencies {
@@ -32,4 +36,17 @@ configurations {
3236

3337
artifacts {
3438
instrumentationArchive jar
35-
}
39+
}
40+
41+
publishing {
42+
repositories {
43+
maven {
44+
name = "GitHubPackages"
45+
url = "https://maven.pkg.github.com/UnitTestBot/UTBotJava"
46+
credentials {
47+
username = System.getenv("GITHUB_ACTOR")
48+
password = System.getenv("GITHUB_TOKEN")
49+
}
50+
}
51+
}
52+
}

0 commit comments

Comments
 (0)