Bump ICU to icudt76l.dat #15
This file contains hidden or 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: swift-foundation-icu-demo | |
| on: | |
| push: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| pull_request: | |
| branches: | |
| - '*' | |
| jobs: | |
| InternationalizationBenchmarks: | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 30 | |
| steps: | |
| - name: "Checkout swift-foundation-icu-demo" | |
| uses: actions/checkout@v4 | |
| with: | |
| path: swift-foundation-icu-demo | |
| - name: "Checkout ICU" | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: apple-oss-distributions/ICU | |
| path: ICU | |
| - name: "Build ICU Data" | |
| working-directory: ICU | |
| run: make icu | |
| - name: "Checkout swift-foundation" | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: swiftlang/swift-foundation | |
| path: swift-foundation | |
| - name: "Checkout swift-corelibs-foundation" | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: swiftlang/swift-corelibs-foundation | |
| path: swift-corelibs-foundation | |
| - name: "Checkout swift-collections" | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: apple/swift-collections | |
| path: swift-collections | |
| - name: "Checkout swift-syntax" | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: apple/swift-syntax | |
| path: swift-syntax | |
| - name: "Checkout swift-foundation-icu" | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: swiftlang/swift-foundation-icu | |
| path: swift-foundation-icu | |
| - name: "Test swift-foundation-icu-demo" | |
| working-directory: swift-foundation-icu-demo | |
| run: swift test | |
| - name: "Apply swift-foundation-icu PR #53" | |
| working-directory: swift-foundation-icu | |
| run: gh pr checkout 53 | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| - name: "Patch swift-foundation-icu to use data file on Linux" | |
| working-directory: swift-foundation-icu | |
| run: perl -pi -e 's/"USE_PACKAGE_DATA"/"DISABLED_USE_PACKAGE_DATA"/g' Package.swift | |
| - name: "Test swift-foundation-icu-demo with data file" | |
| working-directory: swift-foundation-icu-demo | |
| run: ICU_DATA_DIR_PREFIX=${{ github.workspace }}/swift-foundation-icu-demo/LOCALE_DATA swift test | |
| - name: "Verify that ICU data file is being used" | |
| working-directory: swift-foundation-icu-demo | |
| run: | | |
| mv LOCALE_DATA/usr/share/icu/icudt76l.dat LOCALE_DATA/usr/share/icu/icudt76l.dat.old | |
| echo '' > LOCALE_DATA/usr/share/icu/icudt76l.dat | |
| # should fail after we clobber the data file | |
| ICU_DATA_DIR_PREFIX=${{ github.workspace }}/swift-foundation-icu-demo/LOCALE_DATA swift test || true | |
| # move the data file back | |
| mv LOCALE_DATA/usr/share/icu/icudt76l.dat.old LOCALE_DATA/usr/share/icu/icudt76l.dat | |
| - name: "Build Foundation" | |
| working-directory: swift-foundation | |
| run: SWIFTCI_USE_LOCAL_DEPS=.. swift build | |
| - name: "Run Foundation InternationalizationBenchmarks" | |
| working-directory: swift-foundation/Benchmarks | |
| run: SWIFTCI_USE_LOCAL_DEPS=.. swift run InternationalizationBenchmarks | |