-
Notifications
You must be signed in to change notification settings - Fork 15
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 #26 from quietvoid/test_dovi_win
Allow linking to libdovi for Windows
- Loading branch information
Showing
3 changed files
with
136 additions
and
6 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 |
---|---|---|
@@ -0,0 +1,121 @@ | ||
defaults: | ||
run: | ||
shell: bash | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
name: vs-placebo build | ||
|
||
jobs: | ||
build_vs_placebo: | ||
name: Building vs-placebo | ||
runs-on: ubuntu-latest | ||
env: | ||
CURL_RETRIES: "--connect-timeout 60 --retry 999 --retry-delay 5 --retry-all-errors" | ||
container: | ||
image: docker://archlinux:base-devel | ||
|
||
steps: | ||
|
||
- name: Get current date and random hash | ||
run: | | ||
echo "short_date=$(date "+%Y%m%d")" >> $GITHUB_ENV | ||
echo "random_hash=$(echo $RANDOM | md5sum | head -c 20)" >> $GITHUB_ENV | ||
- name: Installing dependencies | ||
run: | | ||
echo -e "[multilib]\nInclude = /etc/pacman.d/mirrorlist" >> /etc/pacman.conf | ||
pacman -Syu --noconfirm | ||
pacman -S --noconfirm --needed jq openssh git gyp mercurial subversion ninja \ | ||
cmake ragel yasm nasm asciidoc enca gperf unzip p7zip gcc-multilib clang \ | ||
python-pip curl lib32-glib2 wget rustup cargo-c | ||
pip3 install rst2pdf mako meson | ||
git config --global user.name "github-actions" | ||
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
git config --global --add safe.directory $PWD | ||
- uses: actions/checkout@v3 | ||
with: | ||
repository: quietvoid/mpv-winbuild-cmake | ||
ref: vs-placebo-libdovi | ||
|
||
- name: Cache | ||
uses: actions/cache@v3 | ||
id: cache | ||
with: | ||
path: | | ||
src_packages | ||
build64 | ||
key: ${{ runner.os }}-build-mycache-vsplacebo-libdovi | ||
|
||
- name: Cache info | ||
run: | | ||
echo "Cache hit: ${{ steps.cache.outputs.cache-hit }}" | ||
- name: Downloading source | ||
if: ${{ steps.cache.outputs.cache-hit != 'true' }} | ||
run: | | ||
cmake -DTARGET_ARCH=x86_64-w64-mingw32 -DALWAYS_REMOVE_BUILDFILES=ON -DSINGLE_SOURCE_LOCATION=$PWD/src_packages -G Ninja -Bbuild64 -H. | ||
ninja -C build64 download || true | ||
- name: Building toolchain | ||
if: ${{ steps.cache.outputs.cache-hit != 'true' }} | ||
id: build_toolchain | ||
continue-on-error: true | ||
run: | | ||
if [[ ! "$(ls -A build64/install/bin)" ]]; then ninja -C build64 gcc; fi | ||
- name: Update dependencies | ||
id: update_deps | ||
continue-on-error: true | ||
run: | | ||
ninja -C build64 update | ||
- name: Building vs-placebo | ||
id: build_vs_placebo | ||
if: ${{ steps.cache.outputs.cache-hit == 'true' || steps.build_toolchain.outcome == 'success' }} | ||
continue-on-error: true | ||
run: | | ||
ninja -C build64 vs-placebo | ||
- name: Packaging vs-placebo | ||
id: packaging_vs_placebo | ||
if: ${{ steps.build_vs_placebo.outcome == 'success' }} | ||
continue-on-error: true | ||
run: | | ||
mkdir -p release | ||
mv build64/install/x86_64-w64-mingw32/lib64/vapoursynth/libvs_placebo.dll . | ||
7z a ./release/libvs_placebo.zip libvs_placebo.dll | ||
rm -f ./libvs_placebo.dll | ||
- name: Uploading release | ||
id: uploading_release | ||
if: ${{ steps.packaging_vs_placebo.outcome == 'success' }} | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: vs-placebo | ||
path: release | ||
|
||
- name: Collecting logs | ||
id: collect_logs | ||
run: | | ||
mkdir -p build64_logs | ||
cp -fr $(find build64 -type f -iname "*-*.log") build64_logs || true | ||
7z a -m0=lzma2 -mx=9 -ms=on logs.7z build*logs | ||
- name: Uploading logs | ||
id: upload_logs | ||
continue-on-error: true | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: logs | ||
path: logs.7z | ||
retention-days: 1 | ||
|
||
- name: Cleaning build directory | ||
id: delete_build_dir | ||
run: | | ||
ninja -C build64 clean | ||
du -sh build64 src_packages /var/cache/pacman/pkg || 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