Skip to content

Commit

Permalink
Merge pull request #110 from OKaluza/master
Browse files Browse the repository at this point in the history
Workflow fixes
  • Loading branch information
OKaluza authored Feb 5, 2025
2 parents 4f04be1 + b0c22e6 commit a725b07
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 107 deletions.
76 changes: 0 additions & 76 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# - Creates a release on matching tag push
# - builds latest minimal ffmpeg for wheels
# - builds new emscripten wasm
# - uploads release assets
# - updates lavavu.github.io repo
Expand All @@ -15,7 +14,6 @@ on:
jobs:
build:
runs-on: ubuntu-latest
needs: ffmpeg #Required to prevent the subsequent deploy jobs running until this job finishes
steps:
- uses: mymindstorm/setup-emsdk@v7

Expand Down Expand Up @@ -81,78 +79,4 @@ jobs:
git tag ${{ steps.get_version.outputs.VERSION }}
git push origin --tags
ffmpeg:
# https://trac.ffmpeg.org/wiki/CompilationGuide/Centos
runs-on: ubuntu-latest
container: quay.io/pypa/manylinux_2_28_x86_64
steps:
- name: Install deps
run: |
dnf install -y autoconf automake bzip2 bzip2-devel cmake freetype-devel gcc gcc-c++ git libtool make pkgconfig zlib-devel zip
- name: Build nasm
run: |
mkdir ~/ffmpeg_sources
cd ~/ffmpeg_sources
curl -O -L https://www.nasm.us/pub/nasm/releasebuilds/2.15.05/nasm-2.15.05.tar.bz2
tar xjf nasm-2.15.05.tar.bz2
cd nasm-2.15.05
./autogen.sh
./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin"
make -j$(nproc)
make install
- name: Build yasm
run: |
cd ~/ffmpeg_sources
curl -O -L https://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz
tar xzf yasm-1.3.0.tar.gz
cd yasm-1.3.0
./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin"
make -j$(nproc)
make install
- name: Build x264
run: |
cd ~/ffmpeg_sources
git clone --branch stable --depth 1 https://code.videolan.org/videolan/x264.git
cd x264
export PATH="$HOME/bin:$PATH"
PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" --enable-shared
make -j$(nproc)
make install
- name: Build ffmpeg
run: |
cd ~/ffmpeg_sources/
curl -O -L https://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2
tar xjf ffmpeg-snapshot.tar.bz2
cd ffmpeg
export PATH="$HOME/bin:$PATH"
PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure --prefix="$HOME/ffmpeg_build" --pkg-config-flags="--static" --extra-cflags="-I$HOME/ffmpeg_build/include -fPIC -m64" --extra-ldflags="-L$HOME/ffmpeg_build/lib" --extra-libs=-lpthread --extra-libs=-lm --bindir="$HOME/bin" --enable-gpl --enable-libfreetype --enable-libx264 --enable-nonfree --enable-shared --enable-pic --extra-ldexeflags=-pie
make -j$(nproc)
make install
- name: Zip
run: |
cd ~/ffmpeg_build/; rm -rf lib/*.a; zip --symlinks -r /ffmpeg-mini lib/* include/*
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ffmpeg-mini
path: /ffmpeg-mini.zip

ffmpeg-upload:
runs-on: ubuntu-latest
needs: [build, ffmpeg]
steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: ffmpeg-mini

- name: Upload ffmpeg build to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ffmpeg-mini.zip
asset_name: ffmpeg-mini.zip
tag: ${{ github.ref }}

36 changes: 36 additions & 0 deletions .github/workflows/test_wheels.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: WheelTest

on:
workflow_dispatch:
#push:

jobs:
test:
strategy:
matrix:
#os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest, macos-13, macos-14]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
runs-on: ${{ matrix.os }}
steps:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: actions/checkout@master
with:
repository: LavaVu/Testing
path: Testing
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install wheel
run: python -m pip install --only-binary=lavavu lavavu
- name: Run tests
env:
LV_CONTEXT: moderngl
LV_ECHO_FAIL: 1
LV_ARGS: -v
run: >
pip install moderngl &&
cd Testing &&
python runall.py
31 changes: 0 additions & 31 deletions .github/workflows/wheel_deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,34 +112,3 @@ jobs:
#with:
# repository-url: https://test.pypi.org/legacy/

test:
needs: [upload_pypi]
strategy:
matrix:
#os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest, macos-13, macos-14]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
runs-on: ${{ matrix.os }}
steps:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: actions/checkout@master
with:
repository: LavaVu/Testing
path: Testing
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install wheel
run: python -m pip install --only-binary=lavavu lavavu
- name: Run tests
run: >
pip install moderngl &&
git clone --depth 1 https://github.com/lavavu/Testing &&
cd Testing &&
export LV_CONTEXT=moderngl &&
export LV_ECHO_FAIL=1 &&
export LV_ARGS="-v" &&
python runall.py

0 comments on commit a725b07

Please sign in to comment.