Build plugin linux-glibc-x86_64 #6
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
name: "Build plugin linux-glibc-x86_64" | |
on: | |
workflow_dispatch: | |
jobs: | |
build-linux: | |
name: Build Linux | |
runs-on: ubuntu-22.04 | |
permissions: | |
contents: write # IMPORTANT: mandatory for making GitHub Releases | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
fetch-tags: true | |
- uses: awalsh128/cache-apt-pkgs-action@latest | |
with: | |
packages: automake autoconf libtool libtool-bin build-essential nasm yasm cmake python3 python3-pip python3-dev | |
version: 1.0 | |
- name: Build plugin | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
run: | | |
cd ~ | |
gh release list --repo '${{ github.repository }}' | grep -m1 "compiler-*" | cut -f3 | xargs -i gh release download {} --repo '${{ github.repository }}' --pattern 'crosstool-ng-compiler-linux-x86_64*' | |
tar xzf crosstool-ng-compiler-linux-x86_64.tar.gz | |
export PATH="${HOME}/x-tools/x86_64-unknown-linux-gnu/bin:$PATH" | |
pip3 install meson ninja pyzstd click | |
cd ${{ github.workspace }} | |
gh release list --repo '${{ github.repository }}' | grep -m1 "vapoursynth-*" | cut -f3 | xargs -i gh release download {} --repo '${{ github.repository }}' --pattern 'vapoursynth-build-linux-x86_64*' | |
tar xzf vapoursynth-build-linux-x86_64.tar.gz | |
export PLUGIN_NAME=$(git show --name-only --pretty=format: | grep -m1 json | cut -d / -f 2 | cut -d . -f 1) | |
export PYTHONPATH=${{ github.workspace }}/workspace/lib/python3.10/site-packages | |
./vsp-build.py ${PLUGIN_NAME} | |
git tag $(cat ./output/TAG) | |
git push origin tag $(cat ./output/TAG) | |
cd output | |
export PLUGIN_FILE=$(find *.zip | grep -m1 zip) | |
gh release create \ | |
$(cat TAG) \ | |
--repo '${{ github.repository }}' \ | |
--title ${PLUGIN_FILE} \ | |
--notes "Automatic build of ${PLUGIN_NAME}" \ | |
--verify-tag | |
gh release upload \ | |
$(cat TAG) \ | |
${PLUGIN_FILE} \ | |
--repo '${{ github.repository }}' | |