-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding EN16931 accuracy functionality:
1) Solely usage of decimal-based floating-point & 2) Exchanging round() with 'half-away-from-zero' rounding (called 'half-up' rounding in Java)
- Loading branch information
1 parent
2837417
commit 64aef19
Showing
20 changed files
with
1,513 additions
and
25 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Publish JAR on tagging | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: '11' | ||
distribution: 'adopt' | ||
cache: maven | ||
- name: Build with Maven | ||
run: mvn -B package --file pom.xml | ||
# This step reads the pom.xml from repo and use its version for the release | ||
# This works on any self-hosted runner OS | ||
- name: Read pom.xml and use its version for new release | ||
# run: | | ||
# echo ::set-env name=VERSION::$(grep -a -m 1 "<version>" | sed 's/.*<version>//p' | head -1 | sed 's/<\/version>//p' | head -1) | ||
run: | | ||
echo "release_version=$(cat pom.xml | grep -a -m 1 "<version>" | sed 's/.*<version>//p' | head -1 | sed 's/<\/version>//p' | head -1)" >> $GITHUB_ENV | ||
#id: read_version | ||
#shell: bash | ||
#run: | | ||
# v=$(cat pom.xml) # <--- Read pom.xml | ||
# v="${grep -a -m 1 "<version>" | sed 's/.*<version>//p' | head -1 | sed 's/<\/version>//p' | head -1 }" # get version number from pom.xml | ||
# echo "::set-output name=RELEASE_VERSION::$v" # <--- Set environment variable | ||
- name: Upload binaries to release | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: target/Saxon-HE-accuracy-${{ env.release_version }}.jar | ||
asset_name: Saxon-HE-accuracy-${{ env.release_version }}.jar | ||
tag: v${{ env.release_version }} # <--- Use environment variables that was created earlier | ||
overwrite: true | ||
body: "This is a Saxon v${{ env.release_version }} release using decimal-based floating-point and offers half-up rounding as an extension function.\n | ||
The JAR might be called as [Saxon JAR via command-line](https://www.saxonica.com/html/documentation/using-xsl/commandline/).\n | ||
For instance, in the root of the GitHub repository after executing a build via 'mvn clean install' the following might be executed by command line:\n | ||
(here using Linux file paths from Linux)\n | ||
\n | ||
~~~ Java\n | ||
java -jar ./target/Saxon-HE-accuracy-${{ env.release_version }}.jar -s:src/test/resources/xml/in.xml -xsl:src/test/resources/xsl/test.xsl -o:target/generated-sources/out.xml\n | ||
~~~\n | ||
\n" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven | ||
|
||
name: Java CI with Maven | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: '11' | ||
distribution: 'adopt' | ||
cache: maven | ||
- name: Build with Maven | ||
run: mvn -B package --file pom.xml |
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
Oops, something went wrong.