From 2ed69bce50568a532d0557deb95b685d83dea9c4 Mon Sep 17 00:00:00 2001 From: Egor Vasilyev Date: Mon, 16 Jan 2023 12:14:37 +0300 Subject: [PATCH 01/37] New images added #942 --- docker/Dockerfile_Python | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 docker/Dockerfile_Python diff --git a/docker/Dockerfile_Python b/docker/Dockerfile_Python new file mode 100644 index 0000000000..547a05be50 --- /dev/null +++ b/docker/Dockerfile_Python @@ -0,0 +1,21 @@ +FROM azul/zulu-openjdk:11.0.15-11.56.19 + +ARG UTBOT_PYTHON_CLI +ARG DEBIAN_FRONTEND=noninteractive + +WORKDIR /usr/src/ + +COPY ${UTBOT_PYTHON_CLI} . + +RUN apt-get update \ + && apt-get install -y -q --no-install-recommends \ + curl \ + python3.9 \ + python3.9-distutils \ + && rm -rf /var/lib/apt/lists/* \ + && curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \ + && python3.9 get-pip.py && \ + && pip install -U pytest \ + +RUN UTBOT_PYTHON_CLI_PATH="$(find /usr/src -type f -name 'utbot-cli*')" \ + && ln -s "${UTBOT_PYTHON_CLI_PATH}" /usr/src/utbot-cli.jar \ From 1f4715119f66c3b16f570ea137bf3a457974e498 Mon Sep 17 00:00:00 2001 From: Egor Vasilyev Date: Tue, 24 Jan 2023 12:23:03 +0300 Subject: [PATCH 02/37] new images added #942 --- .github/workflows/build-and-run-tests.yml | 4 ++-- docker/Dockerfile_Python | 11 ++++++----- docker/Dockerfile_java_cli | 17 +++++++++-------- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build-and-run-tests.yml b/.github/workflows/build-and-run-tests.yml index b3c62a1559..e42de68148 100644 --- a/.github/workflows/build-and-run-tests.yml +++ b/.github/workflows/build-and-run-tests.yml @@ -34,10 +34,10 @@ jobs: - uses: actions/checkout@v3 + # "You can make an environment variable available to any subsequent steps in a workflow job by + # defining or updating the environment variable and writing this to the GITHUB_ENV environment file." - name: Set environment variables run: | - # "You can make an environment variable available to any subsequent steps in a workflow job by - # defining or updating the environment variable and writing this to the GITHUB_ENV environment file." echo VERSION="$(date +%Y).$(date +%-m)" >> $GITHUB_ENV - name: Build UTBot Java CLI diff --git a/docker/Dockerfile_Python b/docker/Dockerfile_Python index 547a05be50..1bccb815d3 100644 --- a/docker/Dockerfile_Python +++ b/docker/Dockerfile_Python @@ -5,8 +5,6 @@ ARG DEBIAN_FRONTEND=noninteractive WORKDIR /usr/src/ -COPY ${UTBOT_PYTHON_CLI} . - RUN apt-get update \ && apt-get install -y -q --no-install-recommends \ curl \ @@ -14,8 +12,11 @@ RUN apt-get update \ python3.9-distutils \ && rm -rf /var/lib/apt/lists/* \ && curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \ - && python3.9 get-pip.py && \ - && pip install -U pytest \ + && python3.9 get-pip.py \ + && pip install -U \ + pytest + +COPY ${UTBOT_PYTHON_CLI} . RUN UTBOT_PYTHON_CLI_PATH="$(find /usr/src -type f -name 'utbot-cli*')" \ - && ln -s "${UTBOT_PYTHON_CLI_PATH}" /usr/src/utbot-cli.jar \ + && ln -s "${UTBOT_PYTHON_CLI_PATH}" /usr/src/utbot-cli.jar diff --git a/docker/Dockerfile_java_cli b/docker/Dockerfile_java_cli index efa85d5cad..3f5f64e4f4 100644 --- a/docker/Dockerfile_java_cli +++ b/docker/Dockerfile_java_cli @@ -1,9 +1,16 @@ FROM azul/zulu-openjdk:11.0.15-11.56.19 ARG UTBOT_JAVA_CLI +ARG DEBIAN_FRONTEND=noninteractive WORKDIR /usr/src/ +RUN apt-get update \ + && apt-get install -y -q --no-install-recommends \ + wget \ + unzip \ + && rm -rf /var/lib/apt/lists/* + # Install UTBot Java CLI COPY ${UTBOT_JAVA_CLI} . @@ -11,18 +18,12 @@ COPY ${UTBOT_JAVA_CLI} . RUN UTBOT_JAVA_CLI_PATH="$(find /usr/src -type f -name 'utbot-cli*')" \ && ln -s "${UTBOT_JAVA_CLI_PATH}" /usr/src/utbot-cli.jar -# Install dependencies - -RUN apt-get update \ - && apt-get install -y -q wget unzip \ - && apt-get clean - # Install Kotlin compiler ENV KOTLIN_COMPILER_VERSION=1.7.0 ENV KOTLIN_HOME="/opt/kotlin/kotlinc" -RUN wget --no-verbose https://github.com/JetBrains/kotlin/releases/download/v${KOTLIN_COMPILER_VERSION}/kotlin-compiler-${KOTLIN_COMPILER_VERSION}.zip -O /tmp/${KOTLIN_COMPILER_VERSION}.zip && \ - unzip -q -d /opt/kotlin /tmp/${KOTLIN_COMPILER_VERSION}.zip +RUN wget --no-verbose https://github.com/JetBrains/kotlin/releases/download/v${KOTLIN_COMPILER_VERSION}/kotlin-compiler-${KOTLIN_COMPILER_VERSION}.zip -O /tmp/${KOTLIN_COMPILER_VERSION}.zip \ + && unzip -q -d /opt/kotlin /tmp/${KOTLIN_COMPILER_VERSION}.zip ENV PATH="${KOTLIN_HOME}/bin:${PATH}" From e0c426e756c881f0429972909debbfa4afec45f6 Mon Sep 17 00:00:00 2001 From: Egor Vasilyev Date: Thu, 26 Jan 2023 15:47:31 +0300 Subject: [PATCH 03/37] docker images for python and js added #942 --- docker/Dockerfile_Python | 2 ++ docker/Dockerfile_java_cli | 15 +++++++-------- docker/Dockerfile_javascript | 22 ++++++++++++++++++++++ 3 files changed, 31 insertions(+), 8 deletions(-) create mode 100644 docker/Dockerfile_javascript diff --git a/docker/Dockerfile_Python b/docker/Dockerfile_Python index 1bccb815d3..e43f620c00 100644 --- a/docker/Dockerfile_Python +++ b/docker/Dockerfile_Python @@ -16,6 +16,8 @@ RUN apt-get update \ && pip install -U \ pytest +# Install UTBot Python CLI + COPY ${UTBOT_PYTHON_CLI} . RUN UTBOT_PYTHON_CLI_PATH="$(find /usr/src -type f -name 'utbot-cli*')" \ diff --git a/docker/Dockerfile_java_cli b/docker/Dockerfile_java_cli index 3f5f64e4f4..335a2a26f6 100644 --- a/docker/Dockerfile_java_cli +++ b/docker/Dockerfile_java_cli @@ -11,19 +11,18 @@ RUN apt-get update \ unzip \ && rm -rf /var/lib/apt/lists/* -# Install UTBot Java CLI - -COPY ${UTBOT_JAVA_CLI} . - -RUN UTBOT_JAVA_CLI_PATH="$(find /usr/src -type f -name 'utbot-cli*')" \ - && ln -s "${UTBOT_JAVA_CLI_PATH}" /usr/src/utbot-cli.jar - # Install Kotlin compiler ENV KOTLIN_COMPILER_VERSION=1.7.0 ENV KOTLIN_HOME="/opt/kotlin/kotlinc" +ENV PATH="${KOTLIN_HOME}/bin:${PATH}" RUN wget --no-verbose https://github.com/JetBrains/kotlin/releases/download/v${KOTLIN_COMPILER_VERSION}/kotlin-compiler-${KOTLIN_COMPILER_VERSION}.zip -O /tmp/${KOTLIN_COMPILER_VERSION}.zip \ && unzip -q -d /opt/kotlin /tmp/${KOTLIN_COMPILER_VERSION}.zip -ENV PATH="${KOTLIN_HOME}/bin:${PATH}" +# Install UTBot Java CLI + +COPY ${UTBOT_JAVA_CLI} . + +RUN UTBOT_JAVA_CLI_PATH="$(find /usr/src -type f -name 'utbot-cli*')" \ + && ln -s "${UTBOT_JAVA_CLI_PATH}" /usr/src/utbot-cli.jar diff --git a/docker/Dockerfile_javascript b/docker/Dockerfile_javascript new file mode 100644 index 0000000000..b3833ddaa7 --- /dev/null +++ b/docker/Dockerfile_javascript @@ -0,0 +1,22 @@ +FROM azul/zulu-openjdk:11.0.15-11.56.19 + +ARG UTBOT_JAVASCRIPT_CLI +ARG DEBIAN_FRONTEND=noninteractive + +WORKDIR /usr/src/ + +RUN apt-get update \ + && apt-get install -y -q --no-install-recommends \ + curl \ + && curl -sL https://deb.nodesource.com/setup_18.x -o nodesource_setup.sh \ + && /bin/sh nodesource_setup.sh \ + && apt-get install -y -q --no-install-recommends \ + nodejs \ + && rm -rf /var/lib/apt/lists/* + +# Install UTBot Javascript CLI + +COPY ${UTBOT_JAVASCRIPT_CLI} . + +RUN UTBOT_JAVASCRIPT_CLI_PATH="$(find /usr/src -type f -name 'utbot-cli*')" \ + && ln -s "${UTBOT_JAVASCRIPT_CLI_PATH}" /usr/src/utbot-cli.jar \ No newline at end of file From e50f6c2b1cf882aac2f01f54a66908c64531e86f Mon Sep 17 00:00:00 2001 From: Egor Vasilyev Date: Tue, 31 Jan 2023 16:04:56 +0300 Subject: [PATCH 04/37] reworked to build 3 images --- .github/workflows/build-and-run-tests.yml | 31 +++++++++++++++-------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build-and-run-tests.yml b/.github/workflows/build-and-run-tests.yml index 9eadc07447..653529ccad 100644 --- a/.github/workflows/build-and-run-tests.yml +++ b/.github/workflows/build-and-run-tests.yml @@ -12,8 +12,6 @@ on: env: REGISTRY: ghcr.io - IMAGE_NAME: utbot_java_cli - DOCKERFILE_PATH: docker/Dockerfile_java_cli jobs: build-and-run-tests: @@ -24,6 +22,18 @@ jobs: publish-cli-image: needs: build-and-run-tests if: ${{ github.event_name == 'push' }} + strategy: + matrix: + configuration: + - image_name: utbot_java_cli + directory: utbot-cli + dockerfile_path: docker/Dockerfile_java_cli + - image_name: utbot_js_cli + directory: utbot-cli-js + dockerfile_path: docker/Dockerfile_javascript + - image_name: utbot_python_cli + directory: utbot-cli-python + dockerfile_path: docker/Dockerfile_Python runs-on: ubuntu-20.04 container: unittestbot/java-env:java11-zulu-jdk-gradle7.4.2-kotlinc1.7.0 steps: @@ -40,13 +50,12 @@ jobs: - name: Build UTBot Java CLI run: | - cd utbot-cli + cd ${{ matrix.configuration.directory }} gradle build --no-daemon --build-cache --no-parallel -Dorg.gradle.jvmargs=-Xmx2g -Dkotlin.daemon.jvm.options=-Xmx4g -x test -PsemVer=${{ env.VERSION }} - name: Set docker tag run: - # "You can make an environment variable available to any subsequent steps in a workflow job by - # defining or updating the environment variable and writing this to the GITHUB_ENV environment file." - echo DOCKER_TAG="$(date +%Y).$(date +%-m).$(date +%-d)-${{ github.sha }}" >> $GITHUB_ENV + SHA=$(echo ${{ github.sha }} | cut -c 1-7) + echo DOCKER_TAG="${VERSION}.$(date +%-d)-${SHA}" >> $GITHUB_ENV - name: Log in to the Container registry uses: docker/login-action@v2 @@ -67,24 +76,24 @@ jobs: uses: actions/cache@v3 with: path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} + key: ${{ runner.os }}-buildx-${{ matrix.configuration.image_name }}-${{ github.sha }} restore-keys: | - ${{ runner.os }}-buildx- + ${{ runner.os }}-buildx-${{ matrix.configuration.image_name }}- - name: Docker meta id: meta uses: docker/metadata-action@v3 with: - images: ${{ env.REGISTRY }}/${{ github.repository }}/${{ env.IMAGE_NAME }} + images: ${{ env.REGISTRY }}/${{ github.repository }}/${{ matrix.configuration.image_name }} tags: | type=raw,value=${{ env.DOCKER_TAG }} - name: Docker Buildx (build and push) run: | docker buildx build \ - -f ${{ env.DOCKERFILE_PATH }} \ + -f ${{ matrix.configuration.dockerfile_path }} \ --cache-from "type=local,src=/tmp/.buildx-cache" \ --cache-to "type=local,dest=/tmp/.buildx-cache-new" \ --tag ${{ steps.meta.outputs.tags }} \ - --build-arg UTBOT_JAVA_CLI=utbot-cli/build/libs/utbot-cli-${{ env.VERSION }}.jar \ + --build-arg UTBOT_JAVA_CLI=utbot-cli/build/libs/${{ matrix.configuration.directory }}-${{ env.VERSION }}.jar \ --push . # Temp fix # https://github.com/docker/build-push-action/issues/252 From 893edc7bf3fe1d529565910191ceeb8017b48cf4 Mon Sep 17 00:00:00 2001 From: Egor Vasilyev Date: Wed, 1 Feb 2023 09:57:13 +0300 Subject: [PATCH 05/37] fix artifact path --- .github/workflows/build-and-run-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-run-tests.yml b/.github/workflows/build-and-run-tests.yml index 653529ccad..309f632bc1 100644 --- a/.github/workflows/build-and-run-tests.yml +++ b/.github/workflows/build-and-run-tests.yml @@ -93,7 +93,7 @@ jobs: --cache-from "type=local,src=/tmp/.buildx-cache" \ --cache-to "type=local,dest=/tmp/.buildx-cache-new" \ --tag ${{ steps.meta.outputs.tags }} \ - --build-arg UTBOT_JAVA_CLI=utbot-cli/build/libs/${{ matrix.configuration.directory }}-${{ env.VERSION }}.jar \ + --build-arg UTBOT_JAVA_CLI=${{ matrix.configuration.directory }}/build/libs/${{ matrix.configuration.directory }}-${{ env.VERSION }}.jar \ --push . # Temp fix # https://github.com/docker/build-push-action/issues/252 From 38d189741ca8c7e0c3cc929c43ee9832d133de30 Mon Sep 17 00:00:00 2001 From: Egor Vasilyev Date: Wed, 1 Feb 2023 10:43:03 +0300 Subject: [PATCH 06/37] debug: building without pushing --- .github/workflows/build-and-run-tests.yml | 42 +++++++++++------------ 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/.github/workflows/build-and-run-tests.yml b/.github/workflows/build-and-run-tests.yml index 309f632bc1..8449017098 100644 --- a/.github/workflows/build-and-run-tests.yml +++ b/.github/workflows/build-and-run-tests.yml @@ -14,14 +14,14 @@ env: REGISTRY: ghcr.io jobs: - build-and-run-tests: - uses: ./.github/workflows/build-and-run-tests-from-branch.yml - secrets: inherit +# build-and-run-tests: +# uses: ./.github/workflows/build-and-run-tests-from-branch.yml +# secrets: inherit publish-cli-image: - needs: build-and-run-tests - if: ${{ github.event_name == 'push' }} +# needs: build-and-run-tests +# if: ${{ github.event_name == 'push' }} strategy: matrix: configuration: @@ -86,19 +86,19 @@ jobs: images: ${{ env.REGISTRY }}/${{ github.repository }}/${{ matrix.configuration.image_name }} tags: | type=raw,value=${{ env.DOCKER_TAG }} - - name: Docker Buildx (build and push) - run: | - docker buildx build \ - -f ${{ matrix.configuration.dockerfile_path }} \ - --cache-from "type=local,src=/tmp/.buildx-cache" \ - --cache-to "type=local,dest=/tmp/.buildx-cache-new" \ - --tag ${{ steps.meta.outputs.tags }} \ - --build-arg UTBOT_JAVA_CLI=${{ matrix.configuration.directory }}/build/libs/${{ matrix.configuration.directory }}-${{ env.VERSION }}.jar \ - --push . - # Temp fix - # https://github.com/docker/build-push-action/issues/252 - # https://github.com/moby/buildkit/issues/1896 - - name: Move cache - run: | - rm -rf /tmp/.buildx-cache - mv /tmp/.buildx-cache-new /tmp/.buildx-cache +# - name: Docker Buildx (build and push) +# run: | +# docker buildx build \ +# -f ${{ matrix.configuration.dockerfile_path }} \ +# --cache-from "type=local,src=/tmp/.buildx-cache" \ +# --cache-to "type=local,dest=/tmp/.buildx-cache-new" \ +# --tag ${{ steps.meta.outputs.tags }} \ +# --build-arg UTBOT_JAVA_CLI=${{ matrix.configuration.directory }}/build/libs/${{ matrix.configuration.directory }}-${{ env.VERSION }}.jar \ +# --push . +# # Temp fix +# # https://github.com/docker/build-push-action/issues/252 +# # https://github.com/moby/buildkit/issues/1896 +# - name: Move cache +# run: | +# rm -rf /tmp/.buildx-cache +# mv /tmp/.buildx-cache-new /tmp/.buildx-cache From cb687988bdc022158a179c9ca7bb277a84063bfd Mon Sep 17 00:00:00 2001 From: Egor Vasilyev Date: Wed, 1 Feb 2023 11:32:46 +0300 Subject: [PATCH 07/37] add tmate debug --- .github/workflows/build-and-run-tests.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-and-run-tests.yml b/.github/workflows/build-and-run-tests.yml index 8449017098..3d1170aea3 100644 --- a/.github/workflows/build-and-run-tests.yml +++ b/.github/workflows/build-and-run-tests.yml @@ -47,8 +47,12 @@ jobs: - name: Set environment variables run: | echo VERSION="$(date +%Y).$(date +%-m)" >> $GITHUB_ENV - - - name: Build UTBot Java CLI + + - name: Setup tmate session + uses: mxschmitt/action-tmate@v3 + with: + sudo: false + - name: Build UTBot CLI run: | cd ${{ matrix.configuration.directory }} gradle build --no-daemon --build-cache --no-parallel -Dorg.gradle.jvmargs=-Xmx2g -Dkotlin.daemon.jvm.options=-Xmx4g -x test -PsemVer=${{ env.VERSION }} From ac559e487d5763ee9f018c06a096d51cf9393d5e Mon Sep 17 00:00:00 2001 From: Egor Vasilyev Date: Wed, 1 Feb 2023 12:34:40 +0300 Subject: [PATCH 08/37] disable fail-fast strategy --- .github/workflows/build-and-run-tests.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-and-run-tests.yml b/.github/workflows/build-and-run-tests.yml index 3d1170aea3..37a5640813 100644 --- a/.github/workflows/build-and-run-tests.yml +++ b/.github/workflows/build-and-run-tests.yml @@ -23,6 +23,8 @@ jobs: # needs: build-and-run-tests # if: ${{ github.event_name == 'push' }} strategy: + # The option forces to execute all jobs even though some of them have failed. + fail-fast: false matrix: configuration: - image_name: utbot_java_cli @@ -48,10 +50,6 @@ jobs: run: | echo VERSION="$(date +%Y).$(date +%-m)" >> $GITHUB_ENV - - name: Setup tmate session - uses: mxschmitt/action-tmate@v3 - with: - sudo: false - name: Build UTBot CLI run: | cd ${{ matrix.configuration.directory }} From f62b2abb15fbc66169748c22cb2f38321a9bc691 Mon Sep 17 00:00:00 2001 From: Egor Vasilyev Date: Wed, 1 Feb 2023 13:47:56 +0300 Subject: [PATCH 09/37] syntax typo --- docker/Dockerfile_javascript | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docker/Dockerfile_javascript b/docker/Dockerfile_javascript index b3833ddaa7..d71b68d35b 100644 --- a/docker/Dockerfile_javascript +++ b/docker/Dockerfile_javascript @@ -6,9 +6,9 @@ ARG DEBIAN_FRONTEND=noninteractive WORKDIR /usr/src/ RUN apt-get update \ - && apt-get install -y -q --no-install-recommends \ + && apt-get install -y -q --no-install-recommends \ curl \ - && curl -sL https://deb.nodesource.com/setup_18.x -o nodesource_setup.sh \ + && curl -sL https://deb.nodesource.com/setup_18.x -o nodesource_setup.sh \ && /bin/sh nodesource_setup.sh \ && apt-get install -y -q --no-install-recommends \ nodejs \ @@ -19,4 +19,4 @@ RUN apt-get update \ COPY ${UTBOT_JAVASCRIPT_CLI} . RUN UTBOT_JAVASCRIPT_CLI_PATH="$(find /usr/src -type f -name 'utbot-cli*')" \ - && ln -s "${UTBOT_JAVASCRIPT_CLI_PATH}" /usr/src/utbot-cli.jar \ No newline at end of file + && ln -s "${UTBOT_JAVASCRIPT_CLI_PATH}" /usr/src/utbot-cli.jar \ From 50ea9e6d82f51f59ad0d16226ba48d199fd06700 Mon Sep 17 00:00:00 2001 From: Sergey Loktev Date: Fri, 3 Feb 2023 16:50:23 +0300 Subject: [PATCH 10/37] Attempt to fix JS CLI build --- gradle.properties | 33 ++++++++++++++------------------- settings.gradle.kts | 7 ++++++- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/gradle.properties b/gradle.properties index 4a172b8ed8..81b288e9a6 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,10 +3,13 @@ kotlin.code.style=official # IU, IC, PC, PY # IC for AndroidStudio ideType=IC +# ALL, NOJS +buildType=NOJS ideVersion=222.4167.29 pythonIde=IC,IU,PC,PY jsIde=IU,PY,WS +jsBuild=ALL # In order to run Android Studion instead of Intellij Community, specify the path to your Android Studio installation #androidStudioPath=your_path_to_android_studio @@ -75,24 +78,16 @@ openblasVersion=0.3.10-1.5.4 arpackNgVersion=3.7.0-1.5.4 # configuration for build server -# -# the following options are passed to gradle command explicitly (see appropriate workflow): -# --build-cache (the same as org.gradle.caching=true) -# --no-daemon (the same as org.gradle.daemon=false) -# -# read about options precedence at: https://docs.gradle.org/current/userguide/build_environment.html -org.gradle.jvmargs="-Xmx6g" +org.gradle.daemon=false +org.gradle.parallel=false +org.gradle.jvmargs="-XX:MaxHeapSize=6144m" +kotlin.compiler.execution.strategy=in-process +org.gradle.caching=false # configuration for local compilation - much faster -# overriden by some parameters in CI, read below about each option -# -# overrided by --no-daemon -org.gradle.daemon=true -# overrided by -Dkotlin.daemon.jvm.options=-Xmx4g -kotlin.daemon.jvm.options=-Xmx4g -# overrided by --no-parallel -org.gradle.parallel=true -# not overrided, we use cache in CI as well -org.gradle.caching=true -# there is no need to override the option below because parallel execution is disabled by --no-parallel -org.gradle.workers.max=8 +#org.gradle.daemon=true +#kotlin.daemon.jvm.options=-Xmx4g +#org.gradle.parallel=true +#org.gradle.caching=true +#org.gradle.workers.max=8 +#org.gradle.jvmargs="-XX:MaxHeapSize=6144m" \ No newline at end of file diff --git a/settings.gradle.kts b/settings.gradle.kts index 3480b63ceb..0bdc07bb47 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,7 +1,9 @@ val ideType: String by settings +val buildType: String by settings val pythonIde: String by settings val jsIde: String by settings +val jsBuild: String by settings val includeRiderInBuild: String by settings pluginManagement { @@ -54,8 +56,11 @@ if (pythonIde.split(",").contains(ideType)) { include("utbot-intellij-python") } -if (jsIde.split(",").contains(ideType)) { +if (jsBuild == buildType) { include("utbot-js") include("utbot-cli-js") +} + +if (jsIde.split(",").contains(ideType)) { include("utbot-intellij-js") } From 31fe260a929cfac25ef571a5307ddc665439d133 Mon Sep 17 00:00:00 2001 From: Sergey Loktev Date: Fri, 3 Feb 2023 17:02:16 +0300 Subject: [PATCH 11/37] Added a flag to CLI build workflow --- .github/workflows/build-and-run-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-run-tests.yml b/.github/workflows/build-and-run-tests.yml index 37a5640813..e38a24872e 100644 --- a/.github/workflows/build-and-run-tests.yml +++ b/.github/workflows/build-and-run-tests.yml @@ -53,7 +53,7 @@ jobs: - name: Build UTBot CLI run: | cd ${{ matrix.configuration.directory }} - gradle build --no-daemon --build-cache --no-parallel -Dorg.gradle.jvmargs=-Xmx2g -Dkotlin.daemon.jvm.options=-Xmx4g -x test -PsemVer=${{ env.VERSION }} + gradle build --no-daemon --build-cache --no-parallel -DbuildType=ALL -Dorg.gradle.jvmargs=-Xmx2g -Dkotlin.daemon.jvm.options=-Xmx4g -x test -PsemVer=${{ env.VERSION }} - name: Set docker tag run: SHA=$(echo ${{ github.sha }} | cut -c 1-7) From 752a730784902d670e9f47736c8cdf889e9a82c1 Mon Sep 17 00:00:00 2001 From: Sergey Loktev Date: Fri, 3 Feb 2023 17:28:40 +0300 Subject: [PATCH 12/37] Switched -D to -P in prop set flag --- .github/workflows/build-and-run-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-run-tests.yml b/.github/workflows/build-and-run-tests.yml index e38a24872e..9b5fe4e693 100644 --- a/.github/workflows/build-and-run-tests.yml +++ b/.github/workflows/build-and-run-tests.yml @@ -53,7 +53,7 @@ jobs: - name: Build UTBot CLI run: | cd ${{ matrix.configuration.directory }} - gradle build --no-daemon --build-cache --no-parallel -DbuildType=ALL -Dorg.gradle.jvmargs=-Xmx2g -Dkotlin.daemon.jvm.options=-Xmx4g -x test -PsemVer=${{ env.VERSION }} + gradle build --no-daemon --build-cache --no-parallel -PbuildType=ALL -Dorg.gradle.jvmargs=-Xmx2g -Dkotlin.daemon.jvm.options=-Xmx4g -x test -PsemVer=${{ env.VERSION }} - name: Set docker tag run: SHA=$(echo ${{ github.sha }} | cut -c 1-7) From 77243bd58fbc7303b7f768abd0030b7af9e24fce Mon Sep 17 00:00:00 2001 From: Egor Vasilyev Date: Mon, 6 Feb 2023 09:49:43 +0300 Subject: [PATCH 13/37] main options of gradle.properties reverted back --- gradle.properties | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/gradle.properties b/gradle.properties index 81b288e9a6..15993df18c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -78,16 +78,24 @@ openblasVersion=0.3.10-1.5.4 arpackNgVersion=3.7.0-1.5.4 # configuration for build server -org.gradle.daemon=false -org.gradle.parallel=false -org.gradle.jvmargs="-XX:MaxHeapSize=6144m" -kotlin.compiler.execution.strategy=in-process -org.gradle.caching=false +# +# the following options are passed to gradle command explicitly (see appropriate workflow): +# --build-cache (the same as org.gradle.caching=true) +# --no-daemon (the same as org.gradle.daemon=false) +# +# read about options precedence at: https://docs.gradle.org/current/userguide/build_environment.html +org.gradle.jvmargs="-Xmx6g" # configuration for local compilation - much faster -#org.gradle.daemon=true -#kotlin.daemon.jvm.options=-Xmx4g -#org.gradle.parallel=true -#org.gradle.caching=true -#org.gradle.workers.max=8 -#org.gradle.jvmargs="-XX:MaxHeapSize=6144m" \ No newline at end of file +# overriden by some parameters in CI, read below about each option +# +# overrided by --no-daemon +org.gradle.daemon=true +# overrided by -Dkotlin.daemon.jvm.options=-Xmx4g +kotlin.daemon.jvm.options=-Xmx4g +# overrided by --no-parallel +org.gradle.parallel=true +# not overrided, we use cache in CI as well +org.gradle.caching=true +# there is no need to override the option below because parallel execution is disabled by --no-parallel +org.gradle.workers.max=8 From 55071cac0c10ddda12796044800417ddd318c2e1 Mon Sep 17 00:00:00 2001 From: Egor Vasilyev Date: Mon, 6 Feb 2023 09:57:07 +0300 Subject: [PATCH 14/37] extra_options param added --- .github/workflows/build-and-run-tests.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-and-run-tests.yml b/.github/workflows/build-and-run-tests.yml index 9b5fe4e693..8682ece110 100644 --- a/.github/workflows/build-and-run-tests.yml +++ b/.github/workflows/build-and-run-tests.yml @@ -30,12 +30,15 @@ jobs: - image_name: utbot_java_cli directory: utbot-cli dockerfile_path: docker/Dockerfile_java_cli + extra_options: "" - image_name: utbot_js_cli directory: utbot-cli-js dockerfile_path: docker/Dockerfile_javascript + extra_options: "-PbuildType=ALL" - image_name: utbot_python_cli directory: utbot-cli-python dockerfile_path: docker/Dockerfile_Python + extra_options: "" runs-on: ubuntu-20.04 container: unittestbot/java-env:java11-zulu-jdk-gradle7.4.2-kotlinc1.7.0 steps: @@ -53,7 +56,7 @@ jobs: - name: Build UTBot CLI run: | cd ${{ matrix.configuration.directory }} - gradle build --no-daemon --build-cache --no-parallel -PbuildType=ALL -Dorg.gradle.jvmargs=-Xmx2g -Dkotlin.daemon.jvm.options=-Xmx4g -x test -PsemVer=${{ env.VERSION }} + gradle build --no-daemon --build-cache --no-parallel ${{ matrix.configuration.extra_options }} -Dorg.gradle.jvmargs=-Xmx2g -Dkotlin.daemon.jvm.options=-Xmx4g -x test -PsemVer=${{ env.VERSION }} - name: Set docker tag run: SHA=$(echo ${{ github.sha }} | cut -c 1-7) From e5fca0d11f1634a0eb83d4ec101bd47801d87795 Mon Sep 17 00:00:00 2001 From: Egor Vasilyev Date: Mon, 6 Feb 2023 10:14:12 +0300 Subject: [PATCH 15/37] dockerfile names fixed --- .github/workflows/build-and-run-tests.yml | 4 ++-- docker/{Dockerfile_javascript => Dockerfile_js_cli} | 0 docker/{Dockerfile_Python => Dockerfile_python_cli} | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename docker/{Dockerfile_javascript => Dockerfile_js_cli} (100%) rename docker/{Dockerfile_Python => Dockerfile_python_cli} (100%) diff --git a/.github/workflows/build-and-run-tests.yml b/.github/workflows/build-and-run-tests.yml index 8682ece110..5a3f3e2e13 100644 --- a/.github/workflows/build-and-run-tests.yml +++ b/.github/workflows/build-and-run-tests.yml @@ -33,11 +33,11 @@ jobs: extra_options: "" - image_name: utbot_js_cli directory: utbot-cli-js - dockerfile_path: docker/Dockerfile_javascript + dockerfile_path: docker/Dockerfile_js_cli extra_options: "-PbuildType=ALL" - image_name: utbot_python_cli directory: utbot-cli-python - dockerfile_path: docker/Dockerfile_Python + dockerfile_path: docker/Dockerfile_python_cli extra_options: "" runs-on: ubuntu-20.04 container: unittestbot/java-env:java11-zulu-jdk-gradle7.4.2-kotlinc1.7.0 diff --git a/docker/Dockerfile_javascript b/docker/Dockerfile_js_cli similarity index 100% rename from docker/Dockerfile_javascript rename to docker/Dockerfile_js_cli diff --git a/docker/Dockerfile_Python b/docker/Dockerfile_python_cli similarity index 100% rename from docker/Dockerfile_Python rename to docker/Dockerfile_python_cli From 06534c6eeb58c6fc6710058c393eba54c38e5aa1 Mon Sep 17 00:00:00 2001 From: Egor Vasilyev Date: Mon, 6 Feb 2023 12:11:09 +0300 Subject: [PATCH 16/37] testing image publishing --- .github/workflows/build-and-run-tests.yml | 32 +++++++++++------------ 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build-and-run-tests.yml b/.github/workflows/build-and-run-tests.yml index 5a3f3e2e13..5eff61bef0 100644 --- a/.github/workflows/build-and-run-tests.yml +++ b/.github/workflows/build-and-run-tests.yml @@ -91,19 +91,19 @@ jobs: images: ${{ env.REGISTRY }}/${{ github.repository }}/${{ matrix.configuration.image_name }} tags: | type=raw,value=${{ env.DOCKER_TAG }} -# - name: Docker Buildx (build and push) -# run: | -# docker buildx build \ -# -f ${{ matrix.configuration.dockerfile_path }} \ -# --cache-from "type=local,src=/tmp/.buildx-cache" \ -# --cache-to "type=local,dest=/tmp/.buildx-cache-new" \ -# --tag ${{ steps.meta.outputs.tags }} \ -# --build-arg UTBOT_JAVA_CLI=${{ matrix.configuration.directory }}/build/libs/${{ matrix.configuration.directory }}-${{ env.VERSION }}.jar \ -# --push . -# # Temp fix -# # https://github.com/docker/build-push-action/issues/252 -# # https://github.com/moby/buildkit/issues/1896 -# - name: Move cache -# run: | -# rm -rf /tmp/.buildx-cache -# mv /tmp/.buildx-cache-new /tmp/.buildx-cache + - name: Docker Buildx (build and push) + run: | + docker buildx build \ + -f ${{ matrix.configuration.dockerfile_path }} \ + --cache-from "type=local,src=/tmp/.buildx-cache" \ + --cache-to "type=local,dest=/tmp/.buildx-cache-new" \ + --tag ${{ steps.meta.outputs.tags }} \ + --build-arg UTBOT_JAVA_CLI=${{ matrix.configuration.directory }}/build/libs/${{ matrix.configuration.directory }}-${{ env.VERSION }}.jar \ + --push . + # Temp fix + # https://github.com/docker/build-push-action/issues/252 + # https://github.com/moby/buildkit/issues/1896 + - name: Move cache + run: | + rm -rf /tmp/.buildx-cache + mv /tmp/.buildx-cache-new /tmp/.buildx-cache From f2f3a133dda6ccf99f877df4c4a407aa6186149f Mon Sep 17 00:00:00 2001 From: Egor Vasilyev Date: Mon, 6 Feb 2023 15:30:37 +0300 Subject: [PATCH 17/37] image push disabled; variable generation improved --- .github/workflows/build-and-run-tests.yml | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build-and-run-tests.yml b/.github/workflows/build-and-run-tests.yml index 5eff61bef0..3b062b0d59 100644 --- a/.github/workflows/build-and-run-tests.yml +++ b/.github/workflows/build-and-run-tests.yml @@ -42,9 +42,6 @@ jobs: runs-on: ubuntu-20.04 container: unittestbot/java-env:java11-zulu-jdk-gradle7.4.2-kotlinc1.7.0 steps: - - name: Print environment variables - run: printenv - - uses: actions/checkout@v3 # "You can make an environment variable available to any subsequent steps in a workflow job by @@ -52,15 +49,15 @@ jobs: - name: Set environment variables run: | echo VERSION="$(date +%Y).$(date +%-m)" >> $GITHUB_ENV + echo DOCKER_TAG="$(date +%Y).$(date +%-m).$(date +%-d)-$(echo -n ${GITHUB_SHA} | cut -c 1-7)" >> $GITHUB_ENV + + - name: Print environment variables + run: printenv - name: Build UTBot CLI run: | cd ${{ matrix.configuration.directory }} gradle build --no-daemon --build-cache --no-parallel ${{ matrix.configuration.extra_options }} -Dorg.gradle.jvmargs=-Xmx2g -Dkotlin.daemon.jvm.options=-Xmx4g -x test -PsemVer=${{ env.VERSION }} - - name: Set docker tag - run: - SHA=$(echo ${{ github.sha }} | cut -c 1-7) - echo DOCKER_TAG="${VERSION}.$(date +%-d)-${SHA}" >> $GITHUB_ENV - name: Log in to the Container registry uses: docker/login-action@v2 @@ -98,8 +95,8 @@ jobs: --cache-from "type=local,src=/tmp/.buildx-cache" \ --cache-to "type=local,dest=/tmp/.buildx-cache-new" \ --tag ${{ steps.meta.outputs.tags }} \ - --build-arg UTBOT_JAVA_CLI=${{ matrix.configuration.directory }}/build/libs/${{ matrix.configuration.directory }}-${{ env.VERSION }}.jar \ - --push . + --build-arg UTBOT_JAVA_CLI=${{ matrix.configuration.directory }}/build/libs/${{ matrix.configuration.directory }}-${{ env.VERSION }}.jar +# --push . # Temp fix # https://github.com/docker/build-push-action/issues/252 # https://github.com/moby/buildkit/issues/1896 From 61a85bc523628524165ec59bb87f9a54a21676cb Mon Sep 17 00:00:00 2001 From: Egor Vasilyev Date: Mon, 6 Feb 2023 15:45:08 +0300 Subject: [PATCH 18/37] fix typo --- .github/workflows/build-and-run-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-run-tests.yml b/.github/workflows/build-and-run-tests.yml index 3b062b0d59..68f9f27d91 100644 --- a/.github/workflows/build-and-run-tests.yml +++ b/.github/workflows/build-and-run-tests.yml @@ -95,7 +95,7 @@ jobs: --cache-from "type=local,src=/tmp/.buildx-cache" \ --cache-to "type=local,dest=/tmp/.buildx-cache-new" \ --tag ${{ steps.meta.outputs.tags }} \ - --build-arg UTBOT_JAVA_CLI=${{ matrix.configuration.directory }}/build/libs/${{ matrix.configuration.directory }}-${{ env.VERSION }}.jar + --build-arg UTBOT_JAVA_CLI=${{ matrix.configuration.directory }}/build/libs/${{ matrix.configuration.directory }}-${{ env.VERSION }}.jar . # --push . # Temp fix # https://github.com/docker/build-push-action/issues/252 From 198042f12b483042f8f128c1566282ff846cd730 Mon Sep 17 00:00:00 2001 From: Egor Vasilyev Date: Tue, 7 Feb 2023 10:26:53 +0300 Subject: [PATCH 19/37] try to push images --- .github/workflows/build-and-run-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-and-run-tests.yml b/.github/workflows/build-and-run-tests.yml index 68f9f27d91..9615db1386 100644 --- a/.github/workflows/build-and-run-tests.yml +++ b/.github/workflows/build-and-run-tests.yml @@ -95,8 +95,8 @@ jobs: --cache-from "type=local,src=/tmp/.buildx-cache" \ --cache-to "type=local,dest=/tmp/.buildx-cache-new" \ --tag ${{ steps.meta.outputs.tags }} \ - --build-arg UTBOT_JAVA_CLI=${{ matrix.configuration.directory }}/build/libs/${{ matrix.configuration.directory }}-${{ env.VERSION }}.jar . -# --push . + --build-arg UTBOT_JAVA_CLI=${{ matrix.configuration.directory }}/build/libs/${{ matrix.configuration.directory }}-${{ env.VERSION }}.jar \ + --push . # Temp fix # https://github.com/docker/build-push-action/issues/252 # https://github.com/moby/buildkit/issues/1896 From fab9111f3fab04bb0cfb0759e4d39735dd3ce343 Mon Sep 17 00:00:00 2001 From: Egor Vasilyev Date: Tue, 7 Feb 2023 13:19:06 +0300 Subject: [PATCH 20/37] variables set reworked --- .github/workflows/build-and-run-tests.yml | 10 ++++------ docker/Dockerfile_js_cli => utbot-cli-js/Dockerfile | 8 ++++---- .../Dockerfile | 2 +- docker/Dockerfile_java_cli => utbot-cli/Dockerfile | 2 +- 4 files changed, 10 insertions(+), 12 deletions(-) rename docker/Dockerfile_js_cli => utbot-cli-js/Dockerfile (68%) rename docker/Dockerfile_python_cli => utbot-cli-python/Dockerfile (100%) rename docker/Dockerfile_java_cli => utbot-cli/Dockerfile (100%) diff --git a/.github/workflows/build-and-run-tests.yml b/.github/workflows/build-and-run-tests.yml index 9615db1386..8840b9c2d5 100644 --- a/.github/workflows/build-and-run-tests.yml +++ b/.github/workflows/build-and-run-tests.yml @@ -27,17 +27,15 @@ jobs: fail-fast: false matrix: configuration: + # image_name has to be the same as ARG in Dockerfile but in lowercase - image_name: utbot_java_cli directory: utbot-cli - dockerfile_path: docker/Dockerfile_java_cli extra_options: "" - image_name: utbot_js_cli directory: utbot-cli-js - dockerfile_path: docker/Dockerfile_js_cli extra_options: "-PbuildType=ALL" - image_name: utbot_python_cli directory: utbot-cli-python - dockerfile_path: docker/Dockerfile_python_cli extra_options: "" runs-on: ubuntu-20.04 container: unittestbot/java-env:java11-zulu-jdk-gradle7.4.2-kotlinc1.7.0 @@ -91,12 +89,12 @@ jobs: - name: Docker Buildx (build and push) run: | docker buildx build \ - -f ${{ matrix.configuration.dockerfile_path }} \ + -f ${{ matrix.configuration.directory }}/Dockerfile \ --cache-from "type=local,src=/tmp/.buildx-cache" \ --cache-to "type=local,dest=/tmp/.buildx-cache-new" \ --tag ${{ steps.meta.outputs.tags }} \ - --build-arg UTBOT_JAVA_CLI=${{ matrix.configuration.directory }}/build/libs/${{ matrix.configuration.directory }}-${{ env.VERSION }}.jar \ - --push . + --build-arg $(echo -n ${{ matrix.configuration.image_name }} | awk '{ print toupper($0) }')=${{ matrix.configuration.directory }}/build/libs/${{ matrix.configuration.directory }}-${{ env.VERSION }}.jar +# --push . # Temp fix # https://github.com/docker/build-push-action/issues/252 # https://github.com/moby/buildkit/issues/1896 diff --git a/docker/Dockerfile_js_cli b/utbot-cli-js/Dockerfile similarity index 68% rename from docker/Dockerfile_js_cli rename to utbot-cli-js/Dockerfile index d71b68d35b..a53d3ce5be 100644 --- a/docker/Dockerfile_js_cli +++ b/utbot-cli-js/Dockerfile @@ -1,6 +1,5 @@ FROM azul/zulu-openjdk:11.0.15-11.56.19 -ARG UTBOT_JAVASCRIPT_CLI ARG DEBIAN_FRONTEND=noninteractive WORKDIR /usr/src/ @@ -16,7 +15,8 @@ RUN apt-get update \ # Install UTBot Javascript CLI -COPY ${UTBOT_JAVASCRIPT_CLI} . +ARG UTBOT_JS_CLI +COPY ${UTBOT_JS_CLI} . -RUN UTBOT_JAVASCRIPT_CLI_PATH="$(find /usr/src -type f -name 'utbot-cli*')" \ - && ln -s "${UTBOT_JAVASCRIPT_CLI_PATH}" /usr/src/utbot-cli.jar \ +RUN UTBOT_JS_CLI_PATH="$(find /usr/src -type f -name 'utbot-cli*')" \ + && ln -s "${UTBOT_JS_CLI_PATH}" /usr/src/utbot-cli.jar \ diff --git a/docker/Dockerfile_python_cli b/utbot-cli-python/Dockerfile similarity index 100% rename from docker/Dockerfile_python_cli rename to utbot-cli-python/Dockerfile index e43f620c00..c12a2fa5a8 100644 --- a/docker/Dockerfile_python_cli +++ b/utbot-cli-python/Dockerfile @@ -1,6 +1,5 @@ FROM azul/zulu-openjdk:11.0.15-11.56.19 -ARG UTBOT_PYTHON_CLI ARG DEBIAN_FRONTEND=noninteractive WORKDIR /usr/src/ @@ -18,6 +17,7 @@ RUN apt-get update \ # Install UTBot Python CLI +ARG UTBOT_PYTHON_CLI COPY ${UTBOT_PYTHON_CLI} . RUN UTBOT_PYTHON_CLI_PATH="$(find /usr/src -type f -name 'utbot-cli*')" \ diff --git a/docker/Dockerfile_java_cli b/utbot-cli/Dockerfile similarity index 100% rename from docker/Dockerfile_java_cli rename to utbot-cli/Dockerfile index 335a2a26f6..dfe848561d 100644 --- a/docker/Dockerfile_java_cli +++ b/utbot-cli/Dockerfile @@ -1,6 +1,5 @@ FROM azul/zulu-openjdk:11.0.15-11.56.19 -ARG UTBOT_JAVA_CLI ARG DEBIAN_FRONTEND=noninteractive WORKDIR /usr/src/ @@ -22,6 +21,7 @@ RUN wget --no-verbose https://github.com/JetBrains/kotlin/releases/download/v${K # Install UTBot Java CLI +ARG UTBOT_JAVA_CLI COPY ${UTBOT_JAVA_CLI} . RUN UTBOT_JAVA_CLI_PATH="$(find /usr/src -type f -name 'utbot-cli*')" \ From 3de48e9cd9a201db9dcdae85bd3330378184d20c Mon Sep 17 00:00:00 2001 From: Egor Vasilyev Date: Tue, 7 Feb 2023 13:26:30 +0300 Subject: [PATCH 21/37] fix dot --- .github/workflows/build-and-run-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-run-tests.yml b/.github/workflows/build-and-run-tests.yml index 8840b9c2d5..1a6a7ddf55 100644 --- a/.github/workflows/build-and-run-tests.yml +++ b/.github/workflows/build-and-run-tests.yml @@ -93,7 +93,7 @@ jobs: --cache-from "type=local,src=/tmp/.buildx-cache" \ --cache-to "type=local,dest=/tmp/.buildx-cache-new" \ --tag ${{ steps.meta.outputs.tags }} \ - --build-arg $(echo -n ${{ matrix.configuration.image_name }} | awk '{ print toupper($0) }')=${{ matrix.configuration.directory }}/build/libs/${{ matrix.configuration.directory }}-${{ env.VERSION }}.jar + --build-arg $(echo -n ${{ matrix.configuration.image_name }} | awk '{ print toupper($0) }')=${{ matrix.configuration.directory }}/build/libs/${{ matrix.configuration.directory }}-${{ env.VERSION }}.jar . # --push . # Temp fix # https://github.com/docker/build-push-action/issues/252 From f52ca43bcb2ae10ac3922b81835335314870770b Mon Sep 17 00:00:00 2001 From: Egor Vasilyev Date: Tue, 7 Feb 2023 14:07:55 +0300 Subject: [PATCH 22/37] add image push --- .github/workflows/build-and-run-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-and-run-tests.yml b/.github/workflows/build-and-run-tests.yml index 1a6a7ddf55..7a57f51348 100644 --- a/.github/workflows/build-and-run-tests.yml +++ b/.github/workflows/build-and-run-tests.yml @@ -93,8 +93,8 @@ jobs: --cache-from "type=local,src=/tmp/.buildx-cache" \ --cache-to "type=local,dest=/tmp/.buildx-cache-new" \ --tag ${{ steps.meta.outputs.tags }} \ - --build-arg $(echo -n ${{ matrix.configuration.image_name }} | awk '{ print toupper($0) }')=${{ matrix.configuration.directory }}/build/libs/${{ matrix.configuration.directory }}-${{ env.VERSION }}.jar . -# --push . + --build-arg $(echo -n ${{ matrix.configuration.image_name }} | awk '{ print toupper($0) }')=${{ matrix.configuration.directory }}/build/libs/${{ matrix.configuration.directory }}-${{ env.VERSION }}.jar \ + --push . # Temp fix # https://github.com/docker/build-push-action/issues/252 # https://github.com/moby/buildkit/issues/1896 From 0d01f26421c11a4a0b6c82c66c3a82f800a9d9f9 Mon Sep 17 00:00:00 2001 From: Egor Vasilyev Date: Tue, 7 Feb 2023 15:44:08 +0300 Subject: [PATCH 23/37] java and js images temporary commented --- .github/workflows/build-and-run-tests.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-and-run-tests.yml b/.github/workflows/build-and-run-tests.yml index 7a57f51348..27231ead25 100644 --- a/.github/workflows/build-and-run-tests.yml +++ b/.github/workflows/build-and-run-tests.yml @@ -28,12 +28,12 @@ jobs: matrix: configuration: # image_name has to be the same as ARG in Dockerfile but in lowercase - - image_name: utbot_java_cli - directory: utbot-cli - extra_options: "" - - image_name: utbot_js_cli - directory: utbot-cli-js - extra_options: "-PbuildType=ALL" +# - image_name: utbot_java_cli +# directory: utbot-cli +# extra_options: "" +# - image_name: utbot_js_cli +# directory: utbot-cli-js +# extra_options: "-PbuildType=ALL" - image_name: utbot_python_cli directory: utbot-cli-python extra_options: "" From 3b9ad6be211ab6c3f8a7acae7e80d5e79102af02 Mon Sep 17 00:00:00 2001 From: Egor Vasilyev Date: Wed, 8 Feb 2023 11:56:26 +0300 Subject: [PATCH 24/37] test with pat token --- .github/workflows/build-and-run-tests.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-and-run-tests.yml b/.github/workflows/build-and-run-tests.yml index 27231ead25..f7a5a94472 100644 --- a/.github/workflows/build-and-run-tests.yml +++ b/.github/workflows/build-and-run-tests.yml @@ -62,7 +62,8 @@ jobs: with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} + password: ${{ secrets.PACKAGE_TOKEN }} +# password: ${{ secrets.GITHUB_TOKEN }} - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 From 14f6edb080a8d0a41ac642fed158abe798452488 Mon Sep 17 00:00:00 2001 From: Egor Vasilyev Date: Fri, 10 Feb 2023 12:45:54 +0300 Subject: [PATCH 25/37] revert pass back --- .github/workflows/build-and-run-tests.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build-and-run-tests.yml b/.github/workflows/build-and-run-tests.yml index f7a5a94472..27231ead25 100644 --- a/.github/workflows/build-and-run-tests.yml +++ b/.github/workflows/build-and-run-tests.yml @@ -62,8 +62,7 @@ jobs: with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} - password: ${{ secrets.PACKAGE_TOKEN }} -# password: ${{ secrets.GITHUB_TOKEN }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 From 35591d6203e800daf3a71909216624ae6aaf80ea Mon Sep 17 00:00:00 2001 From: Egor Vasilyev Date: Fri, 10 Feb 2023 13:39:36 +0300 Subject: [PATCH 26/37] build without cache --- .github/workflows/build-and-run-tests.yml | 30 +++++++++++------------ 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build-and-run-tests.yml b/.github/workflows/build-and-run-tests.yml index 27231ead25..3b6e96f1ec 100644 --- a/.github/workflows/build-and-run-tests.yml +++ b/.github/workflows/build-and-run-tests.yml @@ -31,12 +31,12 @@ jobs: # - image_name: utbot_java_cli # directory: utbot-cli # extra_options: "" -# - image_name: utbot_js_cli -# directory: utbot-cli-js -# extra_options: "-PbuildType=ALL" - image_name: utbot_python_cli directory: utbot-cli-python extra_options: "" + - image_name: utbot_js_cli + directory: utbot-cli-js + extra_options: "-PbuildType=ALL" runs-on: ubuntu-20.04 container: unittestbot/java-env:java11-zulu-jdk-gradle7.4.2-kotlinc1.7.0 steps: @@ -72,13 +72,13 @@ jobs: driver-opts: | image=moby/buildkit:v0.10.6 - - name: Cache Docker layers - uses: actions/cache@v3 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ matrix.configuration.image_name }}-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx-${{ matrix.configuration.image_name }}- +# - name: Cache Docker layers +# uses: actions/cache@v3 +# with: +# path: /tmp/.buildx-cache +# key: ${{ runner.os }}-buildx-${{ matrix.configuration.image_name }}-${{ github.sha }} +# restore-keys: | +# ${{ runner.os }}-buildx-${{ matrix.configuration.image_name }}- - name: Docker meta id: meta uses: docker/metadata-action@v3 @@ -90,15 +90,13 @@ jobs: run: | docker buildx build \ -f ${{ matrix.configuration.directory }}/Dockerfile \ - --cache-from "type=local,src=/tmp/.buildx-cache" \ - --cache-to "type=local,dest=/tmp/.buildx-cache-new" \ --tag ${{ steps.meta.outputs.tags }} \ --build-arg $(echo -n ${{ matrix.configuration.image_name }} | awk '{ print toupper($0) }')=${{ matrix.configuration.directory }}/build/libs/${{ matrix.configuration.directory }}-${{ env.VERSION }}.jar \ --push . # Temp fix # https://github.com/docker/build-push-action/issues/252 # https://github.com/moby/buildkit/issues/1896 - - name: Move cache - run: | - rm -rf /tmp/.buildx-cache - mv /tmp/.buildx-cache-new /tmp/.buildx-cache +# - name: Move cache +# run: | +# rm -rf /tmp/.buildx-cache +# mv /tmp/.buildx-cache-new /tmp/.buildx-cache From ba2a267123f6fbf90e243dd38700135d02239a71 Mon Sep 17 00:00:00 2001 From: Egor Vasilyev Date: Fri, 10 Feb 2023 14:36:06 +0300 Subject: [PATCH 27/37] build and push switched to action --- .github/workflows/build-and-run-tests.yml | 36 ++++++++++++++++------- utbot-cli-js/Dockerfile | 4 +-- utbot-cli-python/Dockerfile | 4 +-- utbot-cli/Dockerfile | 4 +-- 4 files changed, 32 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build-and-run-tests.yml b/.github/workflows/build-and-run-tests.yml index 3b6e96f1ec..7633b22b6a 100644 --- a/.github/workflows/build-and-run-tests.yml +++ b/.github/workflows/build-and-run-tests.yml @@ -31,12 +31,12 @@ jobs: # - image_name: utbot_java_cli # directory: utbot-cli # extra_options: "" - - image_name: utbot_python_cli - directory: utbot-cli-python - extra_options: "" - image_name: utbot_js_cli directory: utbot-cli-js extra_options: "-PbuildType=ALL" + - image_name: utbot_python_cli + directory: utbot-cli-python + extra_options: "" runs-on: ubuntu-20.04 container: unittestbot/java-env:java11-zulu-jdk-gradle7.4.2-kotlinc1.7.0 steps: @@ -86,13 +86,29 @@ jobs: images: ${{ env.REGISTRY }}/${{ github.repository }}/${{ matrix.configuration.image_name }} tags: | type=raw,value=${{ env.DOCKER_TAG }} - - name: Docker Buildx (build and push) - run: | - docker buildx build \ - -f ${{ matrix.configuration.directory }}/Dockerfile \ - --tag ${{ steps.meta.outputs.tags }} \ - --build-arg $(echo -n ${{ matrix.configuration.image_name }} | awk '{ print toupper($0) }')=${{ matrix.configuration.directory }}/build/libs/${{ matrix.configuration.directory }}-${{ env.VERSION }}.jar \ - --push . + - name: Build and push + uses: docker/build-push-action@v4 + with: + context: . +# push: true + tags: | + ${{ steps.meta.outputs.tags }} +# ${{ env.REGISTRY }}/${{ github.repository }}/${{ matrix.configuration.image_name }}:${{ env.DOCKER_TAG }} + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache-new + file: ${{ matrix.configuration.directory }}/Dockerfile + build-args: | + ARTIFACT_PATH=${{ matrix.configuration.directory }}/build/libs/${{ matrix.configuration.directory }}-${{ env.VERSION }}.jar + +# - name: Docker Buildx (build and push) +# run: | +# docker buildx build \ +# -f ${{ matrix.configuration.directory }}/Dockerfile \ +# --tag ${{ steps.meta.outputs.tags }} \ +# --cache-from "type=local,src=/tmp/.buildx-cache" \ +# --cache-to "type=local,dest=/tmp/.buildx-cache-new" \ +# --build-arg $(echo -n ${{ matrix.configuration.image_name }} | awk '{ print toupper($0) }')=${{ matrix.configuration.directory }}/build/libs/${{ matrix.configuration.directory }}-${{ env.VERSION }}.jar \ +# --push . # Temp fix # https://github.com/docker/build-push-action/issues/252 # https://github.com/moby/buildkit/issues/1896 diff --git a/utbot-cli-js/Dockerfile b/utbot-cli-js/Dockerfile index a53d3ce5be..6eb099837d 100644 --- a/utbot-cli-js/Dockerfile +++ b/utbot-cli-js/Dockerfile @@ -15,8 +15,8 @@ RUN apt-get update \ # Install UTBot Javascript CLI -ARG UTBOT_JS_CLI -COPY ${UTBOT_JS_CLI} . +ARG ARTIFACT_PATH +COPY ${ARTIFACT_PATH} . RUN UTBOT_JS_CLI_PATH="$(find /usr/src -type f -name 'utbot-cli*')" \ && ln -s "${UTBOT_JS_CLI_PATH}" /usr/src/utbot-cli.jar \ diff --git a/utbot-cli-python/Dockerfile b/utbot-cli-python/Dockerfile index c12a2fa5a8..6a76e29d21 100644 --- a/utbot-cli-python/Dockerfile +++ b/utbot-cli-python/Dockerfile @@ -17,8 +17,8 @@ RUN apt-get update \ # Install UTBot Python CLI -ARG UTBOT_PYTHON_CLI -COPY ${UTBOT_PYTHON_CLI} . +ARG ARTIFACT_PATH +COPY ${ARTIFACT_PATH} . RUN UTBOT_PYTHON_CLI_PATH="$(find /usr/src -type f -name 'utbot-cli*')" \ && ln -s "${UTBOT_PYTHON_CLI_PATH}" /usr/src/utbot-cli.jar diff --git a/utbot-cli/Dockerfile b/utbot-cli/Dockerfile index dfe848561d..81d1df8855 100644 --- a/utbot-cli/Dockerfile +++ b/utbot-cli/Dockerfile @@ -21,8 +21,8 @@ RUN wget --no-verbose https://github.com/JetBrains/kotlin/releases/download/v${K # Install UTBot Java CLI -ARG UTBOT_JAVA_CLI -COPY ${UTBOT_JAVA_CLI} . +ARG ARTIFACT_PATH +COPY ${ARTIFACT_PATH} . RUN UTBOT_JAVA_CLI_PATH="$(find /usr/src -type f -name 'utbot-cli*')" \ && ln -s "${UTBOT_JAVA_CLI_PATH}" /usr/src/utbot-cli.jar From 7f67568a48046bf344eedc3dccca394e64998c6e Mon Sep 17 00:00:00 2001 From: Egor Vasilyev Date: Mon, 20 Feb 2023 10:42:06 +0300 Subject: [PATCH 28/37] try to push --- .github/workflows/build-and-run-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-run-tests.yml b/.github/workflows/build-and-run-tests.yml index 7633b22b6a..0570f02f6a 100644 --- a/.github/workflows/build-and-run-tests.yml +++ b/.github/workflows/build-and-run-tests.yml @@ -90,7 +90,7 @@ jobs: uses: docker/build-push-action@v4 with: context: . -# push: true + push: true tags: | ${{ steps.meta.outputs.tags }} # ${{ env.REGISTRY }}/${{ github.repository }}/${{ matrix.configuration.image_name }}:${{ env.DOCKER_TAG }} From cd561b6ee744a4d0e50ace993d661fb36ae8faa6 Mon Sep 17 00:00:00 2001 From: Egor Vasilyev Date: Tue, 21 Feb 2023 11:17:13 +0300 Subject: [PATCH 29/37] add permissions explicitly --- .github/workflows/build-and-run-tests.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-and-run-tests.yml b/.github/workflows/build-and-run-tests.yml index 0570f02f6a..4961661179 100644 --- a/.github/workflows/build-and-run-tests.yml +++ b/.github/workflows/build-and-run-tests.yml @@ -27,7 +27,6 @@ jobs: fail-fast: false matrix: configuration: - # image_name has to be the same as ARG in Dockerfile but in lowercase # - image_name: utbot_java_cli # directory: utbot-cli # extra_options: "" @@ -39,6 +38,20 @@ jobs: extra_options: "" runs-on: ubuntu-20.04 container: unittestbot/java-env:java11-zulu-jdk-gradle7.4.2-kotlinc1.7.0 + permissions: + actions: write + checks: write + contents: write + deployments: write + discussions: write + issues: write + metadata: read + packages: write + pages: write + pull-requests: write + repository-projects: write + security-events: write + statuses: write steps: - uses: actions/checkout@v3 From b0271be0e253754123acfdc94a8bbd0cc2a1d188 Mon Sep 17 00:00:00 2001 From: Egor Vasilyev Date: Tue, 21 Feb 2023 11:21:40 +0300 Subject: [PATCH 30/37] reduce permissions --- .github/workflows/build-and-run-tests.yml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/.github/workflows/build-and-run-tests.yml b/.github/workflows/build-and-run-tests.yml index 4961661179..86e85556f7 100644 --- a/.github/workflows/build-and-run-tests.yml +++ b/.github/workflows/build-and-run-tests.yml @@ -39,19 +39,7 @@ jobs: runs-on: ubuntu-20.04 container: unittestbot/java-env:java11-zulu-jdk-gradle7.4.2-kotlinc1.7.0 permissions: - actions: write - checks: write - contents: write - deployments: write - discussions: write - issues: write - metadata: read packages: write - pages: write - pull-requests: write - repository-projects: write - security-events: write - statuses: write steps: - uses: actions/checkout@v3 From b36380b0b4df1523623fd065c9074215db11cb6c Mon Sep 17 00:00:00 2001 From: Egor Vasilyev Date: Tue, 21 Feb 2023 12:39:45 +0300 Subject: [PATCH 31/37] python image name changed --- .github/workflows/build-and-run-tests.yml | 30 ++++++++--------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build-and-run-tests.yml b/.github/workflows/build-and-run-tests.yml index 86e85556f7..27df898ca1 100644 --- a/.github/workflows/build-and-run-tests.yml +++ b/.github/workflows/build-and-run-tests.yml @@ -23,8 +23,7 @@ jobs: # needs: build-and-run-tests # if: ${{ github.event_name == 'push' }} strategy: - # The option forces to execute all jobs even though some of them have failed. - fail-fast: false + fail-fast: false # force to execute all jobs even though some of them have failed matrix: configuration: # - image_name: utbot_java_cli @@ -33,7 +32,7 @@ jobs: - image_name: utbot_js_cli directory: utbot-cli-js extra_options: "-PbuildType=ALL" - - image_name: utbot_python_cli + - image_name: utbot_py_cli directory: utbot-cli-python extra_options: "" runs-on: ubuntu-20.04 @@ -58,13 +57,6 @@ jobs: cd ${{ matrix.configuration.directory }} gradle build --no-daemon --build-cache --no-parallel ${{ matrix.configuration.extra_options }} -Dorg.gradle.jvmargs=-Xmx2g -Dkotlin.daemon.jvm.options=-Xmx4g -x test -PsemVer=${{ env.VERSION }} - - name: Log in to the Container registry - uses: docker/login-action@v2 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 with: @@ -73,6 +65,13 @@ jobs: driver-opts: | image=moby/buildkit:v0.10.6 + - name: Log in to the Container registry + uses: docker/login-action@v2 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + # - name: Cache Docker layers # uses: actions/cache@v3 # with: @@ -87,6 +86,7 @@ jobs: images: ${{ env.REGISTRY }}/${{ github.repository }}/${{ matrix.configuration.image_name }} tags: | type=raw,value=${{ env.DOCKER_TAG }} + - name: Build and push uses: docker/build-push-action@v4 with: @@ -94,22 +94,12 @@ jobs: push: true tags: | ${{ steps.meta.outputs.tags }} -# ${{ env.REGISTRY }}/${{ github.repository }}/${{ matrix.configuration.image_name }}:${{ env.DOCKER_TAG }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new file: ${{ matrix.configuration.directory }}/Dockerfile build-args: | ARTIFACT_PATH=${{ matrix.configuration.directory }}/build/libs/${{ matrix.configuration.directory }}-${{ env.VERSION }}.jar -# - name: Docker Buildx (build and push) -# run: | -# docker buildx build \ -# -f ${{ matrix.configuration.directory }}/Dockerfile \ -# --tag ${{ steps.meta.outputs.tags }} \ -# --cache-from "type=local,src=/tmp/.buildx-cache" \ -# --cache-to "type=local,dest=/tmp/.buildx-cache-new" \ -# --build-arg $(echo -n ${{ matrix.configuration.image_name }} | awk '{ print toupper($0) }')=${{ matrix.configuration.directory }}/build/libs/${{ matrix.configuration.directory }}-${{ env.VERSION }}.jar \ -# --push . # Temp fix # https://github.com/docker/build-push-action/issues/252 # https://github.com/moby/buildkit/issues/1896 From c4989b74112a991e1b889a5acad81be265ea206b Mon Sep 17 00:00:00 2001 From: Egor Vasilyev Date: Tue, 21 Feb 2023 12:56:26 +0300 Subject: [PATCH 32/37] enable caching --- .github/workflows/build-and-run-tests.yml | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build-and-run-tests.yml b/.github/workflows/build-and-run-tests.yml index 27df898ca1..98c8269fe3 100644 --- a/.github/workflows/build-and-run-tests.yml +++ b/.github/workflows/build-and-run-tests.yml @@ -72,13 +72,14 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} -# - name: Cache Docker layers -# uses: actions/cache@v3 -# with: -# path: /tmp/.buildx-cache -# key: ${{ runner.os }}-buildx-${{ matrix.configuration.image_name }}-${{ github.sha }} -# restore-keys: | -# ${{ runner.os }}-buildx-${{ matrix.configuration.image_name }}- + - name: Cache Docker layers + uses: actions/cache@v3 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-${{ matrix.configuration.image_name }}-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-buildx-${{ matrix.configuration.image_name }}- + - name: Docker meta id: meta uses: docker/metadata-action@v3 @@ -103,7 +104,7 @@ jobs: # Temp fix # https://github.com/docker/build-push-action/issues/252 # https://github.com/moby/buildkit/issues/1896 -# - name: Move cache -# run: | -# rm -rf /tmp/.buildx-cache -# mv /tmp/.buildx-cache-new /tmp/.buildx-cache + - name: Move cache + run: | + rm -rf /tmp/.buildx-cache + mv /tmp/.buildx-cache-new /tmp/.buildx-cache From a9d9e96bf8538d4e6052258dbd4d2fe0d31cb0db Mon Sep 17 00:00:00 2001 From: Egor Vasilyev Date: Tue, 21 Feb 2023 12:56:58 +0300 Subject: [PATCH 33/37] remove explicit permissions --- .github/workflows/build-and-run-tests.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/build-and-run-tests.yml b/.github/workflows/build-and-run-tests.yml index 98c8269fe3..336343ebd1 100644 --- a/.github/workflows/build-and-run-tests.yml +++ b/.github/workflows/build-and-run-tests.yml @@ -37,8 +37,6 @@ jobs: extra_options: "" runs-on: ubuntu-20.04 container: unittestbot/java-env:java11-zulu-jdk-gradle7.4.2-kotlinc1.7.0 - permissions: - packages: write steps: - uses: actions/checkout@v3 From d51b600262cab3db204e5108026bfb22661de096 Mon Sep 17 00:00:00 2001 From: Egor Vasilyev Date: Tue, 21 Feb 2023 12:58:50 +0300 Subject: [PATCH 34/37] description about a bu --- .github/workflows/build-and-run-tests.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build-and-run-tests.yml b/.github/workflows/build-and-run-tests.yml index 336343ebd1..3dfa23157a 100644 --- a/.github/workflows/build-and-run-tests.yml +++ b/.github/workflows/build-and-run-tests.yml @@ -32,6 +32,8 @@ jobs: - image_name: utbot_js_cli directory: utbot-cli-js extra_options: "-PbuildType=ALL" + # we can't use utbot_python_cli image name because of the bug while pushing image + # ERROR: unexpected status: 403 Forbidden - image_name: utbot_py_cli directory: utbot-cli-python extra_options: "" From 2c92df8509260669474814ba1e34e77caf516299 Mon Sep 17 00:00:00 2001 From: Egor Vasilyev Date: Tue, 21 Feb 2023 13:07:35 +0300 Subject: [PATCH 35/37] tests enabled --- .github/workflows/build-and-run-tests.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-and-run-tests.yml b/.github/workflows/build-and-run-tests.yml index 3dfa23157a..0d63bf7300 100644 --- a/.github/workflows/build-and-run-tests.yml +++ b/.github/workflows/build-and-run-tests.yml @@ -14,21 +14,21 @@ env: REGISTRY: ghcr.io jobs: -# build-and-run-tests: -# uses: ./.github/workflows/build-and-run-tests-from-branch.yml -# secrets: inherit + build-and-run-tests: + uses: ./.github/workflows/build-and-run-tests-from-branch.yml + secrets: inherit publish-cli-image: -# needs: build-and-run-tests + needs: build-and-run-tests # if: ${{ github.event_name == 'push' }} strategy: fail-fast: false # force to execute all jobs even though some of them have failed matrix: configuration: -# - image_name: utbot_java_cli -# directory: utbot-cli -# extra_options: "" + - image_name: utbot_java_cli + directory: utbot-cli + extra_options: "" - image_name: utbot_js_cli directory: utbot-cli-js extra_options: "-PbuildType=ALL" From 6e8a4994db98861940a1f5515f3541acf1d1a08a Mon Sep 17 00:00:00 2001 From: Sergey Loktev <71882967+zishkaz@users.noreply.github.com> Date: Thu, 2 Mar 2023 06:45:21 +0300 Subject: [PATCH 36/37] Fixing error building intellij plugin --- settings.gradle.kts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/settings.gradle.kts b/settings.gradle.kts index c49cb25b79..8337e46250 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -58,12 +58,9 @@ if (pythonIde.split(",").contains(ideType)) { include("utbot-python-parser") } -if (jsBuild == buildType) { +if (jsBuild == buildType || jsIde.split(",").contains(ideType)) { include("utbot-js") include("utbot-cli-js") -} - -if (jsIde.split(",").contains(ideType)) { include("utbot-intellij-js") } From cbaa376604f04d115bc420ca2dda23f4502b05a1 Mon Sep 17 00:00:00 2001 From: Egor Vasilyev Date: Thu, 2 Mar 2023 11:06:26 +0300 Subject: [PATCH 37/37] switched to prod behaviour --- .github/workflows/build-and-run-tests.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-and-run-tests.yml b/.github/workflows/build-and-run-tests.yml index ddf3a532ee..5a3949e757 100644 --- a/.github/workflows/build-and-run-tests.yml +++ b/.github/workflows/build-and-run-tests.yml @@ -29,7 +29,7 @@ jobs: publish-cli-image: needs: build-and-run-tests -# if: ${{ github.event_name == 'push' }} + if: ${{ github.event_name == 'push' }} strategy: fail-fast: false # force to execute all jobs even though some of them have failed matrix: @@ -109,9 +109,9 @@ jobs: build-args: | ARTIFACT_PATH=${{ matrix.configuration.directory }}/build/libs/${{ matrix.configuration.directory }}-${{ env.VERSION }}.jar - # Temp fix - # https://github.com/docker/build-push-action/issues/252 - # https://github.com/moby/buildkit/issues/1896 + # Temp fix + # https://github.com/docker/build-push-action/issues/252 + # https://github.com/moby/buildkit/issues/1896 - name: Move cache run: | rm -rf /tmp/.buildx-cache