-
-
Notifications
You must be signed in to change notification settings - Fork 752
189 lines (178 loc) · 6.52 KB
/
icu4j.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
# Copyright (C) 2016 and later: Unicode, Inc. and others.
# License & terms of use: http://www.unicode.org/copyright.html
#
# GitHub Action configuration script for ICU continuous integration tasks.
name: GHA ICU4J
on:
push:
branches:
- main
- 'maint/maint*'
paths:
- 'icu4j/**'
- 'testdata/**'
- '.github/workflows/**'
pull_request:
branches: '**'
paths:
- 'icu4j/**'
- 'testdata/**'
- '.github/workflows/**'
workflow_dispatch:
# To trigger the Env Test workflow manually, follow the instructions in
# https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow
# For non-release branches (namely: PRs), only run CI on the most recent commit. Cancel
# runs on previous commits mid-flight when new commits are pushed.
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-only-cancel-in-progress-jobs-on-specific-branches
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ !contains(github.ref, 'maint/') && github.ref != 'main' }}
env:
SHARED_MVN_ARGS: '--show-version --no-transfer-progress'
permissions:
contents: read
jobs:
# Initialize the Maven artifact cache
#
# This job is created according to the cache strategy of reuse from a single job:
# https://github.com/actions/cache/blob/main/caching-strategies.md#make-cache-read-only--reuse-cache-from-centralized-job
icu4j-mvn-init-cache:
runs-on: ubuntu-22.04 # Updated in BRS
steps:
- name: Checkout and setup
uses: actions/checkout@v4
with:
lfs: true
- name: Checkout lfs objects
run: git lfs pull
- name: Cache local Maven repository
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '8'
# Download all of the artifacts needed for the code and build plugins, but
# exclude any needed by profiles depending on system artifacts
- name: Download all artifacts
run: |
cd icu4j;
mvn ${SHARED_MVN_ARGS} dependency:go-offline -P '!old_jdk_taglet'
# ICU4J build and unit test using Maven
# https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
icu4j-mvn-build-and-test:
needs: icu4j-mvn-init-cache
strategy:
fail-fast: false
matrix:
java-version: [ '8', '11', '17', '21' ]
runs-on: ubuntu-22.04 # Updated in BRS
steps:
- name: Checkout and setup
uses: actions/checkout@v4
with:
lfs: true
- name: Checkout lfs objects
run: git lfs pull
- name: Restore read-only cache of local Maven repository
uses: actions/cache/restore@v4
id: cache
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ matrix.java-version }}
- name: ICU4J
run: |
cd icu4j;
mvn ${SHARED_MVN_ARGS} verify
- name: List failures (if any)
run: |
cd icu4j && cat `find . -name surefire-reports -type d -exec grep -l -r --include="*.txt" FAILED {} \;`;
if: ${{ failure() }}
# ICU4J build and unit test under lstm
lstm-icu4j-build-and-test:
if: false # TODO(ICU-22505)
needs: icu4j-mvn-init-cache
runs-on: ubuntu-22.04 # Updated in BRS
steps:
- name: Checkout and setup
uses: actions/checkout@v4
with:
lfs: true
- name: Checkout lfs objects
run: git lfs pull
- name: Restore read-only cache of local Maven repository
uses: actions/cache/restore@v4
id: cache
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
lookup-only: true
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
- name: Config LSTM and Rebuild data jar
run: |
cd icu4c/source;
ICU_DATA_BUILDTOOL_OPTS=--include_uni_core_data ICU_DATA_FILTER_FILE=../../.github/lstm_for_th_my.json ./runConfigureICU --enable-debug --disable-release Linux -disable-layoutex;
make clean;
make -j -l4.5 ICU4J_ROOT=../../../icu4j icu4j-data-install;
cd ../..
- name: ICU4J
run: |
cd icu4j;
mvn ${SHARED_MVN_ARGS} verify
- name: List failures (if any)
run: |
cd icu4j && cat `find . -name surefire-reports -type d -exec grep -l -r --include="*.txt" FAILED {} \;`;
if: ${{ failure() }}
# ICU4J build and unit test under adaboost
adaboost-icu4j-build-and-test:
if: false # Temporary disable, until we disable the .jar creation from C and distribute the individual files
needs: icu4j-mvn-init-cache
runs-on: ubuntu-22.04 # Updated in BRS
steps:
- name: Checkout and setup
uses: actions/checkout@v4
with:
lfs: true
- name: Checkout lfs objects
run: git lfs pull
- name: Restore read-only cache of local Maven repository
uses: actions/cache/restore@v4
id: cache
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
lookup-only: true
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
- name: Config Adaboost and Rebuild data jar
run: |
cd icu4c/source;
ICU_DATA_BUILDTOOL_OPTS=--include_uni_core_data ICU_DATA_FILTER_FILE=../../.github/adaboost.json CPPFLAGS=-DUCONFIG_USE_ML_PHRASE_BREAKING=1 ./runConfigureICU --enable-debug --disable-release Linux -disable-layoutex;
make clean;
make -j -l4.5 ICU4J_ROOT=../../../icu4j icu4j-data-install;
cd ../..
- name: ICU4J
run: |
cd icu4j;
mvn ${SHARED_MVN_ARGS} -Dcom.ibm.icu.impl.breakiter.useMLPhraseBreaking=true verify
- name: List failures (if any)
run: |
cd icu4j && cat `find . -name surefire-reports -type d -exec grep -l -r --include="*.txt" FAILED {} \;`;
if: ${{ failure() }}