Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 19 additions & 13 deletions .github/workflows/build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ on:
# pull_request:
# branches: [ "main" ]
workflow_dispatch:
inputs:
python-version:
required: false
type: string
default: '3.11'
inputs:
compiler:
required: false
type: string
default: latest

workflow_call:
inputs:
python-version:
compiler:
required: true
type: string

Expand All @@ -38,15 +38,21 @@ jobs:
# with:
# name: 3rd_64

- name: Set up Python ${{ inputs.python-version }}

uses: actions/setup-python@v4
- name: Install compiler ${{ inputs.compiler }}
id: install_cc
uses: rlalik/setup-cpp-compiler@master
with:
python-version: ${{ inputs.python-version }}
compiler: ${{ inputs.compiler }}

# - name: Set up compiler ${{ inputs.compiler }}

# uses: actions/setup-python@v4
# with:
# python-version: ${{ inputs.python-version }}

- name: Install python dependencies
run: |
python -m pip install --upgrade pip
# - name: Install python dependencies
# run: |
# python -m pip install --upgrade pip


- name: Build on Linux
Expand Down
34 changes: 21 additions & 13 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ on:
# pull_request:
# branches: [ "main" ]
workflow_dispatch:
inputs:
python-version:
required: false
type: string
default: '3.11'
inputs:
compiler:
required: false
type: string
default: clang

workflow_call:
inputs:
python-version:
compiler:
required: true
type: string

Expand All @@ -24,16 +24,24 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ inputs.python-version }}

uses: actions/setup-python@v4


- name: Install compiler ${{ inputs.compiler }}
id: install_cc
uses: rlalik/setup-cpp-compiler@master
with:
python-version: ${{ inputs.python-version }}
compiler: ${{ inputs.compiler }}

# - name: Set up Python ${{ inputs.python-version }}

# uses: actions/setup-python@v4
# with:
# python-version: ${{ inputs.python-version }}


- name: Install python dependencies
run: |
python -m pip install --upgrade pip
# - name: Install python dependencies
# run: |
# python -m pip install --upgrade pip

- name: Build on Windows
run: ./build.bat
Expand Down
175 changes: 4 additions & 171 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,30 +17,24 @@ jobs:
needs: build-ffmpeg
strategy:
matrix:
# python-version: ["py37", "py38", "py39", "py310", "py311"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
# python-version: ["3.9"]
compiler: [ latest, gcc-latest, gcc-9, gcc-10, g++-11, clang, clang-10, clang-11, clang++-12 ]
uses: ./.github/workflows/build-linux.yml
with:
python-version: ${{ matrix.python-version }}
compiler: ${{ matrix.compiler }}


build-windows:
strategy:
matrix:
# python-version: ["py37", "py38", "py39", "py310", "py311"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
# python-version: ["3.9"]
compiler: [ latest, gcc-latest, gcc-6.4.0, gcc-10.2.0, g++-11.2.0, clang, clang-8.0.0, clang-11.1.0, clang++-12.0.1 ]
uses: ./.github/workflows/build-windows.yml
with:
python-version: ${{ matrix.python-version }}
compiler: ${{ matrix.compiler }}

tests-linux:
strategy:
matrix:
# python-version: ["py37", "py38", "py39", "py310", "py311"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
# python-version: ["3.9"]
needs: build-linux
uses: ./.github/workflows/test.yml
with:
Expand All @@ -50,170 +44,9 @@ jobs:
tests-windows:
strategy:
matrix:
# python-version: ["py37", "py38", "py39", "py310", "py311"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
# python-version: ["3.9"]
needs: build-windows
uses: ./.github/workflows/test.yml
with:
python-version: ${{ matrix.python-version }}
os: windows-latest

# name: build

# on:
# push:
# branches: [ "main" ]
# pull_request:
# branches: [ "main" ]
# workflow_dispatch:

# env:
# # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
# BUILD_TYPE: Release

# jobs:

# build-ffmpeg:
# runs-on: ubuntu-latest

# steps:
# - uses: actions/checkout@v3

# - name: Cache Dependencies
# id: cache-dependencies
# uses: actions/cache@v3
# with:
# path: 3rd_64
# key: ${{ github.ref }}-3rd_64

# - if: ${{ (steps.cache-dependencies.outputs.cache-hit != 'true') }}
# run: ./configure_ffmpeg

# build-linux:
# # The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
# # You can convert this to a matrix build if you need cross-platform coverage.
# # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
# runs-on: ubuntu-latest
# needs: build-ffmpeg

# strategy:
# matrix:
# # python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
# # os: [ubuntu-latest, windows-latest]
# python-version: ["3.9"]
# steps:
# - uses: actions/checkout@v3
# - name: Set up Python ${{ matrix.python-version }}

# uses: actions/setup-python@v4
# with:
# python-version: ${{ matrix.python-version }}

# - name: Install python dependencies
# run: |
# python -m pip install --upgrade pip



# - name: Cache Dependencies
# id: cache-dependencies
# uses: actions/cache@v3
# with:
# path: 3rd_64
# key: ${{ github.ref }}-3rd_64



# - name: Build Linux
# run: ./build.sh


# build-windows:
# # The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
# # You can convert this to a matrix build if you need cross-platform coverage.
# # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
# runs-on: windows-latest

# strategy:
# matrix:
# # python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
# # os: [ubuntu-latest, windows-latest]
# python-version: ["3.9"]
# steps:
# - uses: actions/checkout@v3

# # - name: Cache Build
# # id: cache-build
# # uses: actions/cache@v3
# # with:
# # path: build
# # key: ${{ github.ref }}-build

# - name: Set up Python ${{ matrix.python-version }}

# uses: actions/setup-python@v4
# with:
# python-version: ${{ matrix.python-version }}

# - name: Install python dependencies
# run: |
# python -m pip install --upgrade pip

# - name: Build MSVC
# run: ./build.bat

# - name: Upload artifact
# uses: actions/upload-artifact@v3
# with:
# name: install-librir
# path: build/install


# test:
# runs-on: ${{ matrix.os }}
# needs: [build-linux, build-windows]

# strategy:
# matrix:
# # python-version: ["py37", "py38", "py39", "py310", "py311"]
# python-version: ["3.9"]
# os: [ubuntu-latest, windows-latest]


# steps:
# - uses: actions/checkout@v3
# - uses: actions/download-artifact@v3
# with:
# name: install-librir
# path: build/install

# - name: Set up Python ${{ matrix.python-version }}

# uses: actions/setup-python@v4
# with:
# python-version: ${{ matrix.python-version }}

# - name: Install python dependencies
# run: |
# python -m pip install --upgrade pip
# pip install ruff pytest pytest-cov
# pip install -e build/install

# - name: Test with pytest
# continue-on-error: true
# run: |
# pytest --junitxml=pytest.xml --cov-report=term-missing:skip-covered --cov=librir tests/python -m "not thermavip" | tee pytest-coverage.txt

# - name: Pytest coverage comment
# uses: MishaKav/pytest-coverage-comment@main
# with:
# pytest-coverage-path: ./pytest-coverage.txt
# junitxml-path: ./pytest.xml

# - name: Lint with ruff
# run: |
# # stop the build if there are Python syntax errors or undefined names
# ruff --format=github --select=E9,F63,F7,F82 --target-version=${{ matrix.python-version }} .
# # default set of ruff rules with GitHub Annotations
# ruff --format=github --target-version=${{ matrix.python-version }} .
6 changes: 3 additions & 3 deletions 3rd_64/build-gcc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ else
sed -i '/AM_PROG_AR/c\m4_ifdef([AM_PROG_AR], [AM_PROG_AR])' ./configure.ac
./autogen.sh
./configure --enable-static=yes --enable-shared=no --prefix=$PWD/install CFLAGS="-fPIC" #--extra-ldflags="-Wl,-rpath='$ORIGIN'"
make -j4
make -j
make install

# Add -lm -lpthread to kvazaar libs
Expand Down Expand Up @@ -208,7 +208,7 @@ else
echo 'Configuring x264...'
#sed -i 's/asm=\"auto\"/asm=\"nasm\"/' configure
./configure --enable-static --enable-pic --prefix=$PWD/install --enable-strip #--enable-rpath --extra-ldflags="-Wl,-rpath='$ORIGIN'"
make -j4
make -j
make install
# libx264 already produces a valid pc file
cd ..
Expand Down Expand Up @@ -255,7 +255,7 @@ if [ -d $FILE ]; then
else
echo 'Building ffmpeg...'
#make clean
make -j4
make -j
make install
fi
cd ..
Expand Down
10 changes: 5 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,14 @@ add_subdirectory(plugins)
# enable_testing()
# TOREMOVE

find_package(Python COMPONENTS Interpreter)
IF(NOT Python_FOUND)
# find_package(Python COMPONENTS Interpreter)
# IF(NOT Python_FOUND)

MESSAGE(STATUS "PYTHON NOT FOUND")
# MESSAGE(STATUS "PYTHON NOT FOUND")

endif()
# endif()

MESSAGE(STATUS "found python")
# MESSAGE(STATUS "found python")


# Perform this action once more (already done in src/CMakeLists.txt) to copy plugins binaries
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ chmod 777 configure_ffmpeg
mkdir -p build
cd build
$CMAKE ./.. -G "Unix Makefiles" $CMAKE_OPTIONS
make
make -j
make install

# Build wheel if necessary
Expand Down
3 changes: 3 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ add_subdirectory(geometry)
add_subdirectory(signal_processing)
add_subdirectory(video_io)

# some dependency to prevent from making librir before building ffmpeg
add_dependencies(video_io dummy)

install(TARGETS ${TARGETS} PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
install (TARGETS ${TARGETS} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} )
install (TARGETS ${TARGETS} LIBRARY DESTINATION ${CMAKE_INSTALL_BINDIR} )
Expand Down