Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 12 additions & 38 deletions .github/workflows/publish-on-github-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@ on:
description: "commit SHA: e.g. cab4799c"

jobs:
build_and_run_tests:
publish_on_github_packages:
if: ${{ github.actor == 'korifey' || github.actor == 'denis-fokin' || github.actor == 'victoriafomina' ||
github.actor == 'bissquit' }}
runs-on: ubuntu-20.04
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
Expand All @@ -24,12 +27,17 @@ jobs:
- uses: gradle/gradle-build-action@v2
with:
gradle-version: 6.8


- name: Check out ${{ github.event.inputs.commit-sha }} commit
run: |
git fetch
git checkout ${{ github.event.inputs.commit-sha }}

- name: "UTBot Java: build and run tests"
run: |
export KOTLIN_HOME="/usr"
gradle clean build --no-daemon

- name: Upload utbot-framework logs
if: ${{ failure() }}
uses: actions/upload-artifact@v2
Expand All @@ -43,45 +51,11 @@ jobs:
with:
name: utbot_framework_tests_report
path: utbot-framework/build/reports/tests/test/*

publish_utbot:
needs: build_and_run_tests
runs-on: ubuntu-20.04
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'zulu'
java-package: jdk+fx
cache: gradle

- uses: gradle/gradle-build-action@v2
with:
gradle-version: 6.8
arguments: publish
env:
GITHUB_ACTOR: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Check out ${{ github.event.inputs.commit-sha }} commit
run: |
git fetch
git checkout ${{ github.event.inputs.commit-sha }}

- name: "utbot-framework-api: build and run tests"
run: |
cd utbot-framework-api
gradle clean build --no-daemon

- name: "utbot-api: build"
run: |
cd utbot-api
gradle clean build --no-daemon

- name: "utbot-core: build"
run: |
cd utbot-core
gradle clean build --no-daemon
19 changes: 18 additions & 1 deletion utbot-framework/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
plugins {
id 'maven-publish'
}

apply from: "${parent.projectDir}/gradle/include/jvm-project.gradle"

repositories {
Expand Down Expand Up @@ -74,4 +78,17 @@ test {
if (System.getProperty('DEBUG', 'false') == 'true') {
jvmArgs '-Xdebug', '-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=9009'
}
}
}

publishing {
repositories {
maven {
name = "GitHubPackages"
url = "https://maven.pkg.github.com/UnitTestBot/UTBotJava"
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
}
17 changes: 17 additions & 0 deletions utbot-fuzzers/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
plugins {
id 'maven-publish'
}

apply from: "${parent.projectDir}/gradle/include/jvm-project.gradle"

dependencies {
Expand All @@ -9,3 +13,16 @@ dependencies {
compileJava {
options.compilerArgs = []
}

publishing {
repositories {
maven {
name = "GitHubPackages"
url = "https://maven.pkg.github.com/UnitTestBot/UTBotJava"
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
}
19 changes: 18 additions & 1 deletion utbot-instrumentation/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
plugins {
id 'maven-publish'
}

apply from: "${parent.projectDir}/gradle/include/jvm-project.gradle"

dependencies {
Expand Down Expand Up @@ -32,4 +36,17 @@ configurations {

artifacts {
instrumentationArchive jar
}
}

publishing {
repositories {
maven {
name = "GitHubPackages"
url = "https://maven.pkg.github.com/UnitTestBot/UTBotJava"
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
}