Skip to content

Commit f578e70

Browse files
committed
msys2版のビルドワークフローを追加してみる
1 parent 9aed021 commit f578e70

File tree

1 file changed

+84
-0
lines changed

1 file changed

+84
-0
lines changed

.github/workflows/build.yml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,90 @@ on:
55

66

77
jobs:
8+
msys-build:
9+
defaults:
10+
run:
11+
shell: msys2 {0}
12+
runs-on: windows-latest
13+
steps:
14+
- uses: msys2/setup-msys2@v2
15+
with:
16+
update: true
17+
msystem: MINGW32
18+
install: >-
19+
git
20+
zip
21+
mingw-w64-i686-toolchain
22+
mingw-w64-i686-meson
23+
24+
- name: Checkout repository
25+
uses: actions/checkout@v4
26+
with:
27+
fetch-depth: 0
28+
29+
- name: Install dav1d
30+
run: |
31+
cd
32+
git clone https://code.videolan.org/videolan/dav1d.git -b 1.5.1 --depth 1
33+
cd dav1d
34+
mkdir build && cd build
35+
meson --prefix=${HOME}/dec --buildtype release --default-library=static ..
36+
ninja
37+
ninja install
38+
39+
- name: Install libde265
40+
run: |
41+
cd
42+
git clone https://github.com/strukturag/libde265.git -b v1.0.15 --depth 1
43+
cd libde265
44+
sed -e 's/ -static-libstdc++//g' ./dec265/Makefile.am > ./Mf.am
45+
mv -f ./Mf.am ./dec265/Makefile.am
46+
./autogen.sh
47+
PKG_CONFIG_PATH=${HOME}/dec/lib/pkgconfig ./configure --prefix=${HOME}/dec --disable-encoder --disable-arm --enable-static --disable-shared
48+
make -j$(nproc)
49+
make install -j$(nproc)
50+
51+
- name: Install libheif
52+
run: |
53+
cd
54+
sudo apt remove libpng-dev
55+
git clone https://github.com/strukturag/libheif.git -b v1.15.2 --depth 1
56+
cd libheif
57+
./autogen.sh
58+
PKG_CONFIG_PATH=${HOME}/dec/lib/pkgconfig LDFLAGS="-std=gnu++11" ./configure --prefix=${HOME}/dec --enable-static --disable-shared --disable-gdk-pixbuf --disable-go --disable-examples
59+
make -j$(nproc)
60+
make install -j$(nproc)
61+
62+
- name: Build ifheif
63+
run: |
64+
cd
65+
i686-w64-mingw32-g++ src/ifheif.cpp src/ifheif.def "-Wl,--dll,--enable-stdcall-fixup" -o ifheif.spi `PKG_CONFIG_PATH=${HOME}/dec/lib/pkgconfig i686-w64-mingw32-pkg-config --libs --cflags libheif libde265 dav1d` -static -shared
66+
67+
- name: Add License Files
68+
run: |
69+
cd
70+
mkdir Licenses
71+
cd Licenses
72+
cp dav1d/COPYING dav1d.txt
73+
cp libde265/COPYING libde265.txt
74+
cp libheif/COPYING libheif.txt
75+
76+
- name: Create archive
77+
run: |
78+
cd
79+
zip ifheif -r src LICENSE Readme.md Licenses ifheif.spi
80+
81+
# https://gist.github.com/superbrothers/af84a2f8af394a62352e06537a640746
82+
- name: Create a Release
83+
if: ${{ github.ref == 'refs/heads/master' }}
84+
env:
85+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
86+
run: |
87+
cd
88+
REVCOUNT=`git rev-list --count HEAD`
89+
RELEASE_NAME=r${REVCOUNT}
90+
TAG_NAME=r${REVCOUNT}
91+
# gh release create "${TAG_NAME}" ./*.zip -t "${RELEASE_NAME}"
892
993
build:
1094
runs-on: ubuntu-22.04

0 commit comments

Comments
 (0)