forked from unicode-org/icu
-
Notifications
You must be signed in to change notification settings - Fork 0
146 lines (132 loc) · 5.88 KB
/
icu_envtest.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
# Copyright (C) 2023 and later: Unicode, Inc. and others.
# License & terms of use: http://www.unicode.org/copyright.html
#
# GitHub Action configuration script for ICU environment test tasks.
#
name: GHA EnvTest
on:
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
schedule:
# This cron schedule is set to run 10:23 UTC every SAT
- cron: '23 10 * * SAT'
# In addition, during the major release cycle (in March/April, September/October),
# this cron schedule is set to run 10:21 UTC every Workday and Sunday.
- cron: '21 10 * MAR,APR,SEP,OCT MON-FRI,SUN'
permissions:
contents: read
jobs:
#=================================================================
# locale env tests.
env-test-locale:
runs-on: ubuntu-latest
strategy:
# "fail-fast: false" let other jobs keep running even if the test break in some locales.
fail-fast: false
matrix:
# Since we have total 500+ locales to run on three set of test, we create
# many jobs to test concurrently.
# shard is used to bucket the lines from the locale list into jobs.
# Currently we run testing of 30 locales per shard, and we have total 17 shards.
# 17x30 = 510 > 502 (the number of locales in 'locale -a').
tests_per_shard: [30]
shard: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
steps:
- name: Install all locales by apt-get
run: |
sudo apt-get update -y;
sudo apt-get install -y locales-all;
- name: Show installed locales post apt-get
run: |
locale -a;
- name: Checkout and setup
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Build
run: |
cd icu4c/source/;
./runConfigureICU Linux;
make -j -l4.5 tests;
- name: Test different locales as LC_ALL
run: |
echo "This job run the environment test of the following Locales";
begin=$(( ${{matrix.shard}} * ${{matrix.tests_per_shard}} + 1));
end=$(( (${{matrix.shard}}+1) * ${{matrix.tests_per_shard}} ));
sedarg=${begin},${end}p;
locale -a |sed -n ${sedarg};
cd icu4c/source/test;
for loc in `locale -a |sed -n ${sedarg}`;
do
echo "============================================";
echo "Start Tests under LC_ALL=$loc locale";
for test_dir in iotest cintltst intltest
do
cd $test_dir;
LC_ALL=$loc make -j -l4.5 check;
cd ..;
done
echo "Complete Tests under LC_ALL=$loc locale";
echo "============================================";
done
echo "This job completed the test of the following Locales";
locale -a |sed -n ${sedarg};
#=================================================================
# tz env tests.
env-test-tz:
runs-on: ubuntu-latest
strategy:
# "fail-fast: false" let other jobs keep running even if the test break in some timezones.
fail-fast: false
matrix:
# Since we have total 600+ timezones to run on three set of test, we create
# many jobs to test concurrently.
# shard is used to bucket the lines from the timezone list into jobs.
# Currently we run testing of 30 timezones per shard, and we have total 21 shards.
# 21x30 = 630 > 604 (the number of known timezones).
tests_per_shard: [30]
shard: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
steps:
- name: Install all locales by apt-get
run: |
sudo apt-get update -y;
sudo apt-get install -y tzdata;
- name: Show all the TimeZones
run: |
echo "Total number of TimeZone is "
find /usr/share/zoneinfo/ -type f,l|egrep -v "/(right|posix)/"|egrep -v "\.tab"|wc -l;
find /usr/share/zoneinfo/ -type f,l|egrep -v "/(right|posix)/"|egrep -v "\.tab"|cut -d '/' -f5-50;
- name: Checkout and setup
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Build
run: |
cd icu4c/source/;
./runConfigureICU Linux;
make -j -l4.5 tests;
- name: Test different locales as TZ
run: |
echo "This job run the environment test of the following TimeZones";
begin=$(( ${{matrix.shard}} * ${{matrix.tests_per_shard}} + 1));
end=$(( (${{matrix.shard}}+1) * ${{matrix.tests_per_shard}} ));
sedarg=${begin},${end}p;
find /usr/share/zoneinfo/ -type f,l|egrep -v "/(right|posix)/"|egrep -v "\.tab"|sed -n ${sedarg}|cut -d '/' -f5-50;
echo "The tzdb version on this machine is:";
head -1 /usr/share/zoneinfo/tzdata.zi;
cd icu4c/source/test;
for tz in `find /usr/share/zoneinfo/ -type f,l|egrep -v "/(right|posix)/"|egrep -v "\.tab"|sed -n ${sedarg}|cut -d '/' -f5-50`;
do
echo "============================================";
echo "zdump of the system timezone $tz";
zdump $tz;
echo "Start Tests under TZ=$tz TimeZone";
for test_dir in iotest cintltst intltest
do
cd $test_dir;
TZ=$tz make -j -l4.5 check;
cd ..;
done
echo "Complete Tests under TZ=$tz TimeZone";
echo "============================================";
done
echo "This job completed the test of the following TimeZones";
find /usr/share/zoneinfo/ -type f,l|egrep -v "/(right|posix)/"|egrep -v "\.tab"|sed -n ${sedarg}|cut -d '/' -f5-50;
#=================================================================