Skip to content

Commit ea2b8ce

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

File tree

4 files changed

+123
-107
lines changed

4 files changed

+123
-107
lines changed

.appveyor.yml

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

.github/workflows/MediaConch_Checks.yml

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

55
jobs:
6-
unix:
6+
windows:
7+
env:
8+
QT_VER: 5.15
79
strategy:
810
matrix:
9-
os: [ubuntu-latest, macos-latest]
11+
arch: [Win32, x64]
1012
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
13+
name: Windows (${{ matrix.arch }})
14+
runs-on: windows-latest
1415
steps:
15-
- name: Checkout
16+
- name: Set-up Qt
17+
uses: jurplel/install-qt-action@v4
18+
with:
19+
version: ${{ env.QT_VER }}
20+
tools: 'tools_qtcreator,qt.tools.qtcreator'
21+
- name: Get zlib info
22+
id: zlib-info
23+
run: |
24+
('hash=' + ((git ls-remote https://github.com/MediaArea/zlib.git HEAD) -Split "`t")[0]) | Out-File -FilePath $env:GITHUB_OUTPUT -Append
25+
('path=' + (Get-Location) + '\zlib') | Out-File -FilePath $env:GITHUB_OUTPUT -Append
26+
- name: zlib cache
27+
id: zlib-cache
28+
uses: actions/cache@v4
29+
with:
30+
path: ${{ steps.zlib-info.outputs.path }}
31+
key: windows-${{ matrix.arch }}-zlib-${{ steps.zlib-info.outputs.hash }}
32+
- name: Checkout zlib
33+
if: steps.zlib-cache.outputs.cache-hit != 'true'
34+
uses: actions/checkout@v4
35+
with:
36+
repository: MediaArea/zlib
37+
path: zlib
38+
- name: Get libxml2 info
39+
id: libxml2-info
40+
run: |
41+
('hash=' + ((git ls-remote https://github.com/MediaArea/libxml2.git HEAD) -Split "`t")[0]) | Out-File -FilePath $env:GITHUB_OUTPUT -Append
42+
('path=' + (Get-Location) + '\libxml2') | Out-File -FilePath $env:GITHUB_OUTPUT -Append
43+
- name: libxml2 cache
44+
id: libxml2-cache
45+
uses: actions/cache@v4
46+
with:
47+
path: ${{ steps.libxml2-info.outputs.path }}
48+
key: windows-${{ matrix.arch }}-libxml2-${{ steps.libxml2-info.outputs.hash }}
49+
- name: Checkout libxml2
50+
if: steps.libxml2-cache.outputs.cache-hit != 'true'
51+
uses: actions/checkout@v4
52+
with:
53+
repository: MediaArea/libxml2
54+
path: libxml2
55+
- name: Get libxslt info
56+
id: libxslt-info
57+
run: |
58+
('hash=' + ((git ls-remote https://github.com/MediaArea/libxslt.git HEAD) -Split "`t")[0]) | Out-File -FilePath $env:GITHUB_OUTPUT -Append
59+
('path=' + (Get-Location) + '\libxslt') | Out-File -FilePath $env:GITHUB_OUTPUT -Append
60+
- name: libxslt cache
61+
id: libxslt-cache
62+
uses: actions/cache@v4
63+
with:
64+
path: ${{ steps.libxslt-info.outputs.path }}
65+
key: windows-${{ matrix.arch }}-libxslt-${{ steps.libxslt-info.outputs.hash }}
66+
- name: Checkout libxslt
67+
if: steps.libxslt-cache.outputs.cache-hit != 'true'
68+
uses: actions/checkout@v4
69+
with:
70+
repository: MediaArea/libxslt
71+
path: libxslt
72+
- name: Get libevent info
73+
id: libevent-info
74+
run: |
75+
('hash=' + ((git ls-remote https://github.com/MediaArea/libevent.git HEAD) -Split "`t")[0]) | Out-File -FilePath $env:GITHUB_OUTPUT -Append
76+
('path=' + (Get-Location) + '\libevent') | Out-File -FilePath $env:GITHUB_OUTPUT -Append
77+
- name: libevent cache
78+
id: libevent-cache
79+
uses: actions/cache@v4
80+
with:
81+
path: ${{ steps.libevent-info.outputs.path }}
82+
key: windows-${{ matrix.arch }}-libevent-${{ steps.libevent-info.outputs.hash }}
83+
- name: Checkout libevent
84+
if: steps.libevent-cache.outputs.cache-hit != 'true'
1685
uses: actions/checkout@v4
1786
with:
18-
fetch-depth: 1
19-
- name: Dependencies
87+
repository: MediaArea/libevent
88+
path: libevent
89+
- name: Get jansson info
90+
id: jansson-info
2091
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
92+
('hash=' + ((git ls-remote https://github.com/MediaArea/jansson.git HEAD) -Split "`t")[0]) | Out-File -FilePath $env:GITHUB_OUTPUT -Append
93+
('path=' + (Get-Location) + '\jansson') | Out-File -FilePath $env:GITHUB_OUTPUT -Append
94+
- name: jansson cache
95+
id: jansson-cache
96+
uses: actions/cache@v4
97+
with:
98+
path: ${{ steps.jansson-info.outputs.path }}
99+
key: windows-${{ matrix.arch }}-jansson-${{ steps.jansson-info.outputs.hash }}
100+
- name: Checkout jansson
101+
if: steps.jansson-cache.outputs.cache-hit != 'true'
102+
uses: actions/checkout@v4
103+
with:
104+
repository: MediaArea/jansson
105+
path: jansson
32106
- name: Get ZenLib info
33107
id: zenlib-info
34108
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
109+
('hash=' + ((git ls-remote https://github.com/MediaArea/ZenLib.git HEAD) -Split "`t")[0]) | Out-File -FilePath $env:GITHUB_OUTPUT -Append
110+
('path=' + (Get-Location) + '\ZenLib') | Out-File -FilePath $env:GITHUB_OUTPUT -Append
37111
- name: ZenLib cache
38112
id: zenlib-cache
39113
uses: actions/cache@v4
40114
with:
41115
path: ${{ steps.zenlib-info.outputs.path }}
42-
key: ${{ runner.os }}-ZenLib-${{ steps.zenlib-info.outputs.hash }}
43-
- name: ZenLib
116+
key: windows-${{ matrix.arch }}-zenlib-${{ steps.zenlib-info.outputs.hash }}
117+
- name: Checkout ZenLib
44118
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
119+
uses: actions/checkout@v4
120+
with:
121+
repository: MediaArea/ZenLib
122+
path: ZenLib
52123
- name: Get MediaInfoLib info
53124
id: mediainfolib-info
54125
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
126+
('hash=' + ((git ls-remote https://github.com/MediaArea/MediaInfoLib.git HEAD) -Split "`t")[0]) | Out-File -FilePath $env:GITHUB_OUTPUT -Append
127+
('path=' + (Get-Location) + '\MediaInfoLib') | Out-File -FilePath $env:GITHUB_OUTPUT -Append
57128
- name: MediaInfoLib cache
58129
id: mediainfolib-cache
59130
uses: actions/cache@v4
60131
with:
61132
path: ${{ steps.mediainfolib-info.outputs.path }}
62-
key: ${{ runner.os }}-MediaInfoLib-${{ steps.mediainfolib-info.outputs.hash }}
63-
- name: MediaInfoLib
133+
key: windows-${{ matrix.arch }}-mediainfolib-${{ steps.mediainfolib-info.outputs.hash }}
134+
- name: Checkout MediaInfoLib
64135
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
136+
uses: actions/checkout@v4
137+
with:
138+
repository: MediaArea/MediaInfoLib
139+
path: MediaInfoLib
140+
- name: Checkout MediaConch
141+
uses: actions/checkout@v4
142+
with:
143+
path: MediaConch
144+
- name: Add MSBuild to PATH
145+
uses: microsoft/setup-msbuild@v2
146+
with:
147+
msbuild-architecture: x64
77148
- name: Build
78-
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
149+
run: MSBuild /verbosity:quiet /p:Configuration=Release`;Platform=${{ matrix.arch }} MediaConch\Project\MSVC2022\MediaConch.sln
Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
if "%2"=="" echo "Post-Build.bat Qt_Dir Output_Dir" | find /v "0 "
1+
if "%1"=="" echo "Post-Build.bat Output_Dir" | find /v "0 "
22

3-
if not exist %1 (
4-
echo Missing Qt directory %1. Correct the Qt path in project properties: Include Directories, Library Directories, Pre-Build, Post-Build.
5-
%1\bin\windeployqt
6-
) else (
7-
%1\bin\windeployqt --release %2
8-
)
3+
windeployqt --release %1

Project/MSVC2022/GUI/Pre-Build.bat

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
if "%2"=="" echo "Pre-Build.bat Qt_Dir Kit|Engine" | find /v "0 "
1+
if "%1"=="" echo "Pre-Build.bat Kit|Engine" | find /v "0 "
22

3-
if not exist %1 (
4-
echo Missing Qt directory %1. Correct the Qt path in project properties: Include Directories, Library Directories, Pre-Build, Post-Build.
5-
%1\bin\qmake
6-
) else (
7-
%1\bin\qmake ..\..\Qt\MediaConch.pro USE_WEB%2=1 2> nul
8-
nmake /NOLOGO /f Makefile.Release compiler_uic_make_all compiler_rcc_make_all mocables
9-
)
3+
qmake ..\..\Qt\MediaConch.pro USE_WEB%1=1 2> nul
4+
nmake /NOLOGO /f Makefile.Release compiler_uic_make_all compiler_rcc_make_all mocables

0 commit comments

Comments
 (0)