Skip to content

Commit cf24037

Browse files
committed
[no-release-notes] .github/workflows/test.yml: Prepare for go-icu-regex dependency on ICU4C by ensuring it is available to Cgo in all test environments.
1 parent 4a6f3fb commit cf24037

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

.github/workflows/test.yml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,31 @@ jobs:
1818
uses: actions/setup-go@v5
1919
with:
2020
go-version-file: go.mod
21+
- name: Install ICU4C (MacOS)
22+
if: ${{ matrix.platform == 'macos-latest' }}
23+
run: |
24+
dir=$(brew --cellar icu4c)
25+
dir="$dir"/$(ls "$dir")
26+
echo CGO_CPPFLAGS=-I$dir/include >> $GITHUB_ENV
27+
echo CGO_LDFLAGS=-L$dir/lib >> $GITHUB_ENV
28+
- name: Install ICU4C (Windows)
29+
if: ${{ matrix.platform == 'windows-latest' }}
30+
uses: msys2/setup-msys2@v2
31+
with:
32+
path-type: inherit
33+
msystem: UCRT64
34+
pacboy: icu:p toolchain:p pkg-config:p
2135
- name: Test
22-
if: ${{ matrix.platform != 'ubuntu-latest' }}
36+
if: ${{ matrix.platform == 'macos-latest' }}
2337
run: go test ./...
2438
env:
2539
CI_TEST: "true"
40+
- name: Test
41+
if: ${{ matrix.platform == 'windows-latest' }}
42+
shell: msys2 {0}
43+
run: go.exe test ./...
44+
env:
45+
CI_TEST: "true"
2646
- name: Test
2747
if: ${{ matrix.platform == 'ubuntu-latest' }}
2848
run: go test -race ./...

0 commit comments

Comments
 (0)