Generate artifacts for intl4x #22
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: package:intl4x | |
permissions: read-all | |
on: | |
push: | |
branches: [ main ] | |
schedule: | |
- cron: '0 0 * * 0' # weekly | |
workflow_dispatch: | |
env: | |
cratename: icu_capi | |
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 | |
- 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: Build | |
run: | | |
cd ffi/dart | |
dart --enable-experiment=native-assets pub get | |
cd ../.. | |
dart run ffi/dart/tool/build_libs.dart bin | |
- name: Upload artifacts | |
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 | |
with: | |
name: dart-${{matrix.os}}-libs | |
path: bin |