forked from mitzsch/mpv
-
Notifications
You must be signed in to change notification settings - Fork 0
135 lines (123 loc) · 3.25 KB
/
build.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
name: build
on:
push:
branches:
- master
- ci
- 'release/**'
paths-ignore:
- 'DOCS/**'
- 'TOOLS/lua/**'
- '.editorconfig'
- '.gitignore'
- 'Copyright'
- 'README.md'
- 'RELEASE_NOTES'
pull_request:
branches: [master]
paths-ignore:
- 'DOCS/**'
- 'TOOLS/lua/**'
- '.editorconfig'
- '.gitignore'
- 'Copyright'
- 'README.md'
- 'RELEASE_NOTES'
jobs:
msys2:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
sys:
- clang64
- mingw64
- ucrt64
defaults:
run:
shell: msys2 {0}
steps:
- name: Disable autocrlf
shell: pwsh
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- uses: actions/checkout@v4
- uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.sys }}
update: true
install: git
pacboy: >-
angleproject:p
ca-certificates:p
cc:p
diffutils:p
ffmpeg:p
lcms2:p
libarchive:p
libass:p
libcdio-paranoia:p
libdvdnav:p
libjpeg-turbo:p
libplacebo:p
lua51:p
meson:p
ninja:p
pkgconf:p
python:p
rst2pdf:p
rubberband:p
shaderc:p
spirv-cross:p
uchardet:p
vapoursynth:p
vulkan-devel:p
- name: Build with meson
id: build
run: |
./ci/build-msys2.sh meson
- name: Print meson log
if: ${{ failure() && steps.build.outcome == 'failure' }}
run: |
cat ./build/meson-logs/meson-log.txt
- name: Run meson tests
id: tests
run: |
meson test -C build
- name: Print meson test log
if: ${{ failure() && steps.tests.outcome == 'failure' }}
run: |
cat ./build/meson-logs/testlog.txt
- name: Archive build directory with ZIP
run: zip -r mpv-${{ matrix.sys }}.zip /d/a/mpv/mpv/build/ || true
- name: Archive build directory with TAR
run: tar -cvf mpv-${{ matrix.sys }}.tar /d/a/mpv/mpv/build/ || true
- name: 'Upload ZIP Artifact'
uses: actions/upload-artifact@v4
with:
name: mpv-${{ matrix.sys }}-zip
path: mpv-${{ matrix.sys }}.zip
- name: 'Upload TAR Artifact'
uses: actions/upload-artifact@v4
with:
name: mpv-${{ matrix.sys }}-tar
path: mpv-${{ matrix.sys }}.tar
release:
runs-on: windows-latest
permissions:
contents: write
needs: msys2
steps:
- uses: actions/download-artifact@v3
with:
name: mpv-${{ matrix.sys }}.zip
- uses: ncipollo/release-action@v1
with:
artifacts: "${{ github.workspace }}/mpv-${{ matrix.sys }}.zip"
- uses: actions/download-artifact@v3
with:
name: mpv-${{ matrix.sys }}.tar
- uses: ncipollo/release-action@v1
with:
artifacts: "${{ github.workspace }}/mpv-${{ matrix.sys }}.tar"