Skip to content

Commit

Permalink
Merge remote-tracking branch 'github/PR/9' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
floscher committed Jul 10, 2022
2 parents d0f7731 + 9e8f607 commit 03ea278
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 2 deletions.
72 changes: 72 additions & 0 deletions .github/workflows/ant.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Java CI

on:
push:
branches: [ main, fixup-tests ]
pull_request:
branches: [ main ]
release:
types: [created]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'temurin'
- name: Cache
uses: actions/cache@v2.0.0
with:
path: |
~/.ivy2/cache/
$GITHUB_WORKSPACE/josm/core/tools/
key: ${{ runner.os }}-ivy2-${{ hashFiles('josm/plugins/${{ github.event.repository.name }}/build.xml', 'josm/plugins/00_core_tools/ivy.xml', 'josm/core/ivy.xml', 'josm/core/tools/ivy.xml') }}
- name: Clone JOSM
run: |
svn co --depth=immediates https://josm.openstreetmap.de/osmsvn/applications/editors/josm $GITHUB_WORKSPACE/josm
cd $GITHUB_WORKSPACE/josm
svn up --set-depth=immediates plugins
svn up --set-depth=infinity --accept=theirs-full core i18n plugins/{00_core_test_config,00_core_test_lib,00_core_tools,00_tools}
svn propget svn:externals | grep core | xargs -L1 svn co
cd core
ant dist
cd ../plugins
svn propget svn:externals | grep 00_core | xargs -L1 svn co
- uses: actions/checkout@v3
with:
path: josm/plugins/${{ github.event.repository.name }}
- name: Build with Ant
run: |
cd $GITHUB_WORKSPACE/josm/plugins/${{ github.event.repository.name }}
if [ $GITHUB_REF_TYPE == "tag" ]; then
version=$GITHUB_REF_NAME
else
version="$GITHUB_REF_NAME-$GITHUB_SHA"
fi
ant -noinput -buildfile build.xml -Dplugin.version=$version
- name: Test with Ant
run: |
cd $GITHUB_WORKSPACE/josm/plugins/${{ github.event.repository.name }}
ant -noinput -buildfile build.xml -Dplugin.version=$version -Dtest.headless test
- name: Dump errors if failed
if: ${{ failure() }}
run: "grep -L ', Failures: 0, Skipped: ' test/report/*.txt | xargs cat"
- name: Upload Ant reports
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: Ant reports for JOSM plugin ${{ github.event.repository.name }}
path: |
$GITHUB_WORKSPACE/josm/plugins/${{ github.event.repository.name }}/test/report/*.txt
$GITHUB_WORKSPACE/josm/plugins/${{ github.event.repository.name }}/test/report/TEST*.xml
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
josm/dist/${{ github.event.repository.name }}.jar
josm/dist/${{ github.event.repository.name }}-javadoc.jar
josm/dist/${{ github.event.repository.name }}-sources.jar
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ public void actionPerformed(ActionEvent e) {
return;
}
ClipboardUtils.copyString(pattern
.replace("{lat}", Double.toString(node.getCoor().lat()))
.replace("{lon}", Double.toString(node.getCoor().lon())));
.replace("{lat}", Double.toString(node.lat()))
.replace("{lon}", Double.toString(node.lon())));
}

@Override
Expand Down

0 comments on commit 03ea278

Please sign in to comment.