forked from BYVoid/OpenCC
-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (53 loc) · 1.59 KB
/
mingw.yml
File metadata and controls
56 lines (53 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: mingw-w64
on:
push:
branches: [master]
pull_request:
branches: [master]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- uses: msys2/setup-msys2@v2
- uses: actions/checkout@v4
- name: Install dependencies
run: pacman -S --noconfirm base-devel mingw-w64-x86_64-toolchain cmake ninja python
- name: Build with mingw-w64
run: |
CC=/mingw64/bin/cc CXX=/mingw64/bin/c++ cmake \
-B build -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=$PWD/install \
-DENABLE_GTEST=ON \
-DBUILD_SHARED_LIBS=OFF
cmake --build build
cmake --install build
- name: Run test
run: |
cd build
ctest
- name: list installed files
if: ${{ always() }}
run: |
echo "=== Contents of install/bin ==="
if [ -d install/bin ]; then ls -lh install/bin/; fi
echo -e "\n=== Contents of install/share/opencc ==="
if [ -d install/share/opencc ]; then ls -lh install/share/opencc/; fi
echo -e "\n=== All installed files ==="
if [ -d install ]; then find install -type f; fi
- name: upload artifacts
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: opencc-mingw
path: |
install/**
build/src/tools/*.exe
build/Testing/**
build/ctest.log