Skip to content

Commit 2ecf0e9

Browse files
committed
1 parent 71537c8 commit 2ecf0e9

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

.github/workflows/rundemo.yml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,26 +40,30 @@ jobs:
4040
with:
4141
repository: swiftlang/swift-foundation-icu
4242
path: swift-foundation-icu
43+
- name: "Test swift-foundation-icu-demo"
44+
working-directory: swift-foundation-icu-demo
45+
run: swift test
4346
- name: "Apply swift-foundation-icu PR #53"
44-
#if: false
4547
working-directory: swift-foundation-icu
4648
run: gh pr checkout 53
4749
env:
4850
GH_TOKEN: ${{ github.token }}
4951
- run: ls ${{ github.workspace }}/swift-foundation-icu-demo/LOCALE_DATA/usr/share/icu/icudt74l.dat
50-
- name: "Patch swift-foundation-icu to run on Linux"
52+
- name: "Patch swift-foundation-icu to use data file on Linux"
5153
working-directory: swift-foundation-icu
5254
run: perl -pi -e 's/"USE_PACKAGE_DATA"/"DISABLED_USE_PACKAGE_DATA"/g' Package.swift
53-
- name: "Test swift-foundation-icu-demo"
55+
- name: "Test swift-foundation-icu-demo with data file"
5456
working-directory: swift-foundation-icu-demo
5557
run: ICU_DATA_DIR_PREFIX=${{ github.workspace }}/swift-foundation-icu-demo/LOCALE_DATA swift test
56-
- name: "Corrupt locale data"
57-
run: echo '' > ${{ github.workspace }}/swift-foundation-icu-demo/LOCALE_DATA/usr/share/icu/icudt74l.dat
58-
- name: "Re-test swift-foundation-icu-demo"
58+
- name: "Verify that ICU data file is being used"
5959
working-directory: swift-foundation-icu-demo
60-
# should fail
61-
run: ICU_DATA_DIR_PREFIX=${{ github.workspace }}/swift-foundation-icu-demo/LOCALE_DATA swift test
62-
60+
run: |
61+
mv LOCALE_DATA/usr/share/icu/icudt74l.dat LOCALE_DATA/usr/share/icu/icudt74l.dat.old
62+
echo '' > LOCALE_DATA/usr/share/icu/icudt74l.dat
63+
# should fail
64+
ICU_DATA_DIR_PREFIX=${{ github.workspace }}/swift-foundation-icu-demo/LOCALE_DATA swift test || true
65+
# move the data file back
66+
mv LOCALE_DATA/usr/share/icu/icudt74l.dat.old LOCALE_DATA/usr/share/icu/icudt74l.dat
6367
- name: "Build Foundation"
6468
working-directory: swift-foundation
6569
run: SWIFTCI_USE_LOCAL_DEPS=.. swift build

0 commit comments

Comments
 (0)