Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit f55b73c
Showing
3 changed files
with
327 additions
and
0 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,188 @@ | ||
name: Auto Build All | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
force_build: | ||
description: 'Force build without checking updates(true/false)' | ||
required: false | ||
default: 'false' | ||
schedule: | ||
- cron: '0 */1 * * *' | ||
|
||
jobs: | ||
check-updates: | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event.inputs.force_build != 'true' }} | ||
|
||
outputs: | ||
trigger_build: ${{ steps.compare_shas.outputs.trigger_build }} | ||
|
||
steps: | ||
- name: Show system | ||
run: | | ||
echo -e "Total CPU cores\t: $(nproc)" | ||
cat /proc/cpuinfo | ||
cat /proc/meminfo | ||
- name: Get MPC-BE commit SHA | ||
run: | | ||
MPCBE_COMMIT_SHA=$(curl -sSL https://api.github.com/repos/Aleksoid1978/MPC-BE/commits/master | jq -r '.sha') | ||
echo "MPCBE_COMMIT_SHA=$MPCBE_COMMIT_SHA" >> $GITHUB_ENV | ||
shell: bash | ||
|
||
- name: Get VideoRenderer commit SHA | ||
run: | | ||
VIDEORENDERER_COMMIT_SHA=$(curl -sSL https://api.github.com/repos/Aleksoid1978/VideoRenderer/commits/master | jq -r '.sha') | ||
echo "VIDEORENDERER_COMMIT_SHA=$VIDEORENDERER_COMMIT_SHA" >> $GITHUB_ENV | ||
shell: bash | ||
|
||
- name: Get Player latest release SHAs | ||
run: | | ||
PLAYER_RELEASE_BODY=$(curl -sSL https://api.github.com/repos/qwerttvv/Player/releases/latest | jq -r '.body') | ||
MPCBE_RELEASE_SHA=$(echo "$PLAYER_RELEASE_BODY" | grep -oP 'https://github.com/Aleksoid1978/MPC-BE/commits/\K\w+') | ||
VIDEORENDERER_RELEASE_SHA=$(echo "$PLAYER_RELEASE_BODY" | grep -oP 'https://github.com/Aleksoid1978/VideoRenderer/commits/\K\w+') | ||
echo "MPCBE_RELEASE_SHA=$MPCBE_RELEASE_SHA" >> $GITHUB_ENV | ||
echo "VIDEORENDERER_RELEASE_SHA=$VIDEORENDERER_RELEASE_SHA" >> $GITHUB_ENV | ||
shell: bash | ||
|
||
- name: Compare Commit SHAs and Release SHAs | ||
id: compare_shas | ||
run: | | ||
if [[ "$MPCBE_COMMIT_SHA" != "$MPCBE_RELEASE_SHA" || "$VIDEORENDERER_COMMIT_SHA" != "$VIDEORENDERER_RELEASE_SHA" ]]; then | ||
echo "MPC-BE or VideoRenderer has a new commit. Triggering the build job." | ||
trigger_build=true | ||
else | ||
echo "No new commits in MPC-BE or VideoRenderer. Stopping the workflow." | ||
trigger_build=false | ||
fi | ||
echo "trigger_build=$trigger_build" >> $GITHUB_OUTPUT | ||
shell: bash | ||
|
||
build: | ||
runs-on: windows-latest | ||
needs: check-updates | ||
if: always() && (needs.check-updates.outputs.trigger_build == 'true' || github.event.inputs.force_build == 'true') | ||
|
||
steps: | ||
- name: Show system | ||
run: | | ||
Get-WmiObject -Class Win32_Processor | ||
systeminfo | ||
shell: pwsh | ||
|
||
- name: Get latest commit SHA for MPC-BE and Prepare Release Notes | ||
shell: pwsh | ||
run: | | ||
$SHA_MPC_BE = (curl -sSL https://api.github.com/repos/Aleksoid1978/MPC-BE/commits/master | jq -r '.sha') | ||
echo "SHA_MPC_BE=$SHA_MPC_BE" >> $env:GITHUB_ENV | ||
echo "What's new for this nightly builds" > "${{ github.workspace }}-nightly_builds_release_notes.txt" | ||
echo "https://github.com/Aleksoid1978/MPC-BE/commits/$SHA_MPC_BE" >> "${{ github.workspace }}-nightly_builds_release_notes.txt" | ||
- name: Clone MPC-BE repository | ||
run: | | ||
git clone --recursive https://github.com/Aleksoid1978/MPC-BE.git C:\\repos\\MPC-BE | ||
shell: pwsh | ||
|
||
- name: Get latest commit SHA for VideoRenderer and Prepare Release Notes | ||
shell: pwsh | ||
run: | | ||
$SHA_VIDEORENDERER = (curl -sSL https://api.github.com/repos/Aleksoid1978/VideoRenderer/commits/master | jq -r '.sha') | ||
echo "SHA_VIDEORENDERER=$SHA_VIDEORENDERER" >> $env:GITHUB_ENV | ||
echo "https://github.com/Aleksoid1978/VideoRenderer/commits/$SHA_VIDEORENDERER" >> "${{ github.workspace }}-nightly_builds_release_notes.txt" | ||
echo "" >> "${{ github.workspace }}-nightly_builds_release_notes.txt" | ||
echo "Enjoy :)" >> "${{ github.workspace }}-nightly_builds_release_notes.txt" | ||
- name: Checkout VideoRenderer code | ||
uses: actions/checkout@main | ||
with: | ||
repository: Aleksoid1978/VideoRenderer | ||
ref: master | ||
fetch-depth: 0 | ||
submodules: recursive | ||
|
||
- name: Set up MSYS | ||
run: | | ||
curl -sSL https://github.com/Aleksoid1978/MSYS/raw/main/MSYS_MinGW-w64_GCC_1320_x86-x64.7z -o MSYS_MinGW-w64_GCC_1320_x86-x64.7z | ||
7z x MSYS_MinGW-w64_GCC_1320_x86-x64.7z -oC:\\MSYS | ||
shell: pwsh | ||
|
||
- name: Create environments.bat | ||
run: | | ||
echo '@ECHO OFF' > C:\\repos\\MPC-BE\\environments.bat | ||
echo 'SET "MPCBE_MSYS=C:\\MSYS"' >> C:\\repos\\MPC-BE\\environments.bat | ||
echo 'SET "MPCBE_MINGW=C:\\MSYS\\mingw"' >> C:\\repos\\MPC-BE\\environments.bat | ||
shell: pwsh | ||
|
||
- name: Execute update_gcc.bat | ||
run: | | ||
cd C:\\repos\\MPC-BE | ||
.\\update_gcc.bat | ||
shell: pwsh | ||
|
||
- name: TimeZone | ||
shell: pwsh | ||
run: tzutil /s "China Standard Time" | ||
|
||
- name: Build VideoRenderer | ||
run: | | ||
cd D:\\a\\Player\\Player | ||
dir | ||
.\\build_mpcvr.cmd NoWait | ||
shell: pwsh | ||
continue-on-error: true | ||
|
||
- name: Build MPC-BE | ||
run: | | ||
cd C:\\repos\\MPC-BE | ||
.\\build.bat Build Packages | ||
shell: pwsh | ||
continue-on-error: true | ||
|
||
- name: Upload MPC-BE logs to artifact | ||
uses: actions/upload-artifact@main | ||
with: | ||
name: "MPC-BE.LOGS" | ||
path: C:/repos/MPC-BE/_bin/logs/ | ||
continue-on-error: true | ||
|
||
- name: Upload VideoRenderer logs to artifact | ||
uses: actions/upload-artifact@main | ||
with: | ||
name: "MPC-VideoRenderer.LOGS" | ||
path: D:/a/Player/Player/_bin/logs/ | ||
continue-on-error: true | ||
|
||
- name: Generate release tag | ||
run: echo "tag=$(date +"%Y.%m.%d-%H%M")" >> $GITHUB_ENV | ||
shell: bash | ||
|
||
- name: Release All | ||
uses: softprops/action-gh-release@master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ env.tag }} | ||
files: | | ||
C:/repos/MPC-BE/_bin/Packages/**/*.* | ||
D:/a/Player/Player/_bin/MpcVideoRenderer*.zip | ||
body_path: ${{ github.workspace }}-nightly_builds_release_notes.txt | ||
continue-on-error: true | ||
|
||
- name: Delete workflow runs | ||
uses: Mattraks/delete-workflow-runs@main | ||
with: | ||
token: ${{ github.token }} | ||
repository: ${{ github.repository }} | ||
retain_days: 90 | ||
keep_minimum_runs: 33 | ||
continue-on-error: true | ||
|
||
- name: Remove old Releases | ||
uses: dev-drprasad/delete-older-releases@master | ||
with: | ||
keep_latest: 99 | ||
delete_tags: true | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
continue-on-error: 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
name: Clean Repo | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
delete_commit_history: | ||
description: 'Delete commit history? (yes/no)' | ||
required: true | ||
default: 'yes' | ||
delete_runs_and_releases: | ||
description: 'Delete releases and workflow runs? (yes/no)' | ||
required: true | ||
default: 'no' | ||
releases_keep_latest: | ||
description: "How many latest releases to keep. (0 = all, false = skip)" | ||
required: false | ||
default: "0" | ||
type: choice | ||
options: | ||
- false | ||
- 0 | ||
- 1 | ||
- 2 | ||
- 3 | ||
- 4 | ||
- 5 | ||
- 6 | ||
- 7 | ||
- 8 | ||
- 9 | ||
- 10 | ||
- 20 | ||
- 30 | ||
workflows_keep_day: | ||
description: "Days to keep workflows. (0 = all, false = skip)" | ||
required: false | ||
default: "0" | ||
type: choice | ||
options: | ||
- false | ||
- 0 | ||
- 1 | ||
- 2 | ||
- 3 | ||
- 4 | ||
- 5 | ||
- 6 | ||
- 7 | ||
- 8 | ||
- 9 | ||
- 10 | ||
- 20 | ||
- 30 | ||
delete_tags: | ||
description: "Delete related Tags?" | ||
required: false | ||
default: "true" | ||
type: choice | ||
options: | ||
- true | ||
- false | ||
prerelease_option: | ||
description: "Whether to differentiate pre-release." | ||
required: false | ||
default: "all" | ||
type: choice | ||
options: | ||
- all | ||
- true | ||
- false | ||
releases_keep_keyword: | ||
description: "Keyword of the keep releases." | ||
required: false | ||
default: "Backup/backup/BACKUP" | ||
workflows_keep_keyword: | ||
description: "keywords for keep workflows." | ||
required: false | ||
default: "" | ||
out_log: | ||
description: "Output detailed JSON logs." | ||
required: false | ||
default: false | ||
type: boolean | ||
|
||
jobs: | ||
clean: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@main | ||
|
||
- name: Setup Git | ||
run: | | ||
git config --global user.name 'GitHub Actions' | ||
git config --global user.email 'actions@github.com' | ||
- name: Delete commit history | ||
if: contains('yes.YES.Yes', github.event.inputs.delete_commit_history) | ||
run: | | ||
default_branch=${{ github.event.repository.default_branch }} | ||
random_branch=$(uuidgen) | ||
git checkout --orphan $random_branch | ||
git commit --allow-empty -m "Initial commit" | ||
git branch -M $default_branch | ||
git push -f origin $default_branch | ||
- name: Delete releases and workflows runs | ||
if: contains('yes.YES.Yes', github.event.inputs.delete_runs_and_releases) | ||
uses: ophub/delete-releases-workflows@main | ||
with: | ||
delete_releases: ${{ github.event.inputs.releases_keep_latest != 'false' }} | ||
delete_tags: ${{ inputs.delete_tags }} | ||
prerelease_option: ${{ inputs.prerelease_option }} | ||
releases_keep_latest: ${{ inputs.releases_keep_latest }} | ||
releases_keep_keyword: ${{ inputs.releases_keep_keyword }} | ||
delete_workflows: ${{ github.event.inputs.workflows_keep_day != 'false' }} | ||
workflows_keep_day: ${{ inputs.workflows_keep_day }} | ||
workflows_keep_keyword: ${{ inputs.workflows_keep_keyword }} | ||
out_log: ${{ inputs.out_log }} | ||
gh_token: ${{ secrets.GITHUB_TOKEN }} |
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,18 @@ | ||
## MPC-BE & MPC Video Renderer | ||
|
||
|
||
#### Project Home | ||
https://github.com/Aleksoid1978/MPC-BE | ||
|
||
https://github.com/Aleksoid1978/VideoRenderer | ||
|
||
|
||
#### Yet another nightly builds download from here | ||
https://github.com/qwerttvv/Player/releases | ||
|
||
|
||
------------ | ||
|
||
|
||
Thanks to all the developers :-) | ||
|
f55b73c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@qwerttvv can you also add the
standalone_filters
builds in the workflow?f55b73c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just change the
.\\build.bat Build Packages
to.\\build.bat Build All
.I can change it later.
By the way, in what scenarios do you use standalone_filters? Can you describe exactly how you use it and why?
f55b73c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i use it in my old win7 pc with wmp as i wasn't planning to have a lot stuff in it. it's alright if it's not added. i'll get it from the mpc-be's daily build.
thanks.
f55b73c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's building, wait for the new releases
Check the progress here https://github.com/qwerttvv/Player/actions/runs/8873233344
f55b73c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I made a small mistake, new releases are generated in about half an hour
f55b73c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/qwerttvv/Player/releases/tag/2024.04.29-1355