-
Notifications
You must be signed in to change notification settings - Fork 3
139 lines (112 loc) · 3.59 KB
/
ci_win.yml
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
name: 'tests Windows'
on:
push:
branches:
- 'main'
pull_request:
schedule:
- cron: "0 0 * * 6" # Run every Saturday at midnight
jobs:
mingw:
runs-on: windows-latest
strategy:
matrix:
build_type: [static, shared]
include:
- player: disabled
build_type: static
- player: enabled
build_type: shared
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v3
- uses: msys2/setup-msys2@v2
with:
msystem: MINGW64 # Start a 64 bit Mingw environment
update: true
- name: Install dependencies
run: |
pacman -S --noconfirm --needed git
pacman -S --noconfirm --needed mingw-w64-x86_64-{toolchain,ffmpeg}
pacman -S --noconfirm mingw-w64-x86_64-python3-pip
pacman -S --noconfirm --needed mingw-w64-x86_64-meson
- name: Setup
run: |
meson setup builddir --default-library ${{ matrix.build_type }} -Dplayer=${{ matrix.player }}
- name: Build
run: |
meson compile -C builddir
- name: Test
run: |
meson test -C builddir
- name: Upload Logs
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: mingw-${{ matrix.build_type }}-logs
path: builddir/meson-logs
msvc:
runs-on: windows-latest
env:
FFMPEG_SRC: ffmpeg-n7.0-21-gfb8f0ea7b3-win64-gpl-shared-7.0
FFMPEG_URL: https://github.com/BtbN/FFmpeg-Builds/releases/download/autobuild-2024-04-30-12-51
PKGCONF_SRC: pkgconf-1.9.4
PKGCONF_URL: https://distfiles.dereferenced.org/pkgconf
strategy:
matrix:
build_type: [static, shared]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.x'
architecture: 'x64'
- name: Install meson
shell: bash
run: |
pip install meson
- name: Download pkgconf
shell: bash
run: |
curl -L -o ${{ env.PKGCONF_SRC }}.tar.xz ${{ env.PKGCONF_URL }}/${{ env.PKGCONF_SRC }}.tar.xz
tar xf ${{ env.PKGCONF_SRC }}.tar.xz
- name: Install pkgconf
shell: pwsh
run: |
.\scripts\msvc-env.ps1
cd ${{ env.PKGCONF_SRC }}
meson setup builddir --buildtype release -Dtests=disabled --prefix "D:\a\nope.media\nope.media\pkgconf"
meson install -C builddir
copy D:\a\nope.media\nope.media\pkgconf\bin\pkgconf.exe D:\a\nope.media\nope.media\pkgconf\bin\pkg-config.exe
- name: Install dependencies
shell: bash
run: |
curl -L -o ${{ env.FFMPEG_SRC }}.zip ${{ env.FFMPEG_URL }}/${{ env.FFMPEG_SRC }}.zip
unzip ${{ env.FFMPEG_SRC }}.zip
ln -s ${{ env.FFMPEG_SRC }} ffmpeg
- name: Setup
shell: pwsh
run: |
.\scripts\msvc-env.ps1
$env:Path = "D:\a\nope.media\nope.media\pkgconf\bin;" + $env:Path
meson setup builddir --backend vs --buildtype release --default-library ${{ matrix.build_type }} `
--pkg-config-path "D:\a\nope.media\nope.media\ffmpeg\lib\pkgconfig"
- name: Build
shell: pwsh
run: |
.\scripts\msvc-env.ps1
meson compile -C builddir
- name: Test
shell: pwsh
run: |
.\scripts\msvc-env.ps1
$env:Path = "D:\a\nope.media\nope.media\ffmpeg\bin;" + $env:Path
meson test -C builddir
- name: Upload Logs
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: msvc-${{ matrix.build_type }}-logs
path: builddir/meson-logs