diff --git a/.github/workflows/cli-build-instructions.yml b/.github/workflows/cli-build-instructions.yml index b9cccdb6c..67736b92e 100644 --- a/.github/workflows/cli-build-instructions.yml +++ b/.github/workflows/cli-build-instructions.yml @@ -9,8 +9,13 @@ on: - '*' jobs: + + # Only run 1 or 2 commands for in-source build instructions, just to demonstrate + # what translating between an out-of-source build and an in-source build would + # look like. Rely on out-of-source build steps as the canonical way to + # execute tools in CI and write corresponding documentation. in-source-build: - name: In-source Instructions + name: In-source Instructions (Examples) runs-on: ubuntu-latest steps: - name: Checkout Unicode Tools @@ -41,15 +46,17 @@ jobs: run: mvn -s .github/workflows/mvn-settings.xml -B compile install -DskipTests=true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Run command - Make Unicode Files - run: MAVEN_OPTS="-ea" mvn -s .github/workflows/mvn-settings.xml exec:java -Dexec.mainClass="org.unicode.text.UCD.Main" -Dexec.args="version 15.0.0 build MakeUnicodeFiles" -pl unicodetools -DCLDR_DIR=$(cd ../cldr ; pwd) -DUNICODETOOLS_GEN_DIR=$(cd Generated; pwd) -DUNICODETOOLS_REPO_DIR=$(pwd) -DUVERSION=15.0.0 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Run command - Build and Test run: MAVEN_OPTS="-ea" mvn -s .github/workflows/mvn-settings.xml package -DCLDR_DIR=$(cd ../cldr ; pwd) -DUNICODETOOLS_GEN_DIR=$(cd Generated; pwd) -DUNICODETOOLS_REPO_DIR=$(pwd) -DUVERSION=15.0.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Run command - Make Unicode Files + run: MAVEN_OPTS="-ea" mvn -s .github/workflows/mvn-settings.xml exec:java -Dexec.mainClass="org.unicode.text.UCD.Main" -Dexec.args="version 15.0.0 build MakeUnicodeFiles" -pl unicodetools -DCLDR_DIR=$(cd ../cldr ; pwd) -DUNICODETOOLS_GEN_DIR=$(cd Generated; pwd) -DUNICODETOOLS_REPO_DIR=$(pwd) -DUVERSION=15.0.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + out-of-source-build: name: Out-of-source Instructions runs-on: ubuntu-latest @@ -84,16 +91,58 @@ jobs: mvn -s .github/workflows/mvn-settings.xml -B compile install -DskipTests=true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Run command - Build and Test + run: | + cd unicodetools/mine/src + MAVEN_OPTS="-ea" mvn -s .github/workflows/mvn-settings.xml package -DCLDR_DIR=$(cd ../../../cldr/mine/src ; pwd) -DUNICODETOOLS_GEN_DIR=$(cd ../Generated ; pwd) -DUNICODETOOLS_REPO_DIR=$(pwd) -DUVERSION=15.0.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Run command - Make Unicode Files run: | cd unicodetools/mine/src mvn -s .github/workflows/mvn-settings.xml exec:java -Dexec.mainClass="org.unicode.text.UCD.Main" -Dexec.args="version 15.0.0 build MakeUnicodeFiles" -pl unicodetools -DCLDR_DIR=$(cd ../../../cldr/mine/src ; pwd) -DUNICODETOOLS_GEN_DIR=$(cd ../Generated ; pwd) -DUNICODETOOLS_REPO_DIR=$(pwd) -DUVERSION=15.0.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Run command - Build and Test + + # https://github.com/unicode-org/unicodetools/blob/main/docs/emoji/aac.md#aacorderjava + - name: Run command - AAC Order run: | cd unicodetools/mine/src - MAVEN_OPTS="-ea" mvn -s .github/workflows/mvn-settings.xml package -DCLDR_DIR=$(cd ../../../cldr/mine/src ; pwd) -DUNICODETOOLS_GEN_DIR=$(cd ../Generated ; pwd) -DUNICODETOOLS_REPO_DIR=$(pwd) -DUVERSION=15.0.0 + mvn -s .github/workflows/mvn-settings.xml exec:java -Dexec.mainClass="org.unicode.tools.AacOrder" -Dexec.args="version 15.0.0 build MakeUnicodeFiles" -pl unicodetools -DCLDR_DIR=$(cd ../../../cldr/mine/src ; pwd) -DUNICODETOOLS_GEN_DIR=$(cd ../Generated ; pwd) -DUNICODETOOLS_REPO_DIR=$(pwd) -DUVERSION=15.0.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # https://github.com/unicode-org/unicodetools/blob/main/docs/uca/index.md#tools--tests + # Note: Not running desuffixucd.py in UCA jobs because no version numbers detected in data file names + - name: Run command - UCA - collation validity log + run: | + cd unicodetools/mine/src + # invoke main() in class ...UCA.Main + mvn -s .github/workflows/mvn-settings.xml exec:java -Dexec.mainClass="org.unicode.text.UCA.Main" -Dexec.args="writeCollationValidityLog" -pl unicodetools -DCLDR_DIR=$(cd ../../../cldr/mine/src ; pwd) -DUNICODETOOLS_GEN_DIR=$(cd ../Generated ; pwd) -DUNICODETOOLS_REPO_DIR=$(pwd) -DUVERSION=15.0.0 + # check for output file + compgen -G "../Generated/UCA/*/CheckCollationValidity.html" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # TODO: file issue to uncomment, debug errors, and fix? + # - name: Run command - UCA - for CLDR & ICU + # run: | + # cd unicodetools/mine/src + # # invoke main() in class ...UCA.Main + # mvn -s .github/workflows/mvn-settings.xml exec:java -Dexec.mainClass="org.unicode.text.UCA.Main" -Dexec.args="ICU" -pl unicodetools -DCLDR_DIR=$(cd ../../../cldr/mine/src ; pwd) -DUNICODETOOLS_GEN_DIR=$(cd ../Generated ; pwd) -DUNICODETOOLS_REPO_DIR=$(pwd) -DUVERSION=15.0.0 + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + # https://github.com/unicode-org/unicodetools/blob/main/docs/idna.md + - name: Run command - IDNA + run: | + cd unicodetools/mine/src + # Confirm that the directory for the bin files exists + compgen -G "../Generated/BIN" + # "Delete all the bin files" as per instructions + rm -rf ../Generated/BIN/* + # run GenerateIdna + mvn -s .github/workflows/mvn-settings.xml exec:java -Dexec.mainClass="org.unicode.idna.GenerateIdna" -Dexec.args="" -pl unicodetools -DCLDR_DIR=$(cd ../../../cldr/mine/src ; pwd) -DUNICODETOOLS_GEN_DIR=$(cd ../Generated ; pwd) -DUNICODETOOLS_REPO_DIR=$(pwd) -DUVERSION=15.0.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/docs/build.md b/docs/build.md index 4d664f640..6c3b8b962 100644 --- a/docs/build.md +++ b/docs/build.md @@ -150,12 +150,16 @@ Common tasks for Unicode Tools are listed below with example CLI commands with e - Make Unicode Files: * Out-of-source build: `mvn -s .github/workflows/mvn-settings.xml exec:java -Dexec.mainClass="org.unicode.text.UCD.Main" -Dexec.args="version 14.0.0 build MakeUnicodeFiles" -pl unicodetools -DCLDR_DIR=$(cd ../../../cldr/mine/src ; pwd) -DUNICODETOOLS_GEN_DIR=$(cd ../Generated ; pwd) -DUNICODETOOLS_REPO_DIR=$(pwd) -DUVERSION=14.0.0` + * In-source build: `MAVEN_OPTS="-ea" mvn exec:java -Dexec.mainClass="org.unicode.text.UCD.Main" -Dexec.args="version 14.0.0 build MakeUnicodeFiles" -pl unicodetools -DCLDR_DIR=$(cd ../cldr ; pwd) -DUNICODETOOLS_GEN_DIR=$(cd Generated; pwd) -DUNICODETOOLS_REPO_DIR=$(pwd) -DUVERSION=14.0.0` - Build and Test: * Out-of-source build: `MAVEN_OPTS="-ea" mvn package -DCLDR_DIR=$(cd ../../../cldr/mine/src ; pwd) -DUNICODETOOLS_GEN_DIR=$(cd ../Generated ; pwd) -DUNICODETOOLS_REPO_DIR=$(pwd) -DUVERSION=14.0.0` + * In-source build: `MAVEN_OPTS="-ea" mvn package -DCLDR_DIR=$(cd ../cldr ; pwd) -DUNICODETOOLS_GEN_DIR=$(cd Generated; pwd) -DUNICODETOOLS_REPO_DIR=$(pwd) -DUVERSION=14.0.0` +See the corresponding Github Actions Continuous Integration [workflow file](https://github.com/unicode-org/unicodetools/blob/main/.github/workflows/cli-build-instructions.yml) to see other commonly used tools and specifics on how to invoke them at the command line. + #### Running commands in Eclipse For each individual command in Unicode Tools described above, you can configure a Launch Configuration in one of two ways. diff --git a/docs/idna.md b/docs/idna.md index a99bcc257..61a08181b 100644 --- a/docs/idna.md +++ b/docs/idna.md @@ -4,7 +4,7 @@ 1. Make sure Settings.latestVersion is set right. (If you've already done this for the UCD, no problem). 2. Delete all the bin files to make sure that the unicode tools get the - release versions of the data. (See [Building Unicode Tools](index.md)) + release versions of the data. (See [Building Unicode Tools](build.md)) 2. Run GenerateIdna.java * It will generate {Generated}/idna/{version}/**IdnaMappingTable.txt**