-
Notifications
You must be signed in to change notification settings - Fork 536
172 lines (133 loc) · 3.91 KB
/
pr.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
name: Pull request validation
on: pull_request
jobs:
valid-asset-names:
name: Validate Asset Names
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check asset directories are valid for Windows
run: |
ls assets | python3 -c """
import sys
assets_dir = sys.stdin.read().strip().split('\n')
invalid_asset_dirs = []
for dir in assets_dir:
if dir.endswith(' '):
invalid_asset_dirs.append(dir)
if invalid_asset_dirs:
print('Invalid asset directories, remove the trailing space')
print(invalid_asset_dirs)
exit(1)
"""
valid-asset-fills:
name: Validate Asset Fills
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check that all SVGs have the right fill
run: |
error_found=false
for file in $(find ./assets -type f -name "*.svg" -exec grep -L 'fill="#212121"' {} \;); do
echo "Error: $file does not have 'fill=\"#212121\"' or has a different fill."
error_found=true
done
if [[ $error_found == true ]]; then
exit 1
fi
build-ios:
name: Build iOS library
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node 18
uses: actions/setup-node@v1
with:
node-version: 18.x
- run: npm install
- name: Run generate script
run: npm run deploy:ios
working-directory: importer
build-android:
name: Build Android library
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node 18
uses: actions/setup-node@v1
with:
node-version: 18.x
- run: npm install
- name: Run generate script
run: npm run deploy:android
working-directory: importer
- name: Setup Java
uses: actions/setup-java@v1
with:
java-version: 11
# https://github.com/marketplace/actions/gradle-command
- name: Build Android library
uses: eskatos/gradle-command-action@v1
with:
arguments: assembleRelease
build-root-directory: android
wrapper-directory: android
- name: Generate BUILD.gn file for Android
run: python3 generate_build_gn_android.py
working-directory: importer
build-flutter:
name: Build Flutter library
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node 18
uses: actions/setup-node@v1
with:
node-version: 18.x
- run: npm install
- name: Run generate script
run: npm run deploy:flutter
working-directory: importer
# Build Flutter library
# The name should be same as the package name on pub.dev
# Tokens are placeholder strings in order for the action to run on forked repos.
- name: 'fluentui_system_icons'
uses: k-paxian/dart-package-publisher@master
with:
relativePath: 'flutter'
skipTests: true
dryRunOnly: true
accessToken: "placeholder"
refreshToken: "placeholder"
build-svg:
name: Build svg library
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node 18
uses: actions/setup-node@v1
with:
node-version: 18.x
- run: npm install
- name: Run build
run: npm run build
working-directory: packages/svg-icons
build-react:
name: Build react library
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node 18
uses: actions/setup-node@v1
with:
node-version: 18.x
- run: npm install
- run: |
npm run build
working-directory: packages/react-icons
- run: |
npm run build
working-directory: packages/react-icons-font-subsetting-webpack-plugin
- run: |
npm run test
working-directory: packages/react-icons-font-subsetting-webpack-plugin