UTC-176-C32 Adding capital double thorn/wynn (#635) #2629
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: Build JSP | |
env: | |
CURRENT_UVERSION: 17.0.0 # FIX_FOR_NEW_VERSION | |
PREVIOUS_UVERSION: 16.0.0 # not used at present | |
on: | |
push: | |
branches: | |
- '*' | |
pull_request: | |
branches: | |
- '*' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Get the CLDR_REF from pom.xml | |
id: cldr_ref | |
run: echo "CLDR_REF="$(mvn help:evaluate -Dexpression=cldr.version -q -DforceStdout | cut -d- -f3) >> $GITHUB_OUTPUT && cat ${GITHUB_OUTPUT} | |
- name: Verify CLDR checkout ref | |
run: echo CLDR_REF="${{ steps.cldr_ref.outputs.CLDR_REF }}" && [ "${{ steps.cldr_ref.outputs.CLDR_REF }}x" != "x" ] # fail if empty | |
- name: Cache CLDR repository | |
uses: actions/cache@v3 | |
with: | |
path: cldr | |
key: cldr-${{ steps.cldr_ref.outputs.CLDR_REF }} | |
restore-keys: | | |
cldr | |
- name: Check out CLDR | |
uses: actions/checkout@v3 | |
with: | |
repository: unicode-org/cldr | |
path: cldr | |
ref: main | |
fetch-depth: 0 | |
- name: Switch CLDR to CLDR_REF | |
run: cd cldr && git fetch && git checkout ${{ steps.cldr_ref.outputs.CLDR_REF }} | |
- name: Backup Unicodetools and CLDR for jsps # this is needed only for the Docker build | |
run: | |
mkdir -p UnicodeJsps/target && tar -cpz --exclude=.git -f UnicodeJsps/target/cldr-unicodetools.tgz ./cldr ./unicodetools | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 11 | |
- name: Cache local Maven repository | |
uses: actions/cache@v2 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
# TODO: move this DOWN after JSPs once it works | |
- name: Regenerate the property cache files | |
run: > | |
mkdir -pv $(pwd)/Generated/ && | |
mvn -s .github/workflows/mvn-settings.xml compile exec:java -Dexec.mainClass="org.unicode.jsp.RebuildPropertyCache" | |
-am -pl unicodetools | |
-DCLDR_DIR=${GITHUB_WORKSPACE}/cldr | |
-DUNICODETOOLS_REPO_DIR=$(pwd) | |
-DUNICODETOOLS_GEN_DIR=$(pwd)/Generated && | |
tar -cpz -f UnicodeJsps/target/generated.tgz ./Generated | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Package JSPs | |
run: > | |
mvn -s .github/workflows/mvn-settings.xml -B -am -pl UnicodeJsps package -DskipTests=true -DCLDR_DIR=${GITHUB_WORKSPACE}/cldr | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Upload UnicodeJsps.war | |
uses: actions/upload-artifact@v3 | |
with: | |
name: UnicodeJsps | |
path: UnicodeJsps/target/UnicodeJsps.war | |
- name: build docker image | |
run: cd UnicodeJsps && bash update-bidic-ucd.sh && docker build . | |