Skip to content

Commit b38e9b1

Browse files
committed
CI: Use github actions for Windows CI
Signed-off-by: Maxime Gervais <gervais.maxime@gmail.com>
1 parent bd4bb6b commit b38e9b1

File tree

5 files changed

+143
-118
lines changed

5 files changed

+143
-118
lines changed

.appveyor.yml

Lines changed: 0 additions & 25 deletions
This file was deleted.

.github/workflows/MediaConch_Checks.yml

Lines changed: 126 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -3,96 +3,156 @@ name: Checks
33
on: [push, pull_request]
44

55
jobs:
6-
unix:
6+
windows:
77
strategy:
88
matrix:
9-
os: [ubuntu-latest, macos-latest]
9+
include:
10+
- arch: Win32
11+
qt_ver: 5.15
12+
qt_arch: win64_msvc2019_64
13+
- arch: x64
14+
qt_ver: 5.15
15+
qt_arch: win32_msvc2019
1016
fail-fast: false
11-
runs-on: ${{ matrix.os }}
12-
env:
13-
PYTHONPATH: /usr/local/lib/python2.7:/usr/local/lib/python2.7/dist-packages:/usr/local/lib/python2.7/site-packages
17+
name: Windows (${{ matrix.arch }})
18+
runs-on: windows-latest
1419
steps:
15-
- name: Checkout
20+
- name: Set up Qt
21+
uses: jurplel/install-qt-action@v4
22+
with:
23+
version: ${{ matrix.qt_ver }}
24+
arch: ${{ matrix.qt_arch }}
25+
modules: qtwebengine
26+
- name: Get zlib info
27+
id: zlib-info
28+
run: |
29+
('hash=' + ((git ls-remote https://github.com/MediaArea/zlib.git HEAD) -Split "`t")[0]) | Out-File -FilePath $env:GITHUB_OUTPUT -Append
30+
('path=' + (Get-Location) + '\zlib') | Out-File -FilePath $env:GITHUB_OUTPUT -Append
31+
- name: zlib cache
32+
id: zlib-cache
33+
uses: actions/cache@v4
34+
with:
35+
path: ${{ steps.zlib-info.outputs.path }}
36+
key: windows-${{ matrix.arch }}-zlib-${{ steps.zlib-info.outputs.hash }}
37+
- name: Checkout zlib
38+
if: steps.zlib-cache.outputs.cache-hit != 'true'
39+
uses: actions/checkout@v4
40+
with:
41+
repository: MediaArea/zlib
42+
path: zlib
43+
- name: Get libxml2 info
44+
id: libxml2-info
45+
run: |
46+
('hash=' + ((git ls-remote https://github.com/MediaArea/libxml2.git HEAD) -Split "`t")[0]) | Out-File -FilePath $env:GITHUB_OUTPUT -Append
47+
('path=' + (Get-Location) + '\libxml2') | Out-File -FilePath $env:GITHUB_OUTPUT -Append
48+
- name: libxml2 cache
49+
id: libxml2-cache
50+
uses: actions/cache@v4
51+
with:
52+
path: ${{ steps.libxml2-info.outputs.path }}
53+
key: windows-${{ matrix.arch }}-libxml2-${{ steps.libxml2-info.outputs.hash }}
54+
- name: Checkout libxml2
55+
if: steps.libxml2-cache.outputs.cache-hit != 'true'
56+
uses: actions/checkout@v4
57+
with:
58+
repository: MediaArea/libxml2
59+
path: libxml2
60+
- name: Get libxslt info
61+
id: libxslt-info
62+
run: |
63+
('hash=' + ((git ls-remote https://github.com/MediaArea/libxslt.git HEAD) -Split "`t")[0]) | Out-File -FilePath $env:GITHUB_OUTPUT -Append
64+
('path=' + (Get-Location) + '\libxslt') | Out-File -FilePath $env:GITHUB_OUTPUT -Append
65+
- name: libxslt cache
66+
id: libxslt-cache
67+
uses: actions/cache@v4
68+
with:
69+
path: ${{ steps.libxslt-info.outputs.path }}
70+
key: windows-${{ matrix.arch }}-libxslt-${{ steps.libxslt-info.outputs.hash }}
71+
- name: Checkout libxslt
72+
if: steps.libxslt-cache.outputs.cache-hit != 'true'
73+
uses: actions/checkout@v4
74+
with:
75+
repository: MediaArea/libxslt
76+
path: libxslt
77+
- name: Get libevent info
78+
id: libevent-info
79+
run: |
80+
('hash=' + ((git ls-remote https://github.com/MediaArea/libevent.git HEAD) -Split "`t")[0]) | Out-File -FilePath $env:GITHUB_OUTPUT -Append
81+
('path=' + (Get-Location) + '\libevent') | Out-File -FilePath $env:GITHUB_OUTPUT -Append
82+
- name: libevent cache
83+
id: libevent-cache
84+
uses: actions/cache@v4
85+
with:
86+
path: ${{ steps.libevent-info.outputs.path }}
87+
key: windows-${{ matrix.arch }}-libevent-${{ steps.libevent-info.outputs.hash }}
88+
- name: Checkout libevent
89+
if: steps.libevent-cache.outputs.cache-hit != 'true'
1690
uses: actions/checkout@v4
1791
with:
18-
fetch-depth: 1
19-
- name: Dependencies
92+
repository: MediaArea/libevent
93+
path: libevent
94+
- name: Get jansson info
95+
id: jansson-info
2096
run: |
21-
if [ "$RUNNER_OS" == "Linux" ]; then
22-
sudo apt-get update
23-
sudo apt-get install -y zlib1g-dev libxml2-dev libxslt-dev libcurl4-gnutls-dev libsqlite3-dev libjansson-dev libevent-dev libxml2-utils qtbase5-dev qtwebengine5-dev qt5-qmake xmlstarlet ffmpeg sshpass
24-
sudo curl -L http://stahlworks.com/dev/sfk/sfk-linux-64.exe -o /usr/local/bin/sfk
25-
sudo chmod +x /usr/local/bin/sfk
26-
pip --disable-pip-version-check install git+https://github.com/vi/mkvparse.git
27-
fi
28-
if [ "$RUNNER_OS" == "macOS" ]; then
29-
brew install libtool automake libxslt jansson qt@5 sfk xmlstarlet ffmpeg
30-
sudo pip --disable-pip-version-check install --prefix /usr/local git+https://github.com/vi/mkvparse.git
31-
fi
97+
('hash=' + ((git ls-remote https://github.com/MediaArea/jansson.git HEAD) -Split "`t")[0]) | Out-File -FilePath $env:GITHUB_OUTPUT -Append
98+
('path=' + (Get-Location) + '\jansson') | Out-File -FilePath $env:GITHUB_OUTPUT -Append
99+
- name: jansson cache
100+
id: jansson-cache
101+
uses: actions/cache@v4
102+
with:
103+
path: ${{ steps.jansson-info.outputs.path }}
104+
key: windows-${{ matrix.arch }}-jansson-${{ steps.jansson-info.outputs.hash }}
105+
- name: Checkout jansson
106+
if: steps.jansson-cache.outputs.cache-hit != 'true'
107+
uses: actions/checkout@v4
108+
with:
109+
repository: MediaArea/jansson
110+
path: jansson
32111
- name: Get ZenLib info
33112
id: zenlib-info
34113
run: |
35-
echo "hash=$(git ls-remote https://github.com/MediaArea/ZenLib.git HEAD | cut -f1)" >> $GITHUB_OUTPUT
36-
echo "path=$(dirname $PWD)/ZenLib" >> $GITHUB_OUTPUT
114+
('hash=' + ((git ls-remote https://github.com/MediaArea/ZenLib.git HEAD) -Split "`t")[0]) | Out-File -FilePath $env:GITHUB_OUTPUT -Append
115+
('path=' + (Get-Location) + '\ZenLib') | Out-File -FilePath $env:GITHUB_OUTPUT -Append
37116
- name: ZenLib cache
38117
id: zenlib-cache
39118
uses: actions/cache@v4
40119
with:
41120
path: ${{ steps.zenlib-info.outputs.path }}
42-
key: ${{ runner.os }}-ZenLib-${{ steps.zenlib-info.outputs.hash }}
43-
- name: ZenLib
121+
key: windows-${{ matrix.arch }}-zenlib-${{ steps.zenlib-info.outputs.hash }}
122+
- name: Checkout ZenLib
44123
if: steps.zenlib-cache.outputs.cache-hit != 'true'
45-
run: |
46-
git -C .. clone --depth=1 https://github.com/MediaArea/ZenLib.git
47-
pushd ../ZenLib/Project/GNU/Library
48-
autoreconf -if
49-
./configure --enable-static
50-
make
51-
popd
124+
uses: actions/checkout@v4
125+
with:
126+
repository: MediaArea/ZenLib
127+
path: ZenLib
52128
- name: Get MediaInfoLib info
53129
id: mediainfolib-info
54130
run: |
55-
echo "hash=$(git ls-remote https://github.com/MediaArea/MediaInfoLib.git HEAD | cut -f1)" >> $GITHUB_OUTPUT
56-
echo "path=$(dirname $PWD)/MediaInfoLib" >> $GITHUB_OUTPUT
131+
('hash=' + ((git ls-remote https://github.com/MediaArea/MediaInfoLib.git HEAD) -Split "`t")[0]) | Out-File -FilePath $env:GITHUB_OUTPUT -Append
132+
('path=' + (Get-Location) + '\MediaInfoLib') | Out-File -FilePath $env:GITHUB_OUTPUT -Append
57133
- name: MediaInfoLib cache
58134
id: mediainfolib-cache
59135
uses: actions/cache@v4
60136
with:
61137
path: ${{ steps.mediainfolib-info.outputs.path }}
62-
key: ${{ runner.os }}-MediaInfoLib-${{ steps.mediainfolib-info.outputs.hash }}
63-
- name: MediaInfoLib
138+
key: windows-${{ matrix.arch }}-mediainfolib-${{ steps.mediainfolib-info.outputs.hash }}
139+
- name: Checkout MediaInfoLib
64140
if: steps.mediainfolib-cache.outputs.cache-hit != 'true'
65-
run: |
66-
git -C .. clone --depth=1 https://github.com/MediaArea/MediaInfoLib.git
67-
pushd ../MediaInfoLib/Project/GNU/Library
68-
autoreconf -if
69-
./configure --enable-static
70-
make
71-
popd
72-
- name: Configure
73-
run: |
74-
cd Project/GNU/CLI
75-
autoreconf -if
76-
./configure
141+
uses: actions/checkout@v4
142+
with:
143+
repository: MediaArea/MediaInfoLib
144+
path: MediaInfoLib
145+
- name: Checkout MediaConch
146+
uses: actions/checkout@v4
147+
with:
148+
path: MediaConch
149+
- name: Add MSBuild to PATH
150+
uses: microsoft/setup-msbuild@v2
151+
with:
152+
msbuild-architecture: x64
77153
- name: Build
78154
run: |
79-
cd Project/GNU/CLI
80-
make
81-
- name: Check files
82-
run: |
83-
cd Project/GNU/CLI
84-
make clone_sample_files
85-
- name: Check
86-
run: |
87-
cd Project/GNU/CLI
88-
make check
89-
- name: Configure GUI
90-
run: |
91-
cd Project/Qt
92-
export PATH=/opt/homebrew/opt/qt@5/bin:$PATH
93-
./prepare CONFIG+=c++11 -after QMAKE_MACOSX_DEPLOYMENT_TARGET=10.9 QMAKE_LFLAGS-=-Wl,-ld_classic
94-
- name: Build GUI
95-
run: |
96-
cd Project/Qt
97-
export PATH=/usr/local/opt/qt/bin:$PATH
98-
make
155+
$Env:IncludePath="$Env:QT_ROOT_DIR\include\QtGui;$Env:QT_ROOT_DIR\include\QtWidgets;$Env:QT_ROOT_DIR\include\QtCore;$Env:QT_ROOT_DIR\include\QtWebEngine;$Env:QT_ROOT_DIR\include\QtWebEngineWidgets;$Env:QT_ROOT_DIR\include\QtWebEngineCore;$Env:QT_ROOT_DIR\include\QtWebChannel;$Env:QT_ROOT_DIR\include;$Env:IncludePath"
156+
$Env:LIB="$Env:QT_ROOT_DIR\lib"
157+
158+
MSBuild /verbosity:quiet /p:Configuration=Release`;Platform=${{ matrix.arch }} MediaConch\Project\MSVC2022\MediaConch.sln

0 commit comments

Comments
 (0)