Skip to content

Commit

Permalink
compiler release strings adjusted, 1st try vapoursynth build
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan-Olt committed Jul 11, 2024
1 parent b571785 commit 80ad574
Show file tree
Hide file tree
Showing 2 changed files with 127 additions and 5 deletions.
32 changes: 27 additions & 5 deletions .github/workflows/build-compiler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
packages: automake autoconf libtool libtool-bin build-essential help2man
version: 1.0

- name: Build
- name: Build compiler
run: |
cd ~
wget http://crosstool-ng.org/download/crosstool-ng/crosstool-ng-1.26.0.tar.bz2
Expand All @@ -34,6 +34,27 @@ jobs:
export PATH="${PATH}:${HOME}/ctng/bin"
cd ${{ github.workspace }}/crosstool-ng/linux-glibc-x86_64/
ct-ng build
chmod 755 ${HOME}/x-tools/x86_64-unknown-linux-gnu/bin
cd ${HOME}/x-tools/x86_64-unknown-linux-gnu/bin
ln -s x86_64-unknown-linux-gnu-gcc gcc
ln -s x86_64-unknown-linux-gnu-cc cc
ln -s x86_64-unknown-linux-gnu-g++ g++
ln -s x86_64-unknown-linux-gnu-c++ c++
ln -s x86_64-unknown-linux-gnu-c++filt c++filt
ln -s x86_64-unknown-linux-gnu-cpp cpp
ln -s x86_64-unknown-linux-gnu-ar ar
ln -s x86_64-unknown-linux-gnu-as as
ln -s x86_64-unknown-linux-gnu-gcc-ar gcc-ar
ln -s x86_64-unknown-linux-gnu-ld ld
ln -s x86_64-unknown-linux-gnu-ldd ldd
ln -s x86_64-unknown-linux-gnu-ld.bfd ld.bfd
ln -s x86_64-unknown-linux-gnu-nm nm
ln -s x86_64-unknown-linux-gnu-objcopy objcopy
ln -s x86_64-unknown-linux-gnu-objdump objdump
ln -s x86_64-unknown-linux-gnu-populate populate
ln -s x86_64-unknown-linux-gnu-ranlib ranlib
ln -s x86_64-unknown-linux-gnu-readelf readelf
ln -s x86_64-unknown-linux-gnu-strip strip
- name: Create binary archive
run: >-
Expand Down Expand Up @@ -68,18 +89,19 @@ jobs:
GITHUB_TOKEN: ${{ github.token }}
run: >-
gh release create
'${{ github.ref_name }}'
'compiler-${{ github.sha }}'
--repo '${{ github.repository }}'
--title '${{ github.ref_name }}'
--notes ""
--title 'crosstool-ng compiler build'
--notes "compiler to create binaries with high compatibility"
--latest=false
- name: Upload artifacts to GitHub Release
env:
GITHUB_TOKEN: ${{ github.token }}

run: |
gh release upload \
'${{ github.ref_name }}' \
'compiler-${{ github.sha }}' \
'crosstool-ng-compiler-linux-x86_64/${{ env.ARCHIVE_NAME }}' \
--repo '${{ github.repository }}'
100 changes: 100 additions & 0 deletions .github/workflows/build-vapoursynth.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: "Build vapoursynth"

on:
workflow_dispatch:

env:
ARCHIVE_NAME: vapoursynth-build.tar.gz

jobs:
build-linux:
name: Build Linux
runs-on: ubuntu-22.04

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 python3 python3-pip
version: 1.0

- name: Build vapoursynth
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 cython
mkdir workspace
wget -O zimg-release-3.0.5.tar.gz https://github.com/sekrit-twc/zimg/archive/refs/tags/release-3.0.5.tar.gz
tar xzf zimg-release-3.0.5.tar.gz
cd zimg-release-3.0.5
./autogen.sh
./configure --prefix="${HOME}/workspace"
make
make install
export PKG_CONFIG_PATH="${HOME}/workspace/lib/pkgconfig:$PKG_CONFIG_PATH"
export LD_LIBRARY_PATH="${HOME}/workspace/lib:$LD_LIBRARY_PATH"
wget -O vapoursynth-R69.tar.gz https://github.com/vapoursynth/vapoursynth/archive/refs/tags/R69.tar.gz
tar xzf vapoursynth-R69.tar.gz
cd vapoursynth-R69
./autogen.sh
./configure --prefix="${HOME}/workspace"
make
make install
- name: Create binary archive
run: >-
tar -cvzf ${{ env.ARCHIVE_NAME }}
--owner=root --group=root
-C ${HOME}
workspace
- name: Upload binary artifact
uses: actions/upload-artifact@v4
with:
name: vapoursynth-linux-glibc-x86_64
path: ${{ env.ARCHIVE_NAME }}
if-no-files-found: error

github-release:
name: Create GitHub release
runs-on: ubuntu-22.04

needs:
- build-linux

permissions:
contents: write # IMPORTANT: mandatory for making GitHub Releases

steps:
- name: Download artifacts
uses: actions/download-artifact@v4

- name: Create GitHub Release
env:
GITHUB_TOKEN: ${{ github.token }}
run: >-
gh release create
'vapoursynth-${{ github.sha }}'
--repo '${{ github.repository }}'
--title 'vapoursynth build'
--notes "vapoursynth build including zimg for compiling plugins (not intended for general use)"
--latest=false
- name: Upload artifacts to GitHub Release
env:
GITHUB_TOKEN: ${{ github.token }}

run: |
gh release upload \
'vapoursynth-${{ github.sha }}' \
'vapoursynth-linux-glibc-x86_64/${{ env.ARCHIVE_NAME }}' \
--repo '${{ github.repository }}'

0 comments on commit 80ad574

Please sign in to comment.