Debian Codegraph @

.github/workflows/mingw.yml

raw symbols SCIP
1 name: MinGW
2
3 on:
4 push:
5 pull_request:
6 workflow_dispatch:
7
8 jobs:
9 build:
10 strategy:
11 matrix:
12 arch:
13 - i686
14 - x86_64
15 - aarch64
16 - armv7
17
18 runs-on: ubuntu-latest
19 container:
20 image: amd64/ubuntu:22.04
21 options: --privileged
22
23 steps:
24 - name: Checkout
25 uses: actions/checkout@v4
26
27 - name: Update packages
28 run: apt update
29
30 - name: Install packages
31 run: DEBIAN_FRONTEND=noninteractive apt install -y
32 build-essential
33 cmake
34 dos2unix
35 git
36 libarchive-tools
37 pkg-config
38 nsis
39 p7zip-full
40 unzip
41 wget
42 zip
43
44 - name: Set up MinGW environment
45 run: |
46 mkdir /usr/llvm-mingw
47 wget https://github.com/mstorsjo/llvm-mingw/releases/download/20231128/llvm-mingw-20231128-msvcrt-ubuntu-20.04-x86_64.tar.xz
48 bsdtar --strip-components 1 -x -v -f llvm-mingw-20231128-msvcrt-ubuntu-20.04-x86_64.tar.xz -C /usr/llvm-mingw
49 rm /usr/llvm-mingw/${{ matrix.arch }}-w64-mingw32/include
50 cp -a /usr/llvm-mingw/generic-w64-mingw32/include /usr/llvm-mingw/${{ matrix.arch }}-w64-mingw32
51 wget https://github.com/garglk/assets/raw/master/mingw-llvm/mingw-llvm-${{ matrix.arch }}-22.04.tar.xz
52 bsdtar xfv mingw-llvm-${{ matrix.arch }}-22.04.tar.xz -C /usr/llvm-mingw
53 wget -P /usr/llvm-mingw/bin https://github.com/garglk/assets/raw/master/mingw-llvm/${{ matrix.arch }}-w64-mingw32-pkg-config
54 mkdir NSIS
55 cd NSIS
56 wget https://nsis.sourceforge.io/mediawiki/images/7/78/FontName-0.7.zip
57 unzip FontName-0.7.zip
58 7z x -bb3 FontName-0.7.exe
59 mkdir -p /usr/share/nsis/Include
60 mkdir -p /usr/share/nsis/Plugins/x86-ansi
61 for inc in Include/*; do iconv -f CP1251 -t UTF8 ${inc} -o /usr/share/nsis/Include/$(basename ${inc}); done
62 cp Plugins/FontName.dll /usr/share/nsis/Plugins/x86-ansi
63 cd ..
64
65 - name: Build
66 run: |
67 echo $(date +"%Y%m%d").$(echo $GITHUB_SHA | cut -b 1-7) > VERSION
68 ./windows.sh -qa ${{ matrix.arch }}
69
70 - name: Upload installer
71 uses: actions/upload-artifact@v4
72 with:
73 name: Gargoyle-installer-${{ matrix.arch }}
74 path: gargoyle-*.exe
75 if: ${{ matrix.arch == 'i686' || matrix.arch == 'x86_64' }}
76
77 - name: Upload standalone
78 uses: actions/upload-artifact@v4
79 with:
80 name: Gargoyle-standalone-${{ matrix.arch }}
81 path: gargoyle-*.zip