@@ -98,23 +98,23 @@ jobs:
98
98
run : ${{ env.build_script }} test
99
99
100
100
- name : Create distributable
101
- if : ${{ matrix.compiler == 'msvc' }}
102
101
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 `
104
103
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 `
106
105
bin include lib share
107
106
108
107
- name : Upload artifacts
109
- if : ${{ matrix.compiler == 'msvc' }}
110
108
uses : actions/upload-artifact@v3
111
109
with :
112
110
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
115
113
116
114
build-mingw :
117
115
runs-on : windows-latest
116
+ env :
117
+ RIME_PLUGINS : ${{ inputs.rime_plugins }}
118
118
defaults :
119
119
run :
120
120
shell : msys2 {0}
@@ -128,7 +128,7 @@ jobs:
128
128
129
129
- name : Install dependencies
130
130
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 \
132
132
mingw64/mingw-w64-x86_64-cmake \
133
133
mingw-w64-x86_64-boost \
134
134
mingw-w64-x86_64-glog \
@@ -138,13 +138,32 @@ jobs:
138
138
mingw-w64-x86_64-marisa \
139
139
mingw-w64-x86_64-opencc
140
140
141
+ - name : Install Rime plugins
142
+ run : ./action-install-plugins-macos.sh
143
+
141
144
- name : Build with mingw-w64
142
145
run : |
143
146
cmake -B build -G Ninja \
147
+ -DCMAKE_INSTALL_PREFIX:PATH=`pwd`/dist \
144
148
-DCMAKE_BUILD_TYPE:STRING=Release \
145
149
-DENABLE_LOGGING:BOOL=ON \
146
150
-DBUILD_TEST:BOOL=ON \
147
151
-DBUILD_STATIC:BOOL=ON \
148
152
-DBUILD_SHARED_LIBS:BOOL=ON
149
153
cmake --build build
154
+ cmake --install build
150
155
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