-
Notifications
You must be signed in to change notification settings - Fork 39
133 lines (112 loc) · 5.68 KB
/
intl4x_artifacts.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
name: Generate artifacts for intl4x
permissions:
contents: write
on:
push:
tags:
- 'intl4x-v.*'
pull_request: # DO NOT SUBMIT
env:
cratename: icu_capi
icu_version: 75cb5b6d114f116894ec4448fe7b7a8f62909876 #set to [email protected] or a similar constraint at some point
jobs:
dart-libs:
name: "Build Dart binaries"
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
with:
repository: unicode-org/icu4x
ref: ${{ env.icu_version }}
- name: Install Rust toolchains
run: |
rustup toolchain install stable
- name: Show the selected Rust toolchain
run: rustup show
- uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d
with:
sdk: dev
- name: Setup additional linkers
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get install gcc-aarch64-linux-gnu gcc-arm-linux-gnueabihf gcc-riscv64-linux-gnu gcc-i686-linux-gnu
echo "[target]" >> .cargo/config.toml
echo "aarch64-linux-android.linker=\"$ANDROID_NDK_LATEST_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android30-clang\"" >> .cargo/config.toml
echo "armv7-linux-androideabi.linker=\"$ANDROID_NDK_LATEST_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi30-clang\"" >> .cargo/config.toml
echo "i686-linux-android.linker=\"$ANDROID_NDK_LATEST_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/i686-linux-android30-clang\"" >> .cargo/config.toml
echo "x86_64-linux-android.linker=\"$ANDROID_NDK_LATEST_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android30-clang\"" >> .cargo/config.toml
echo "riscv64-linux-android.linker=\"$ANDROID_NDK_LATEST_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/riscv64-linux-android35-clang\"" >> .cargo/config.toml
echo "aarch64-unknown-linux-gnu.linker=\"aarch64-linux-gnu-gcc\"" >> .cargo/config.toml
echo "armv7-unknown-linux-gnueabihf.linker=\"arm-linux-gnueabihf-gcc\"" >> .cargo/config.toml
echo "riscv64gc-unknown-linux-gnu.linker=\"riscv64-linux-gnu-gcc\"" >> .cargo/config.toml
- name: pub get
run: |
cd ffi/dart
dart --enable-experiment=native-assets pub get
cd ../..
- name: Build Linux
if: matrix.os == 'ubuntu-latest'
run: |
mkdir bin
dart run ffi/dart/tool/build_libs.dart bin/android_arm android_arm
dart run ffi/dart/tool/build_libs.dart bin/android_arm64 android_arm64
dart run ffi/dart/tool/build_libs.dart bin/android_ia32 android_ia32
dart run ffi/dart/tool/build_libs.dart bin/android_x64 android_x64
dart run ffi/dart/tool/build_libs.dart bin/linux_arm linux_arm
dart run ffi/dart/tool/build_libs.dart bin/linux_arm64 linux_arm64
dart run ffi/dart/tool/build_libs.dart bin/linux_riscv64 linux_riscv64
dart run ffi/dart/tool/build_libs.dart bin/linux_x64 linux_x64
cargo build -p icu_datagen_dart --target aarch64-unknown-linux-gnu
cp target/aarch64-unknown-linux-gnu/icu_datagen_dart bin/linux_arm64-datagen
cargo build -p icu_datagen_dart --target riscv64gc-unknown-linux-gnu
cp target/riscv64gc-unknown-linux-gnu/icu_datagen_dart bin/linux_riscv64-datagen
cargo build -p icu_datagen_dart --target x86_64-unknown-linux-gnu
cp target/x86_64-unknown-linux-gnu/icu_datagen_dart bin/linux_x64-datagen
cargo run -p icu_datagen -- --locales full --keys all --out bin/full.postcard
- name: Build Mac
if: matrix.os == 'macos-latest'
run: |
mkdir bin
dart run ffi/dart/tool/build_libs.dart bin/ios_arm ios_arm
dart run ffi/dart/tool/build_libs.dart bin/ios_arm64 ios_arm64
dart run ffi/dart/tool/build_libs.dart bin/ios_x64 ios_x64
dart run ffi/dart/tool/build_libs.dart bin/macos_arm64 macos_arm64
dart run ffi/dart/tool/build_libs.dart bin/macos_x64 macos_x64
cargo build -p icu_datagen_dart --target aarch64-apple-darwin
cp target/aarch64-apple-darwin/icu_datagen_dart bin/macos_arm64-datagen
cargo build -p icu_datagen_dart --target x86_64-apple-darwin
cp target/x86_64-apple-darwin/icu_datagen_dart bin/macos_x64-datagen
- name: Build Windows
if: matrix.os == 'windows-latest'
run: |
mkdir bin
dart run ffi/dart/tool/build_libs.dart bin/windows_arm64 windows_arm64
dart run ffi/dart/tool/build_libs.dart bin/windows_ia32 windows_ia32
dart run ffi/dart/tool/build_libs.dart bin/windows_x64 windows_x64
cargo build -p icu_datagen_dart --target aarch64-pc-windows-msvc
cp target/aarch64-pc-windows-msvc/icu_datagen_dart bin/windows_arm64-datagen
cargo build -p icu_datagen_dart --target x86_64-pc-windows-msvc
cp target/x86_64-pc-windows-msvc/icu_datagen_dart bin/windows_x64-datagen
- name: Upload artifacts
uses: actions/upload-artifact@ef09cdac3e2d3e60d8ccadda691f4f1cec5035cb
with:
name: dart-${{matrix.os}}-libs
path: bin
release:
needs: dart-libs
runs-on: ubuntu-latest
steps:
- name: Download binaries
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427
- name: Display structure of downloaded files
run: ls -R
- name: Release
uses: softprops/action-gh-release@d99959edae48b5ffffd7b00da66dcdb0a33a52ee
with:
files: '**'
fail_on_unmatched_files: true
body: "Build artifacts for `package:intl4x`, based on ICU4X at ref ${{ env.icu_version }}"