NODE-2609 Light node implementation #2728
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: '8' | |
- 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 | |
- name: Check PR | |
run: sbt --mem 6144 --batch checkPR | |
- uses: dorny/paths-filter@v2 | |
id: filter | |
with: | |
filters: | | |
lang: | |
- 'lang/**' | |
- 'build.sbt' | |
- 'project/*' | |
- name: Compile external sources | |
if: steps.filter.outputs.lang == 'true' | |
run: | | |
sbt lang/assembly | |
git clone https://github.com/waves-exchange/neutrino-contract | |
git clone https://github.com/waves-exchange/contracts | |
git clone https://oauth2:${{ secrets.DUCKS_GITHUB_TOKEN }}@github.com/akharazyan/wavesducks-public | |
git clone https://oauth2:${{ secrets.SWOPFI_GITLAB_TOKEN }}@gitlabwp.wvservices.com/swopfi/swopfi-smart-contracts | |
find neutrino-contract/script -name "*.ride" -type f -exec java -jar lang/jvm/target/file-compiler.jar {} +; | |
find contracts/ride -name "*.ride" -type f -exec java -jar lang/jvm/target/file-compiler.jar {} +; | |
find wavesducks-public/ride -name "*.ride" -type f -exec java -jar lang/jvm/target/file-compiler.jar {} +; | |
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' | |
env: | |
PGP_PASSPHRASE: ${{ secrets.OSSRH_GPG_PASSPHRASE }} | |
PGP_SECRET: ${{ secrets.OSSRH_GPG_KEY_BASE64 }} | |
SONATYPE_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} | |
SONATYPE_USERNAME: ${{ secrets.OSSRH_USERNAME }} |