Skip to content

Commit

Permalink
Merge github/version-1.5.x
Browse files Browse the repository at this point in the history
  • Loading branch information
vsuharnikov committed Dec 26, 2024
2 parents 84723ef + 7b3bb0e commit 383e730
Show file tree
Hide file tree
Showing 639 changed files with 3,866 additions and 4,486 deletions.
74 changes: 27 additions & 47 deletions .github/workflows/check-pr.yaml
Original file line number Diff line number Diff line change
@@ -1,41 +1,31 @@
name: Check PR
on:
push:
branches:
- version-[0-9].[0-9]+.x
tags:
- v[0-9].[0-9]+.[0-9]+
pull_request:

jobs:
check-pr:
name: Check PR
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
distribution: 'temurin'
java-version: '11'
- name: Cache SBT
uses: actions/cache@v3
with:
path: ~/.sbt
key: sbt-cache-${{ hashFiles('project/build.properties') }}
- name: Cache Coursier
uses: actions/cache@v3
with:
path: ~/.cache/coursier
key: coursier-cache
cache: 'sbt'
gpg-private-key: ${{ secrets.OSSRH_GPG_KEY }}
gpg-passphrase: ${{ secrets.OSSRH_GPG_PASSPHRASE }}
- uses: sbt/setup-sbt@v1
- name: Check PR
run: sbt --mem 6144 --batch ";checkPR;completeQaseRun"
run: sbt -J-Xlog:gc*=debug:file=./gc.log --mem 8096 --batch ";checkPR;completeQaseRun"
env:
QASE_ENABLE: true
QASE_RUN_NAME: checkPR
QASE_RUN_ID: 1
QASE_PROJECT_CODE: PR
QASE_API_TOKEN: ${{ secrets.QASE_API_TOKEN }}
CHECKPR_RUN_ID: ${{ github.run_id }}
- uses: dorny/paths-filter@v2
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
Expand All @@ -57,33 +47,23 @@ jobs:
find swopfi-smart-contracts/dApps -name "*.ride" -type f -exec java -jar lang/jvm/target/file-compiler.jar {} +;
- name: Clean cache
run: find ~/.cache/coursier -type d -name '*SNAPSHOT' | xargs rm -vrf {} \;
- name: Prepare version
if: false # steps.filter.outputs.lang == 'true'
id: sbt-version
run: |
sbt_version=$(cut -d\" -f2 version.sbt)
git_ref=${GITHUB_REF##*/}
echo ${{ github.event }}
pr_number=${{ github.event.number }}
if [[ $git_ref =~ v[0-9]+\.[0-9]+\.[0-9]+$ ]] ; then
if [[ v$sbt_version != $git_ref ]] ; then
echo SBT version $sbt_version does not match tag $git_ref
exit 1
fi
else
if [[ $pr_number != "" ]] ; then
sbt_version=$sbt_version-$pr_number-SNAPSHOT
else
sbt_version=$sbt_version-SNAPSHOT
fi
echo "ThisBuild / version := \"$sbt_version\"" >> version.sbt
echo Setting version to $sbt_version
fi
- name: Publish lang
run: sbt ci-release
if: false # steps.filter.outputs.lang == 'true'
- name: Publish snapshots
if: ${{ contains(github.event.pull_request.labels.*.name, 'publish-snapshots') }}
env:
PGP_PASSPHRASE: ${{ secrets.OSSRH_GPG_PASSPHRASE }}
PGP_SECRET: ${{ secrets.OSSRH_GPG_KEY_BASE64 }}
SONATYPE_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.OSSRH_USERNAME }}
PGP_PASSPHRASE: ${{ secrets.OSSRH_GPG_PASSPHRASE }}
run: |
version=$(echo ${{ github.base_ref }} | awk -F '[-\.]' '{print $2"."$3}')
pr_number=${{ github.event.number }}
sbt -Dproject.version=$version-$pr_number-SNAPSHOT --mem 4096 --batch publishSigned
- name: Save debug data
uses: actions/upload-artifact@v4
if: always()
with:
if-no-files-found: ignore
name: debug-data
path: |
gc.log
hs*.log
core*
66 changes: 66 additions & 0 deletions .github/workflows/publish-docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Publish Docker image

on:
workflow_dispatch:
inputs:
dockerTag:
description: 'Docker tag'
required: true
type: string
baseImage:
description: 'Base image'
required: true
default: 'eclipse-temurin:11-jre-noble'
type: string

env:
IMAGE_NAME: ghcr.io/${{ github.repository }}

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
attestations: write
id-token: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 20
fetch-tags: true
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
cache: 'sbt'
- uses: sbt/setup-sbt@v1
- run: sbt --mem 4096 --batch buildTarballsForDocker
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/setup-buildx-action@v3
- uses: docker/metadata-action@v5
id: meta
with:
images: ${{ env.IMAGE_NAME }}
flavor: latest=false
tags: type=raw,value=${{ inputs.dockerTag }}
labels: |
org.opencontainers.image.source=https://github.com/${{ github.repository }}
org.opencontainers.image.licenses=MIT
org.opencontainers.image.description="Waves Node"
- uses: docker/build-push-action@v5
id: push
with:
context: ./docker
platforms: linux/amd64,linux/arm64
push: true
pull: true
build-args: baseImage=${{ inputs.baseImage }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
105 changes: 0 additions & 105 deletions .github/workflows/publish-docker-node.yaml

This file was deleted.

30 changes: 0 additions & 30 deletions .github/workflows/publish-node-sbt-builder.yml

This file was deleted.

Loading

0 comments on commit 383e730

Please sign in to comment.