-
-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #412 from jellyfin/win64-clang
ci: Add Windows Clang builder
- Loading branch information
Showing
107 changed files
with
5,890 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
* text eol=lf | ||
*.pnm -diff -text | ||
tests/ref/fate/sub-scc eol=crlf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
on: | ||
workflow_call: | ||
inputs: | ||
release: | ||
required: false | ||
default: false | ||
type: boolean | ||
secrets: | ||
deploy-host: | ||
required: false | ||
deploy-user: | ||
required: false | ||
deploy-key: | ||
required: false | ||
|
||
jobs: | ||
build: | ||
name: 'Build Portable FFmpeg' | ||
runs-on: windows-latest | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
os: | ||
- name: CLANG64 | ||
arch: win64 | ||
defaults: | ||
run: | ||
shell: msys2 {0} | ||
steps: | ||
- uses: msys2/setup-msys2@v2 | ||
with: | ||
update: true | ||
msystem: CLANG64 | ||
install: >- | ||
git | ||
curl | ||
wget | ||
zip | ||
mingw-w64-clang-x86_64-toolchain | ||
quilt | ||
diffstat | ||
mingw-w64-clang-x86_64-nasm | ||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
|
||
- name: Prepare prefix dir | ||
run: | | ||
mkdir /clang64/ffbuild | ||
- name: Build Portable | ||
run: ./msys2/build.sh | ||
|
||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4 | ||
with: | ||
name: win-clang-${{ matrix.os.arch }}-portable | ||
path: ./msys2/artifacts | ||
|
||
publish: | ||
name: Publish Portable Release | ||
if: ${{ inputs.release }} | ||
runs-on: ubuntu-latest | ||
needs: | ||
- build | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
arch: [win64] | ||
|
||
steps: | ||
- name: Set Versions | ||
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 | ||
id: set_version | ||
with: | ||
script: | | ||
const tag = context.ref.substring(10) | ||
const no_v = tag.replace('v', '') | ||
const dash_index = no_v.lastIndexOf('-') | ||
const major_index = no_v.indexOf('.') | ||
const no_dash = (dash_index > -1) ? no_v.substring(0, dash_index) : no_v | ||
const major = (major_index > -1) ? no_v.substring(0, major_index) : no_v | ||
core.setOutput('tag', tag) | ||
core.setOutput('no-v', no_v) | ||
core.setOutput('no-dash', no_dash) | ||
core.setOutput('major', major) | ||
- name: Download Artifacts | ||
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | ||
with: | ||
name: win-clang-${{ matrix.arch }}-portable | ||
path: artifact | ||
|
||
- name: Upload GH Release Assets | ||
uses: shogo82148/actions-upload-release-asset@8f032eff0255912cc9c8455797fd6d72f25c7ab7 # v1.7.5 | ||
with: | ||
upload_url: ${{ github.event.release.upload_url }} | ||
overwrite: true | ||
asset_path: | | ||
./artifact/**/*.zip | ||
- name: Upload release archive to repo.jellyfin.org | ||
uses: appleboy/scp-action@917f8b81dfc1ccd331fef9e2d61bdc6c8be94634 # v0.1.7 | ||
with: | ||
host: ${{ secrets.deploy-host }} | ||
username: ${{ secrets.deploy-user }} | ||
key: ${{ secrets.deploy-key }} | ||
source: artifact/* | ||
strip_components: 1 | ||
target: /srv/incoming/ffmpeg/${{ steps.set_version.outputs.no-v }}/windows/${{ matrix.arch }} | ||
|
||
- name: Move incoming release into repository | ||
uses: appleboy/ssh-action@029f5b4aeeeb58fdfe1410a5d17f967dacf36262 # v1.0.3 | ||
with: | ||
host: ${{ secrets.deploy-host }} | ||
username: ${{ secrets.deploy-user }} | ||
key: ${{ secrets.deploy-key }} | ||
envs: JELLYFIN_VERSION | ||
script_stop: true | ||
script: | | ||
# Create the target folder and move arch directory into it | ||
sudo mkdir -p /srv/repository/main/ffmpeg/windows/${{ steps.set_version.outputs.major }}.x/${{ steps.set_version.outputs.no-v }}/${{ matrix.arch }} | ||
sudo mv -t /srv/repository/main/ffmpeg/windows/${{ steps.set_version.outputs.major }}.x/${{ steps.set_version.outputs.no-v }}/${{ matrix.arch }}/ /srv/incoming/ffmpeg/${{ steps.set_version.outputs.no-v }}/windows/${{ matrix.arch }}/* | ||
sudo chown -R root:root /srv/repository/main/ffmpeg/windows/${{ steps.set_version.outputs.major }}.x/${{ steps.set_version.outputs.no-v }} | ||
# Update symlink for latest-X.x | ||
sudo rm -f /srv/repository/main/ffmpeg/windows/latest-${{ steps.set_version.outputs.major }}.x || true | ||
sudo ln -s /srv/repository/main/ffmpeg/windows/${{ steps.set_version.outputs.major }}.x/${{ steps.set_version.outputs.no-v }} /srv/repository/main/ffmpeg/windows/latest-${{ steps.set_version.outputs.major }}.x || true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
# Maintainer: J. Peter Mugaas <[email protected]> | ||
|
||
_realname=brotli | ||
pkgbase=mingw-w64-jellyfin-${_realname} | ||
pkgname=("${MINGW_PACKAGE_PREFIX}-jellyfin-${_realname}") | ||
pkgver=1.1.0 | ||
pkgrel=1 | ||
pkgdesc="Brotli compression library (mingw-w64)" | ||
arch=('any') | ||
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64') | ||
url='https://github.com/google/brotli' | ||
msys2_references=( | ||
"pypi: brotli" | ||
"cpe: cpe:/a:google:brotli" | ||
) | ||
makedepends=("${MINGW_PACKAGE_PREFIX}-cmake" | ||
"${MINGW_PACKAGE_PREFIX}-ninja" | ||
"${MINGW_PACKAGE_PREFIX}-cc" | ||
"${MINGW_PACKAGE_PREFIX}-python-setuptools" | ||
"${MINGW_PACKAGE_PREFIX}-python-build" | ||
"${MINGW_PACKAGE_PREFIX}-python-installer" | ||
"${MINGW_PACKAGE_PREFIX}-python-wheel" | ||
) | ||
license=('spdx:MIT') | ||
source=("${_realname}-${pkgver}.tar.gz"::"https://github.com/google/brotli/archive/v${pkgver}.tar.gz") | ||
sha256sums=('e720a6ca29428b803f4ad165371771f5398faba397edf6778837a18599ea13ff') | ||
|
||
prepare() { | ||
cd "${srcdir}/${_realname}-${pkgver}" | ||
} | ||
|
||
build() { | ||
cd "${srcdir}/${_realname}-${pkgver}" | ||
|
||
${MINGW_PREFIX}/bin/python -m build --wheel --skip-dependency-check --no-isolation | ||
|
||
declare -a extra_config | ||
if check_option "debug" "n"; then | ||
extra_config+=("-DCMAKE_BUILD_TYPE=Release") | ||
else | ||
extra_config+=("-DCMAKE_BUILD_TYPE=Debug") | ||
fi | ||
|
||
mkdir -p "${srcdir}/build-${MSYSTEM}-static" && cd "${srcdir}/build-${MSYSTEM}-static" | ||
|
||
MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ | ||
${MINGW_PREFIX}/bin/cmake \ | ||
-GNinja \ | ||
-DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX}/ffbuild/ \ | ||
"${extra_config[@]}" \ | ||
-DBUILD_SHARED_LIBS=OFF \ | ||
-DENABLE_STATIC=ON \ | ||
-DBUILD_STATIC_LIBS=ON \ | ||
../${_realname}-${pkgver} | ||
|
||
${MINGW_PREFIX}/bin/cmake --build . | ||
} | ||
|
||
check() { | ||
: | ||
} | ||
|
||
package_brotli() { | ||
cd "${srcdir}"/build-${MSYSTEM}-static | ||
DESTDIR="${pkgdir}" ${MINGW_PREFIX}/bin/cmake --install . | ||
|
||
install -D -m644 "${srcdir}"/brotli-${pkgver}/LICENSE "${pkgdir}${MINGW_PREFIX}/ffbuild/share/licenses/${_realname}/LICENSE" | ||
|
||
# Let ffmpeg also statically link to brotlicommon | ||
sed -s "s|-lbrotlidec|-lbrotlidec\ -lbrotlicommon|g" -i "${pkgdir}"${MINGW_PREFIX}/ffbuild/lib/pkgconfig/libbrotlidec.pc | ||
sed -s "s|-lbrotlidec|-lbrotlidec\ -lbrotlicommon|g" -i "${pkgdir}"${MINGW_PREFIX}/ffbuild/lib/pkgconfig/libbrotlienc.pc | ||
} | ||
|
||
# template start; name=mingw-w64-splitpkg-wrappers; version=1.0; | ||
# vim: set ft=bash : | ||
|
||
# generate wrappers | ||
for _name in "${pkgname[@]}"; do | ||
_short="package_${_name#${MINGW_PACKAGE_PREFIX}-jellyfin-}" | ||
_func="$(declare -f "${_short}")" | ||
eval "${_func/#${_short}/package_${_name}}" | ||
done | ||
# template end; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# Maintainer: Alexey Pavlov <[email protected]> | ||
# Contributor: Renato Silva <[email protected]> | ||
|
||
_realname=bzip2 | ||
pkgbase=mingw-w64-jellyfin-${_realname} | ||
pkgname="${MINGW_PACKAGE_PREFIX}-jellyfin-${_realname}" | ||
pkgver=1.0.8 | ||
pkgrel=3 | ||
pkgdesc="A high-quality data compression program (mingw-w64)" | ||
arch=('any') | ||
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64') | ||
url="https://sourceware.org/bzip2/" | ||
msys2_references=( | ||
"cpe: cpe:/a:bzip:bzip2" | ||
) | ||
license=("custom") | ||
depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") | ||
makedepends=("${MINGW_PACKAGE_PREFIX}-cc" "${MINGW_PACKAGE_PREFIX}-autotools") | ||
options=('strip' 'staticlibs') | ||
source=("https://mirrors.kernel.org/sourceware/bzip2/bzip2-${pkgver}.tar.gz" | ||
"bzip2-cygming-1.0.6.src.all.patch" | ||
"bzip2-buildsystem.all.patch" | ||
"bzip2-1.0.6-progress.all.patch") | ||
sha256sums=('ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269' | ||
'7e67f77172b19f3e6c1f0875b1d3e9cb79211f8e1c752794ef9afd3704f928cf' | ||
'e519a50a4adaf05b18650d3e9d644badc66e80ca86063681ffe9a2c2226319d0' | ||
'f93e6b50082a8e880ee8436c7ec6a65a8f01e9282436af77f95bb259b1c7f7f7') | ||
|
||
export FF_MINGW_PREFIX="${MINGW_PREFIX}/ffbuild" | ||
|
||
prepare() { | ||
cd "${srcdir}/${_realname}-${pkgver}" | ||
# remove files that are created by patches. | ||
rm -rf README.CYGMING | true | ||
rm -rf aclocal.m4 | true | ||
rm -rf configure.ac | true | ||
rm -rf libbz2.def.in | true | ||
rm -rf bzip2.pc.in | true | ||
rm -rf Makefile.in | true | ||
|
||
patch -p1 -i "$srcdir/"bzip2-cygming-1.0.6.src.all.patch | ||
patch -p1 -i "$srcdir/"bzip2-buildsystem.all.patch | ||
patch -p1 -i "$srcdir/"bzip2-1.0.6-progress.all.patch | ||
|
||
autoreconf -fi | ||
} | ||
|
||
build() { | ||
mkdir -p "${srcdir}/build-${CARCH}" | ||
cd "${srcdir}/build-${CARCH}" | ||
../${_realname}-${pkgver}/configure \ | ||
--prefix=${FF_MINGW_PREFIX} \ | ||
--build=${MINGW_CHOST} \ | ||
--host=${MINGW_CHOST} \ | ||
--target=${MINGW_CHOST} \ | ||
--disable-shared | ||
|
||
make all-libs | ||
} | ||
|
||
check() { | ||
: | ||
} | ||
|
||
package() { | ||
cd "${srcdir}/build-${CARCH}" | ||
make DESTDIR="${pkgdir}" install | ||
# rm "${pkgdir}${MINGW_PREFIX}/bin/bz"{diff,grep,more} | ||
install -Dm644 "${srcdir}/${_realname}-${pkgver}/LICENSE" "${pkgdir}${FF_MINGW_PREFIX}/share/licenses/${_realname}/LICENSE" | ||
} |
Oops, something went wrong.