Skip to content

Commit

Permalink
upload clang/mingw artifact with plugins (rime#707)
Browse files Browse the repository at this point in the history
  • Loading branch information
eagleoflqj authored Sep 6, 2023
1 parent be3af89 commit de55c0d
Showing 1 changed file with 26 additions and 7 deletions.
33 changes: 26 additions & 7 deletions .github/workflows/windows-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,23 +98,23 @@ jobs:
run: ${{ env.build_script }} test

- name: Create distributable
if: ${{ matrix.compiler == 'msvc' }}
run: |
7z a rime-${{ env.git_ref_name }}-${{ runner.os }}.7z `
7z a rime-${{ env.git_ref_name }}-${{ runner.os }}-${{ matrix.compiler }}.7z `
dist version-info.txt
7z a -x'!*/.placeholder' rime-deps-${{ env.git_ref_name }}-${{ runner.os }}.7z `
7z a -x'!*/.placeholder' rime-deps-${{ env.git_ref_name }}-${{ runner.os }}-${{ matrix.compiler }}.7z `
bin include lib share
- name: Upload artifacts
if: ${{ matrix.compiler == 'msvc' }}
uses: actions/upload-artifact@v3
with:
path: |
rime-${{ env.git_ref_name }}-${{ runner.os }}.7z
rime-deps-${{ env.git_ref_name }}-${{ runner.os }}.7z
rime-${{ env.git_ref_name }}-${{ runner.os }}-${{ matrix.compiler }}.7z
rime-deps-${{ env.git_ref_name }}-${{ runner.os }}-${{ matrix.compiler }}.7z
build-mingw:
runs-on: windows-latest
env:
RIME_PLUGINS: ${{ inputs.rime_plugins }}
defaults:
run:
shell: msys2 {0}
Expand All @@ -128,7 +128,7 @@ jobs:

- name: Install dependencies
run: |
pacman -S --noconfirm base-devel mingw-w64-x86_64-toolchain ninja \
pacman -S --noconfirm git base-devel mingw-w64-x86_64-toolchain ninja \
mingw64/mingw-w64-x86_64-cmake \
mingw-w64-x86_64-boost \
mingw-w64-x86_64-glog \
Expand All @@ -138,13 +138,32 @@ jobs:
mingw-w64-x86_64-marisa \
mingw-w64-x86_64-opencc
- name: Install Rime plugins
run: ./action-install-plugins-macos.sh

- name: Build with mingw-w64
run: |
cmake -B build -G Ninja \
-DCMAKE_INSTALL_PREFIX:PATH=`pwd`/dist \
-DCMAKE_BUILD_TYPE:STRING=Release \
-DENABLE_LOGGING:BOOL=ON \
-DBUILD_TEST:BOOL=ON \
-DBUILD_STATIC:BOOL=ON \
-DBUILD_SHARED_LIBS:BOOL=ON
cmake --build build
cmake --install build
cd build/test && cp ../lib/librime.dll . && ./rime_test
- name: Create distributable
run: |
tar -cjvf rime-${{ env.git_ref_name }}-${{ runner.os }}-mingw.tar.bz2 \
dist version-info.txt
tar -cjvf rime-deps-${{ env.git_ref_name }}-${{ runner.os }}-mingw.tar.bz2 \
--exclude '*/.placeholder' \
bin include lib share
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
path: |
rime-${{ env.git_ref_name }}-${{ runner.os }}-mingw.tar.bz2

0 comments on commit de55c0d

Please sign in to comment.