Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport miscellaneous commits from dav1d 1.2.0 #829

Merged
merged 10 commits into from
Mar 19, 2024
90 changes: 39 additions & 51 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,13 @@ stages:
- docker
- amd64

.debian-wasm-emscripten-common:
image: registry.videolan.org/vlc-debian-wasm-emscripten:20221213104631
stage: build
tags:
- docker
- amd64


style-check:
extends: .debian-amd64-common
Expand Down Expand Up @@ -164,21 +171,16 @@ build-debian-no-tools:
-Denable_tools=false
- ninja -C build

build-debian-bitdepth-8:
extends: .debian-amd64-common
script:
- meson build --buildtype release
--werror
-Dbitdepths=8
- ninja -C build

build-debian-bitdepth-16:
build-debian-bitdepth:
extends: .debian-amd64-common
script:
- meson build --buildtype release
--werror
-Dbitdepths=16
-Dbitdepths=$DEPTH
- ninja -C build
parallel:
matrix:
- DEPTH: [8, 16]

build-debian-avx:
extends: .debian-amd64-common
Expand Down Expand Up @@ -230,26 +232,29 @@ build-debian-clang14:
- ninja -C build
- cd build && meson test -v

build-win32:
build-win:
extends: .debian-amd64-common
script:
- wineserver -p && wine wineboot
- meson build --buildtype release
--werror
--libdir lib
--prefix "$(pwd)/build/dav1d_install"
--cross-file package/crossfiles/i686-w64-mingw32.meson
--cross-file package/crossfiles/${CROSSFILE}.meson
-Ddefault_library=both
-Dtrim_dsp=false
- ninja -C build
- ninja -C build install
- cd build && meson test -v
- i686-w64-mingw32-nm -A -g src/libdav1d.a | grep " [ABCDGRST] " | (! grep -E -v " \.| _*dav1d_")
- ${CROSSFILE}-nm -A -g src/libdav1d.a | grep " [ABCDGRST] " | (! grep -E -v " \.| _*dav1d_")
artifacts:
name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
paths:
- build/dav1d_install/
expire_in: 1 week
parallel:
matrix:
- CROSSFILE: [i686-w64-mingw32, x86_64-w64-mingw32]

build-win32-unaligned-stack:
extends: .debian-llvm-mingw-common
Expand All @@ -263,58 +268,27 @@ build-win32-unaligned-stack:
- ninja -C build
- cd build && meson test -v

build-win64:
extends: .debian-amd64-common
script:
- wineserver -p && wine wineboot
- meson build --buildtype release
--werror
--libdir lib
--prefix "$(pwd)/build/dav1d_install"
--cross-file package/crossfiles/x86_64-w64-mingw32.meson
-Ddefault_library=both
-Dtrim_dsp=false
- ninja -C build
- ninja -C build install
- cd build && meson test -v
- x86_64-w64-mingw32-nm -A -g src/libdav1d.a | grep " [ABCDGRST] " | (! grep -E -v " \.| _*dav1d_")
artifacts:
name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
paths:
- build/dav1d_install/
expire_in: 1 week

build-win-arm32:
extends: .debian-llvm-mingw-common
script:
- meson build --buildtype release
--werror
--libdir lib
--prefix "$(pwd)/build/dav1d_install"
--cross-file /opt/crossfiles/armv7-w64-mingw32.meson
-Ddefault_library=both
-Dtrim_dsp=false
- ninja -C build
- armv7-w64-mingw32-nm -A -g build/src/libdav1d.a | grep " [ABCDGRST] " | (! grep -E -v " \.| _*dav1d_")

build-win-arm64:
build-win-arm:
extends: .debian-llvm-mingw-common
script:
- meson build --buildtype release
--werror
--libdir lib
--prefix "$(pwd)/build/dav1d_install"
--cross-file /opt/crossfiles/aarch64-w64-mingw32.meson
--cross-file /opt/crossfiles/${CROSSFILE}.meson
-Ddefault_library=both
-Dtrim_dsp=false
- ninja -C build
- ninja -C build install
- aarch64-w64-mingw32-nm -A -g build/src/libdav1d.a | grep " [ABCDGRST] " | (! grep -E -v " \.| _*dav1d_")
- ${CROSSFILE}-nm -A -g build/src/libdav1d.a | grep " [ABCDGRST] " | (! grep -E -v " \.| _*dav1d_")
artifacts:
name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
paths:
- build/dav1d_install/
expire_in: 1 week
parallel:
matrix:
- CROSSFILE: [armv7-w64-mingw32, aarch64-w64-mingw32]

.build-android-common:
extends: .android-common
Expand Down Expand Up @@ -434,6 +408,20 @@ build-debian-ppc64le:
- ninja -C build
- cd build && meson test -v

build-debian-wasm:
extends: .debian-wasm-emscripten-common
script:
- source $EMSCRIPTEN_SDK/emsdk_env.sh
- meson setup build --buildtype release
--werror
--default-library static
--cross-file package/crossfiles/${CROSSFILE}.meson
- ninja -C build
- cd build && meson test -v
parallel:
matrix:
- CROSSFILE: [wasm32, wasm64]


.test-common:
stage: test
Expand Down Expand Up @@ -636,7 +624,7 @@ test-win64:
extends:
- .debian-amd64-common
- .test-common
needs: ["build-win64"]
needs: ["build-win: [x86_64-w64-mingw32]"]
tags:
- docker
- avx2
Expand Down
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ test_args = []
optional_arguments = []
optional_link_arguments = []

if host_machine.system() in ['linux', 'gnu']
if host_machine.system() in ['linux', 'gnu', 'emscripten']
test_args += '-D_GNU_SOURCE'
add_project_arguments('-D_GNU_SOURCE', language: 'c')
endif
Expand Down
2 changes: 1 addition & 1 deletion package/crossfiles/aarch64-android.meson
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ needs_exe_wrapper = true
[host_machine]
system = 'android'
cpu_family = 'aarch64'
endian = 'little'
cpu = 'aarch64'
endian = 'little'
2 changes: 1 addition & 1 deletion package/crossfiles/arm-android.meson
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ needs_exe_wrapper = true
[host_machine]
system = 'android'
cpu_family = 'arm'
endian = 'little'
cpu = 'arm'
endian = 'little'
3 changes: 1 addition & 2 deletions package/crossfiles/i686-w64-mingw32.meson
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ cpp = 'i686-w64-mingw32-g++'
ar = 'i686-w64-mingw32-ar'
strip = 'i686-w64-mingw32-strip'
windres = 'i686-w64-mingw32-windres'
exe_wrapper = ['wine']
exe_wrapper = 'wine'

[properties]
c_link_args = ['-static-libgcc']
needs_exe_wrapper = true

[host_machine]
system = 'windows'
Expand Down
15 changes: 15 additions & 0 deletions package/crossfiles/wasm32.meson
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[binaries]
c = 'emcc'
cpp = 'em++'
ar = 'emar'
strip = 'emstrip'
exe_wrapper = 'node'

[properties]
c_link_args = ['-sEXPORT_ALL=1']

[host_machine]
system = 'emscripten'
cpu_family = 'wasm32'
cpu = 'wasm32'
endian = 'little'
15 changes: 15 additions & 0 deletions package/crossfiles/wasm64.meson
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[binaries]
c = 'emcc'
cpp = 'em++'
ar = 'emar'
strip = 'emstrip'
exe_wrapper = 'node'

[properties]
c_link_args = ['-sEXPORT_ALL=1']

[host_machine]
system = 'emscripten'
cpu_family = 'wasm64'
cpu = 'wasm64'
endian = 'little'
15 changes: 15 additions & 0 deletions package/crossfiles/x86-android.meson
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[binaries]
c = 'i686-linux-android19-clang'
cpp = 'i686-linux-android19-clang++'
ar = 'llvm-ar'
strip = 'llvm-strip'
pkgconfig = 'pkg-config'

[properties]
needs_exe_wrapper = true

[host_machine]
system = 'android'
cpu_family = 'x86'
cpu = 'i686'
endian = 'little'
15 changes: 15 additions & 0 deletions package/crossfiles/x86_64-android.meson
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[binaries]
c = 'x86_64-linux-android21-clang'
cpp = 'x86_64-linux-android21-clang++'
ar = 'llvm-ar'
strip = 'llvm-strip'
pkgconfig = 'pkg-config'

[properties]
needs_exe_wrapper = true

[host_machine]
system = 'android'
cpu_family = 'x86_64'
cpu = 'x86_64'
endian = 'little'
3 changes: 1 addition & 2 deletions package/crossfiles/x86_64-w64-mingw32.meson
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ cpp = 'x86_64-w64-mingw32-g++'
ar = 'x86_64-w64-mingw32-ar'
strip = 'x86_64-w64-mingw32-strip'
windres = 'x86_64-w64-mingw32-windres'
exe_wrapper = ['wine']
exe_wrapper = 'wine'

[properties]
c_link_args = ['-static-libgcc']
needs_exe_wrapper = true

[host_machine]
system = 'windows'
Expand Down
Loading
Loading