-
Notifications
You must be signed in to change notification settings - Fork 39
171 lines (131 loc) · 4.42 KB
/
intl4x.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
name: package:intl4x
permissions: read-all
on:
pull_request:
branches: [ main ]
paths:
- '.github/workflows/intl4x.yml'
- 'pkgs/intl4x/**'
- 'submodules/**'
push:
branches: [ main ]
paths:
- '.github/workflows/intl4x.yml'
- 'pkgs/intl4x/**'
- 'submodules/**'
schedule:
- cron: '0 0 * * 0' # weekly
jobs:
build_checkout:
runs-on: ${{ matrix.os }}
env:
ICU4X_BUILD_MODE: checkout
LOCAL_ICU4X_CHECKOUT: ${{ github.workspace }}/submodules/icu4x
defaults:
run:
working-directory: pkgs/intl4x
strategy:
matrix:
sdk: [dev]
os: [ubuntu-latest, windows-latest, macos-latest]
include:
- sdk: dev
run-tests: true
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
with:
submodules: true
- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672
with:
sdk: ${{matrix.sdk}}
- run: dart --enable-experiment=native-assets pub get
- run: dart --enable-experiment=native-assets analyze --fatal-infos
- run: dart --enable-experiment=native-assets format --output=none --set-exit-if-changed .
if: ${{matrix.run-tests}}
- run: dart --enable-experiment=native-assets test
if: ${{matrix.run-tests}}
- run: dart --enable-experiment=native-assets test -p chrome
if: ${{matrix.run-tests}}
build_fetch:
runs-on: ${{ matrix.os }}
env:
ICU4X_BUILD_MODE: fetch
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
defaults:
run:
working-directory: pkgs/intl4x
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
with:
submodules: true
- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672
with:
sdk: dev
- run: dart --enable-experiment=native-assets pub get
- run: dart --enable-experiment=native-assets test
build_local:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
runs-on: ${{ matrix.os }}
env:
ICU4X_BUILD_MODE: local
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
with:
submodules: true
- name: Install Rust toolchains
run: |
rustup toolchain install stable
- name: Show the selected Rust toolchain
run: rustup show
- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672
with:
sdk: dev
- name: Build Linux
if: matrix.os == 'ubuntu-latest'
run: |
cd submodules/icu4x
mkdir bin
cd ffi/dart
dart pub get
cd ../..
dart run ffi/dart/tool/build_libs.dart bin/linux_x64 linux_x64 dynamic icu_collator,icu_datetime,icu_list,icu_decimal,icu_plurals,experimental_components,compiled_data
- name: Build Mac
if: matrix.os == 'macos-latest'
run: |
cd submodules/icu4x
mkdir bin
cd ffi/dart
dart pub get
cd ../..
dart run ffi/dart/tool/build_libs.dart bin/macos_arm64 macos_arm64 dynamic icu_collator,icu_datetime,icu_list,icu_decimal,icu_plurals,experimental_components,compiled_data
- name: Build Windows
if: matrix.os == 'windows-latest'
run: |
cd submodules/icu4x
mkdir bin
cd ffi/dart
dart pub get
cd ../..
dart run ffi/dart/tool/build_libs.dart bin/windows_x64 windows_x64 dynamic icu_collator,icu_datetime,icu_list,icu_decimal,icu_plurals,experimental_components,compiled_data
- run: echo "LOCAL_ICU4X_BINARY=$(realpath submodules/icu4x/bin/linux_x64)" >> $GITHUB_ENV
if: matrix.os == 'ubuntu-latest'
- run: echo "LOCAL_ICU4X_BINARY=$(realpath submodules/icu4x/bin/macos_arm64)" >> $GITHUB_ENV
if: matrix.os == 'macos-latest'
- run: echo ("LOCAL_ICU4X_BINARY=" + (Get-Item submodules\icu4x\bin\windows_x64).FullName -replace '/', '\') >> $env:GITHUB_ENV
if: matrix.os == 'windows-latest'
- run: echo $LOCAL_ICU4X_BINARY
- name: Display structure of downloaded files
run: ls -R
- name: Run `dart pub get`
run: |
cd pkgs/intl4x
dart pub get
- name: Run `dart test`
run: |
cd pkgs/intl4x
dart --enable-experiment=native-assets test