Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion .github/workflows/llvm_clang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ jobs:
key: ${{ secrets.CACHE_VERSION }}-clang-x86_64_v3_toolchain-${{ github.run_id }}
restore-keys: ${{ secrets.CACHE_VERSION }}-clang-x86_64_v3_toolchain

- name: Loading x86_64_v4 toolchain
id: x86_64_v4_cache
uses: actions/cache/restore@main
with:
path: build_x86_64_v4
key: ${{ secrets.CACHE_VERSION }}-clang-x86_64_v4_toolchain-${{ github.run_id }}
restore-keys: ${{ secrets.CACHE_VERSION }}-clang-x86_64_v4_toolchain

- name: Loading i686 toolchain
id: i686_cache
uses: actions/cache/restore@main
Expand Down Expand Up @@ -105,6 +113,12 @@ jobs:
cmake -DTARGET_ARCH=x86_64-w64-mingw32 -DLLVM_ENABLE_PGO=GEN -DCOMPILER_TOOLCHAIN=clang -DGCC_ARCH=x86-64-v3 -DCMAKE_INSTALL_PREFIX=$PWD/clang_root -DMINGW_INSTALL_PREFIX=$PWD/build_x86_64_v3/x86_64_v3-w64-mingw32 -DSINGLE_SOURCE_LOCATION=$PWD/src_packages -G Ninja -B build_x86_64_v3 -S $PWD
ninja -C build_x86_64_v3 llvm-clang

- name: Building x86_64-v4 toolchain
if: ${{ steps.x86_64_v4_cache.outputs.cache-matched-key == '' }}
run: |
cmake -DTARGET_ARCH=x86_64-w64-mingw32 -DLLVM_ENABLE_PGO=GEN -DCOMPILER_TOOLCHAIN=clang -DGCC_ARCH=x86-64-v4 -DCMAKE_INSTALL_PREFIX=$PWD/clang_root -DMINGW_INSTALL_PREFIX=$PWD/build_x86_64_v4/x86_64_v4-w64-mingw32 -DSINGLE_SOURCE_LOCATION=$PWD/src_packages -G Ninja -B build_x86_64_v4 -S $PWD
ninja -C build_x86_64_v4 llvm-clang

- name: Building i686 toolchain
if: ${{ steps.i686_cache.outputs.cache-matched-key == '' }}
run: |
Expand Down Expand Up @@ -137,7 +151,7 @@ jobs:

- name: Cleanup
run: |
rm -rf {build_i686,build_x86_64,build_x86_64_v3,build_aarch64}/{toolchain,packages} || true
rm -rf {build_i686,build_x86_64,build_x86_64_v3,build_x86_64_v4,build_aarch64}/{toolchain,packages} || true

- name: Collecting logs
if: always()
Expand Down Expand Up @@ -181,6 +195,12 @@ jobs:
path: build_x86_64_v3
key: ${{ secrets.CACHE_VERSION }}-clang-x86_64_v3_toolchain-${{ github.run_id }}

- name: Saving x86_64_v4 toolchain
uses: actions/cache/save@main
with:
path: build_x86_64_v4
key: ${{ secrets.CACHE_VERSION }}-clang-x86_64_v4_toolchain-${{ github.run_id }}

- name: Saving i686 toolchain
uses: actions/cache/save@main
with:
Expand Down
21 changes: 17 additions & 4 deletions .github/workflows/mpv_clang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
strategy:
fail-fast: false
matrix:
bit: [i686, x86_64, x86_64_v3, aarch64]
bit: [i686, x86_64, x86_64_v3, x86_64_v4, aarch64]
env:
BIT: ${{ matrix.bit }}
container:
Expand All @@ -52,6 +52,10 @@ jobs:
echo "arch=x86_64" >> $GITHUB_ENV
echo "x86_64_level=-v3" >> $GITHUB_ENV
echo "x86_64_v3_ARCH=-DGCC_ARCH=x86-64-v3" >> $GITHUB_ENV
elif [[ $BIT == "x86_64_v4" ]]; then
echo "arch=x86_64" >> $GITHUB_ENV
echo "x86_64_level=-v4" >> $GITHUB_ENV
echo "x86_64_v4_ARCH=-DGCC_ARCH=x86-64-v4" >> $GITHUB_ENV
elif [[ $BIT == "aarch64" ]]; then
echo "arch=aarch64" >> $GITHUB_ENV
fi
Expand Down Expand Up @@ -102,7 +106,7 @@ jobs:

- name: Configuring CMake & Downloading source
run: |
cmake -DTARGET_ARCH=${{ env.arch }}-w64-mingw32 -DCOMPILER_TOOLCHAIN=clang ${{ env.x86_64_v3_ARCH }} -DCMAKE_INSTALL_PREFIX=$PWD/clang_root -DMINGW_INSTALL_PREFIX=$PWD/build_$BIT/$BIT-w64-mingw32 -DSINGLE_SOURCE_LOCATION=$PWD/src_packages -DENABLE_CCACHE=ON -DCLANG_PACKAGES_LTO=ON -G Ninja --fresh -B build_$BIT -S $PWD
cmake -DTARGET_ARCH=${{ env.arch }}-w64-mingw32 -DCOMPILER_TOOLCHAIN=clang ${{ env.x86_64_v3_ARCH }} ${{ env.x86_64_v4_ARCH }} -DCMAKE_INSTALL_PREFIX=$PWD/clang_root -DMINGW_INSTALL_PREFIX=$PWD/build_$BIT/$BIT-w64-mingw32 -DSINGLE_SOURCE_LOCATION=$PWD/src_packages -DENABLE_CCACHE=ON -DCLANG_PACKAGES_LTO=ON -G Ninja --fresh -B build_$BIT -S $PWD
ninja -C build_$BIT download || true

- name: Building mpv
Expand Down Expand Up @@ -196,6 +200,7 @@ jobs:
release_i686_key: ${{ secrets.CACHE_VERSION }}-release_i686-${{ github.run_id }}
release_x86_64_key: ${{ secrets.CACHE_VERSION }}-release_x86_64-${{ github.run_id }}
release_x86_64_v3_key: ${{ secrets.CACHE_VERSION }}-release_x86_64_v3-${{ github.run_id }}
release_x86_64_v4_key: ${{ secrets.CACHE_VERSION }}-release_x86_64_v4-${{ github.run_id }}
release_aarch64_key: ${{ secrets.CACHE_VERSION }}-release_aarch64-${{ github.run_id }}
container:
image: docker://alpine:latest
Expand Down Expand Up @@ -231,6 +236,12 @@ jobs:
path: release_x86_64_v3
key: ${{ env.release_x86_64_v3_key }}

- name: Loading release_x86_64_v4 cache
uses: actions/cache/restore@main
with:
path: release_x86_64_v4
key: ${{ env.release_x86_64_v4_key }}

- name: Loading release_aarch64 cache
uses: actions/cache/restore@main
with:
Expand All @@ -240,7 +251,7 @@ jobs:
- name: Moving archives
run: |
mkdir -p release
mv release_i686/* release_x86_64/* release_x86_64_v3/* release_aarch64/* release
mv release_i686/* release_x86_64/* release_x86_64_v3/* release_x86_64_v4/* release_aarch64/* release
du -ah release/*

- name: Uploading packages to Sourceforge
Expand All @@ -262,8 +273,9 @@ jobs:
sftp -i sf_key shinchiro@frs.sourceforge.net:/home/frs/project/mpv-player-windows <<END
put release/mpv-dev* libmpv
put release/mpv-i686* 32bit
put release/mpv-x86_64-[!v3]* 64bit
put release/mpv-x86_64-!(v3|v4)* 64bit
put release/mpv-x86_64-v3* 64bit-v3
put release/mpv-x86_64-v4* 64bit-v4
put release/mpv-$MPV_VER* release
END

Expand Down Expand Up @@ -309,6 +321,7 @@ jobs:
curl -u shinchiro:$GH_TOKEN $CURL_RETRIES -s -o /dev/null -X DELETE -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/shinchiro/mpv-winbuild-cmake/actions/caches?key=$release_i686_key
curl -u shinchiro:$GH_TOKEN $CURL_RETRIES -s -o /dev/null -X DELETE -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/shinchiro/mpv-winbuild-cmake/actions/caches?key=$release_x86_64_key
curl -u shinchiro:$GH_TOKEN $CURL_RETRIES -s -o /dev/null -X DELETE -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/shinchiro/mpv-winbuild-cmake/actions/caches?key=$release_x86_64_v3_key
curl -u shinchiro:$GH_TOKEN $CURL_RETRIES -s -o /dev/null -X DELETE -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/shinchiro/mpv-winbuild-cmake/actions/caches?key=$release_x86_64_v4_key
curl -u shinchiro:$GH_TOKEN $CURL_RETRIES -s -o /dev/null -X DELETE -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/shinchiro/mpv-winbuild-cmake/actions/caches?key=$release_aarch64_key

call_workflow:
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/mpv_gcc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ jobs:
echo "arch=x86_64" >> $GITHUB_ENV
echo "gcc_arch=-DGCC_ARCH=x86-64-v3" >> $GITHUB_ENV
echo "x86_64_level=-v3" >> $GITHUB_ENV
elif [[ $BIT == "x86_64_v4" ]]; then
echo "arch=x86_64" >> $GITHUB_ENV
echo "gcc_arch=-DGCC_ARCH=x86-64-v4" >> $GITHUB_ENV
echo "x86_64_level=-v4" >> $GITHUB_ENV
fi

- name: Setup git config
Expand Down Expand Up @@ -221,8 +225,9 @@ jobs:
sftp -i sf_key shinchiro@frs.sourceforge.net:/home/frs/project/mpv-player-windows <<END
put release/mpv-dev* libmpv
put release/mpv-i686* 32bit
put release/mpv-x86_64-[!v3]* 64bit
put release/mpv-x86_64-!(v3|v4)* 64bit
put release/mpv-x86_64-v3* 64bit-v3
put release/mpv-x86_64-v4* 64bit-v4
put release/mpv-$MPV_VER* release
END

Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ if(TARGET_CPU STREQUAL "x86_64")
set(TARGET_CPU_FAMILY "x86_64")
set(TARGET_BITS 64)
set(GCC_ARCH "x86-64" CACHE STRING "Target architecture for x86_64")
string(REGEX MATCH "-v3" x86_64_LEVEL ${GCC_ARCH})
string(REGEX MATCH "-v3|-v4" x86_64_LEVEL ${GCC_ARCH})
elseif(TARGET_CPU STREQUAL "i686")
set(TARGET_CPU_FAMILY "x86")
set(TARGET_BITS 32)
Expand Down