Skip to content

Commit de55c0d

Browse files
authored
upload clang/mingw artifact with plugins (#707)
1 parent be3af89 commit de55c0d

File tree

1 file changed

+26
-7
lines changed

1 file changed

+26
-7
lines changed

.github/workflows/windows-build.yml

+26-7
Original file line numberDiff line numberDiff line change
@@ -98,23 +98,23 @@ jobs:
9898
run: ${{ env.build_script }} test
9999

100100
- name: Create distributable
101-
if: ${{ matrix.compiler == 'msvc' }}
102101
run: |
103-
7z a rime-${{ env.git_ref_name }}-${{ runner.os }}.7z `
102+
7z a rime-${{ env.git_ref_name }}-${{ runner.os }}-${{ matrix.compiler }}.7z `
104103
dist version-info.txt
105-
7z a -x'!*/.placeholder' rime-deps-${{ env.git_ref_name }}-${{ runner.os }}.7z `
104+
7z a -x'!*/.placeholder' rime-deps-${{ env.git_ref_name }}-${{ runner.os }}-${{ matrix.compiler }}.7z `
106105
bin include lib share
107106
108107
- name: Upload artifacts
109-
if: ${{ matrix.compiler == 'msvc' }}
110108
uses: actions/upload-artifact@v3
111109
with:
112110
path: |
113-
rime-${{ env.git_ref_name }}-${{ runner.os }}.7z
114-
rime-deps-${{ env.git_ref_name }}-${{ runner.os }}.7z
111+
rime-${{ env.git_ref_name }}-${{ runner.os }}-${{ matrix.compiler }}.7z
112+
rime-deps-${{ env.git_ref_name }}-${{ runner.os }}-${{ matrix.compiler }}.7z
115113
116114
build-mingw:
117115
runs-on: windows-latest
116+
env:
117+
RIME_PLUGINS: ${{ inputs.rime_plugins }}
118118
defaults:
119119
run:
120120
shell: msys2 {0}
@@ -128,7 +128,7 @@ jobs:
128128

129129
- name: Install dependencies
130130
run: |
131-
pacman -S --noconfirm base-devel mingw-w64-x86_64-toolchain ninja \
131+
pacman -S --noconfirm git base-devel mingw-w64-x86_64-toolchain ninja \
132132
mingw64/mingw-w64-x86_64-cmake \
133133
mingw-w64-x86_64-boost \
134134
mingw-w64-x86_64-glog \
@@ -138,13 +138,32 @@ jobs:
138138
mingw-w64-x86_64-marisa \
139139
mingw-w64-x86_64-opencc
140140
141+
- name: Install Rime plugins
142+
run: ./action-install-plugins-macos.sh
143+
141144
- name: Build with mingw-w64
142145
run: |
143146
cmake -B build -G Ninja \
147+
-DCMAKE_INSTALL_PREFIX:PATH=`pwd`/dist \
144148
-DCMAKE_BUILD_TYPE:STRING=Release \
145149
-DENABLE_LOGGING:BOOL=ON \
146150
-DBUILD_TEST:BOOL=ON \
147151
-DBUILD_STATIC:BOOL=ON \
148152
-DBUILD_SHARED_LIBS:BOOL=ON
149153
cmake --build build
154+
cmake --install build
150155
cd build/test && cp ../lib/librime.dll . && ./rime_test
156+
157+
- name: Create distributable
158+
run: |
159+
tar -cjvf rime-${{ env.git_ref_name }}-${{ runner.os }}-mingw.tar.bz2 \
160+
dist version-info.txt
161+
tar -cjvf rime-deps-${{ env.git_ref_name }}-${{ runner.os }}-mingw.tar.bz2 \
162+
--exclude '*/.placeholder' \
163+
bin include lib share
164+
165+
- name: Upload artifacts
166+
uses: actions/upload-artifact@v3
167+
with:
168+
path: |
169+
rime-${{ env.git_ref_name }}-${{ runner.os }}-mingw.tar.bz2

0 commit comments

Comments
 (0)