Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New iOS backend, build system and desktop updates. #77

Merged
merged 28 commits into from
Aug 31, 2023
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
dfd35ae
Update dependencies, build config for Java 17 and AGP 7.4
dasisdormax Aug 3, 2023
7917f8a
switch to dependency versions from current libGDX, update FFmpeg
dasisdormax Aug 3, 2023
35d512f
Simplify gradle config, begin transition to FFmpeg 5.1.3
dasisdormax Aug 4, 2023
09100d2
Add cross-toolchain detection to jnigen config
dasisdormax Aug 4, 2023
9ebbc4f
restore previous jnigen section, make VideoDecoder build with FFmpeg …
dasisdormax Aug 6, 2023
d09b361
fix desktop decoding for FFmpeg 5
dasisdormax Aug 7, 2023
62f3f57
add initial ios playback class that can load video metadata
dasisdormax Aug 10, 2023
dc0c3b9
Implement iOS video playback
dasisdormax Aug 11, 2023
cdaf760
iOS: Handle cases where texture size is larger than video size
dasisdormax Aug 13, 2023
893ad86
Desktop: Handle cases where texture size is larger than video size
dasisdormax Aug 13, 2023
80eac37
Desktop: Initialize function pointers to NULL
dasisdormax Aug 13, 2023
138b3b3
Update README, support immediate pausing on desktop
dasisdormax Aug 14, 2023
acbc013
Android: Support pausing the video immediately before it started
dasisdormax Aug 15, 2023
adebc52
Fix build for desktop and test projects, update github workflow
dasisdormax Aug 18, 2023
e084ffb
Fix compiler detection, include FFmpeg hotfix, update gh action
dasisdormax Aug 21, 2023
e1e9a2f
Update gradle publishing configuration
dasisdormax Aug 21, 2023
237722b
Fix HTML test gretty configuration
dasisdormax Aug 21, 2023
bb80340
Add robovm implementation to iOS test, restore mp4 video
dasisdormax Aug 21, 2023
7309a98
Add VideoActor, update README
dasisdormax Aug 22, 2023
f3fd4ba
Implement looping on desktop, some general clean-up
dasisdormax Aug 24, 2023
f1eefc9
Implement looping on iOS, update desktop audio initialization
dasisdormax Aug 24, 2023
bf6184e
Update pause/resume handling on Web and Android
dasisdormax Aug 24, 2023
c72138d
Desktop: Fix lock and thread handling
dasisdormax Aug 25, 2023
6940f0d
Disable cross-compile on windows, set linear texture filtering
dasisdormax Aug 25, 2023
daecfe1
Documentation and formatting updates, remove unused FFmpeg init
dasisdormax Aug 26, 2023
fa251aa
Update minSdk after emulator testing
dasisdormax Aug 26, 2023
8a27b47
Use GDX debug logging on iOS
dasisdormax Aug 28, 2023
4b7f515
Revert setting texture filter on VideoActor
dasisdormax Aug 31, 2023
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
195 changes: 116 additions & 79 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,109 +5,146 @@ on:
branches: [ master ]

jobs:
macos:
natives-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: 'recursive'
- name: Gradle cache
uses: actions/cache@v2

- name: Set up JDK 11
uses: actions/setup-java@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Natives cache
uses: actions/cache@v2
distribution: 'zulu'
java-version: '11'

- name: Setup Gradle
uses: gradle/gradle-build-action@v2

- name: Install additional build dependencies
run: brew install nasm

- name: Build with Gradle
run: ./gradlew :gdx-video-desktop:buildFFmpegMacosAll :gdx-video-desktop:jnigenBuildMacosAll

- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
path: ~/.ccache
key: ${{ runner.os }}-ccache-${{ github.sha }}
restore-keys: |
${{ runner.os }}-ccache
- name: Set up JDK 1.8
uses: actions/setup-java@v1
name: desktop-natives
path: gdx-video-desktop/libs/**/*.dylib
if-no-files-found: error

natives-linux:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
java-version: 1.8
fetch-depth: 0
submodules: 'recursive'

- run: brew install yasm ccache
- name: Setup ccache
run: echo "/usr/local/opt/ccache/libexec" >> $GITHUB_PATH
- name: Build with Gradle
run: ./gradlew buildFFmpegMacos64 jnigen jnigenBuild
- name: Upload macOS natives
uses: actions/[email protected]
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
name: macos-natives
path: gdx-video-desktop/libs
distribution: 'zulu'
java-version: '11'

- name: Setup Gradle
uses: gradle/gradle-build-action@v2

- name: Install build dependencies and cross-compilation toolchains
run: |
sudo apt update
sudo apt install -y --force-yes gcc g++
sudo apt install -y --force-yes nasm
sudo apt install -y --force-yes gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libc6-dev-arm64-cross
sudo apt install -y --force-yes gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf libc6-dev-armhf-cross

- name: Build natives with Gradle
run: ./gradlew :gdx-video-desktop:buildFFmpegLinuxAll :gdx-video-desktop:jnigenBuildLinuxAll

- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: desktop-natives
path: gdx-video-desktop/libs/**/*.so
if-no-files-found: error

natives-windows:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: 'recursive'

- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'

- name: Setup Gradle
uses: gradle/gradle-build-action@v2

- name: Install build dependencies and cross-compilation toolchains
run: |
sudo apt update
sudo apt install -y --force-yes nasm
sudo apt install -y --force-yes mingw-w64 lib32z1

- name: Build natives with Gradle
run: ./gradlew :gdx-video-desktop:buildFFmpegWindowsAll :gdx-video-desktop:jnigenBuildWindowsAll

- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: desktop-natives
path: gdx-video-desktop/libs/**/*.dll
if-no-files-found: error

linux:
needs: macos
runs-on: ubuntu-18.04
gradle-build:
needs:
- natives-macos
- natives-linux
- natives-windows
runs-on: ubuntu-20.04
env:
ORG_GRADLE_PROJECT_GITHUB_USERNAME: ""
ORG_GRADLE_PROJECT_GITHUB_API_TOKEN: ""
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: 'recursive'
- name: Gradle cache
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Natives cache
uses: actions/cache@v2
with:
path: ~/.ccache
key: ${{ runner.os }}-ccache-${{ github.sha }}
restore-keys: |
${{ runner.os }}-ccache
- name: Set up JDK 1.8
uses: actions/setup-java@v1

- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: 1.8

- run: sudo sed -i 's/deb http/deb [arch=amd64,i386] http/' /etc/apt/sources.list
- run: sudo grep "ubuntu.com/ubuntu" /etc/apt/sources.list | sudo tee /etc/apt/sources.list.d/ports.list
- run: sudo sed -i 's/amd64,i386/armhf,arm64/' /etc/apt/sources.list.d/ports.list
- run: sudo sed -i 's#http://.*/ubuntu#http://ports.ubuntu.com/ubuntu-ports#' /etc/apt/sources.list.d/ports.list
- name: Add extra platform architectures
run: sudo dpkg --add-architecture i386; sudo dpkg --add-architecture armhf; sudo dpkg --add-architecture arm64
- run: sudo apt-get update || true
- name: Install Windows compilers
run: sudo apt-get -yq install g++-mingw-w64-i686 g++-mingw-w64-x86-64
- name: Install Linux x86 compilers/libraries
run: sudo apt-get -yq install gcc-multilib g++-multilib linux-libc-dev:i386 libstdc++-5-dev:i386 ccache
- name: Install Linux arm32 compilers/libraries
run: sudo apt-get -yq install gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf binutils-arm-linux-gnueabihf
- name: Install Linux arm64 compilers/libraries
run: sudo apt-get -yq install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu binutils-aarch64-linux-gnu
- name: Install yasm for ffmpeg
run: sudo apt-get -yq install yasm
- name: Setup ccache
run: echo "/usr/lib/ccache" >> $GITHUB_PATH
- name: Download macOS natives
uses: actions/[email protected]
distribution: 'zulu'
java-version: '11'

- name: Setup Gradle
uses: gradle/gradle-build-action@v2

- name: Download desktop-natives artifact
uses: actions/download-artifact@v3
with:
name: macos-natives
name: desktop-natives
path: gdx-video-desktop/libs

- name: Build natives with Gradle
run: ./gradlew buildFFmpeg jnigen jnigenBuild jnigenJarNativesDesktop --info
- name: Create JAR with natives for desktop
run: ./gradlew jnigenJarNativesDesktop --info

- name: Create debug keystore for android
run: keytool -genkey -v -keystore $HOME/.android/debug.keystore -storetype PKCS12 -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000 -noprompt -dname "CN=GdxVideo, OU=libGDX, O=libGDX, L=Unknown, ST=Unknown, C=US"
- name: Build whole project with gradle

- name: Build library and test programs with gradle
run: ./gradlew build

- name: Upload all output libs
if: ${{ always() }}
uses: actions/upload-artifact@v2.1.4
uses: actions/upload-artifact@v3
with:
name: output-libs
path: '**/build/libs/'
path: '**/build/libs/'
Loading