Skip to content

package:intl4x

package:intl4x #496

Workflow file for this run

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