diff --git a/.github/workflows/check-smp.yml b/.github/workflows/check-smp.yml new file mode 100644 index 0000000..e2c444c --- /dev/null +++ b/.github/workflows/check-smp.yml @@ -0,0 +1,78 @@ +name: Update data +on: + push: + schedule: + - cron: '0 5 * * 6' + workflow_dispatch: # + +env: + submodule_owner: ShiftMediaProject + submodule_folder: SMP + +jobs: + check_smp: + runs-on: ubuntu-latest + strategy: + matrix: + submodule: + - fontconfig + - freetype2 + - fribidi + - harfbuzz + - libass + - libiconv + - liblzma + - libxml2 + - zlib + steps: + - uses: actions/checkout@v2 + - name: Set submodule current + run: | + git submodule update --init --recursive "${{ env.submodule_folder }}/${{ matrix.submodule }}" + cd ${{ env.submodule_folder }}/${{ matrix.submodule }} + echo SUBMODULE_NAME=${{ matrix.submodule }} >> $GITHUB_ENV + echo SUBMODULE_REV=$(git describe --tags --first-parent --abbrev=7 --long --dirty) >> $GITHUB_ENV + echo SUBMODULE_SHA=$(git rev-parse HEAD) >> $GITHUB_ENV + - name: Get submodule current remote + id: current + uses: cardinalby/git-get-release-action@1.2.2 + env: + GITHUB_TOKEN: ${{ github.token }} + with: + repo: ${{ env.submodule_owner }}/${{ matrix.submodule }} + commitSha: ${{ env.SUBMODULE_SHA }} + doNotFailIfNotFound: true + - name: Get submodule latest remote + id: latest + uses: cardinalby/git-get-release-action@1.2.2 + env: + GITHUB_TOKEN: ${{ github.token }} + with: + repo: ${{ env.submodule_owner }}/${{ matrix.submodule }} + latest: true + prerelease: false + doNotFailIfNotFound: true + - name: Set submodule current remote + if: steps.current.outputs.tag_name != '' + run: echo SUBMODULE_REV=${{ steps.current.outputs.tag_name }} >> $GITHUB_ENV + - name: Check if need update + if: | + steps.current.outputs.tag_name == '' || + steps.latest.outputs.tag_name != '' && + steps.current.outputs.tag_name != steps.latest.outputs.tag_name + run: | + cd ${{ env.submodule_folder }}/${{ matrix.submodule }} + git checkout ${{ steps.latest.outputs.tag_name }} + echo NEED_UPDATE=1 >> $GITHUB_ENV + - name: Run update + if: ${{ env.NEED_UPDATE }} == '1' + uses: peter-evans/create-pull-request@v4 + with: + commit-message: Update ${{ matrix.submodule }} to ${{ steps.latest.outputs.tag_name }} + branch: submodule-${{ matrix.submodule }}-${{ steps.latest.outputs.tag_name }} + branch-suffix: short-commit-hash + delete-branch: true + title: Update ${{ matrix.submodule }} to ${{ steps.latest.outputs.tag_name }} + body: | + Update ${{ matrix.submodule }} to ${{ steps.latest.outputs.tag_name }} + Current: ${{ env.SUBMODULE_REV }} \ No newline at end of file diff --git a/.github/workflows/github-ci.yml b/.github/workflows/github-ci.yml index a28d621..a17e038 100644 --- a/.github/workflows/github-ci.yml +++ b/.github/workflows/github-ci.yml @@ -2,7 +2,7 @@ name: GitHub CI on: push: - workflow_dispatch: + workflow_dispatch: # jobs: build-linux: @@ -41,6 +41,8 @@ jobs: - name: install submodules and nasm run: | git submodule update --init --recursive + git clone https://github.com/ShiftMediaProject/VSYASM.git + .\VSYASM\install_script.bat git clone https://github.com/ShiftMediaProject/VSNASM.git .\VSNASM\install_script.bat - uses: actions/setup-node@v3 diff --git a/SMP/fontconfig b/SMP/fontconfig index 4bdfd6e..9494f72 160000 --- a/SMP/fontconfig +++ b/SMP/fontconfig @@ -1 +1 @@ -Subproject commit 4bdfd6e9bebd8eac64e39d7480d0aa3b98833cf6 +Subproject commit 9494f72785e90425e05d0a04e44c0f65f5f42d17