Skip to content
Closed
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
101 changes: 0 additions & 101 deletions .github/workflows/arm-build.yml

This file was deleted.

54 changes: 54 additions & 0 deletions .github/workflows/auto-rebase-and-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Auto Rebase and Build
on:
schedule:
- cron: '0 6 * * *' # 6 AM daily
workflow_dispatch:

jobs:
rebase-and-build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}

- name: Rebase on upstream
id: rebase
run: |
git config user.name "Auto Rebase Bot"
git config user.email "noreply@github.com"
git remote add upstream https://github.com/CESNET/UltraGrid.git
git fetch upstream

BEHIND=$(git rev-list --count HEAD..upstream/master)
if [ "$BEHIND" -eq 0 ]; then
echo "rebase_needed=false" >> $GITHUB_OUTPUT
exit 0
fi

# Create backup and rebase
git checkout -b backup-$(date +%Y%m%d)
git push origin backup-$(date +%Y%m%d)
git checkout master

if git rebase upstream/master; then
git push --force-with-lease origin master
echo "rebase_needed=true" >> $GITHUB_OUTPUT
echo "rebase_success=true" >> $GITHUB_OUTPUT
else
git rebase --abort
echo "rebase_needed=true" >> $GITHUB_OUTPUT
echo "rebase_success=false" >> $GITHUB_OUTPUT
exit 1
fi

- name: Trigger AppImage build
if: steps.rebase.outputs.rebase_success == 'true'
run: |
curl -X POST \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
"${{ github.api_url }}/repos/${{ github.repository }}/actions/workflows/build--patched-appimage.yml/dispatches" \
-d '{"ref":"master"}'
133 changes: 133 additions & 0 deletions .github/workflows/build-patched-appimage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
name: C/C++ CI

# This is cut down from the UG ccpp.yml file, as we don't need to run builds for anything other than Linux.

on:
pull_request:
push:
branches:
- master
tags:
- v[0-9]+.*
paths:
- '.github/scripts/**'
- '.github/workflows/ccpp.yml'
- '**.c'
- '**.cpp'
- '**.cu'
- '**.h'
- '**.hpp'
- '**.m'
- '**.mm'
- 'autogen.sh'
- 'configure.ac'
- 'data/**'
- 'Makefile.in'
workflow_dispatch:

jobs:
prepare:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
id: checkout
with:
persist-credentials: true
- name: Init environment variables
run: . .github/scripts/environment.sh
- name: Retag continuous
if: github.repository == 'armelvil/UltraGrid' && github.ref == 'refs/heads/master'
run: |
git fetch --prune --unshallow --tags
git tag -f $TAG
git push -f origin refs/tags/$TAG:refs/tags/$TAG
- name: Create continuous release # ensure continuous release is present for AppImage zsync
if: startsWith(github.ref, 'refs/tags/')
run: .github/scripts/create_continuous_release.sh

Ubuntu:
name: run Ubuntu
needs: prepare
runs-on: ubuntu-22.04
env:
appimage_key: ${{ secrets.appimage_key }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SDK_URL: ${{ secrets.SDK_URL }}

steps:
- uses: actions/checkout@v4
- name: Fetch SDKs ETags
id: etags
run: |
$GITHUB_WORKSPACE/.github/scripts/get-etag.sh ndi\
https://downloads.ndi.tv/SDK/NDI_SDK_Linux/\
Install_NDI_SDK_v6_Linux.tar.gz >> $GITHUB_OUTPUT
- name: Run actions/cache for NDI
id: cache-ndi
uses: actions/cache@main
with:
path: /var/tmp/Install_NDI_SDK_Linux.tar.gz
key: cache-ndi-${{ runner.os }}-${{ steps.etags.outputs.ndi }}
- name: Download NDI
if: steps.cache-ndi.outputs.cache-hit != 'true'
run: "curl -Lf https://downloads.ndi.tv/SDK/NDI_SDK_Linux/\
Install_NDI_SDK_v6_Linux.tar.gz -o /var/tmp/Install_NDI_SDK_Linux.tar.gz"
- name: Cache FFmpeg
uses: actions/cache@main
with:
path: '/var/tmp/ffmpeg'
key: cache-ffmpeg-${{ runner.os }}-${{ hashFiles( '.github/scripts/Linux/install_ffmpeg.sh', '.github/scripts/Linux/install_other.sh', '.github/scripts/Linux/ffmpeg-patches/*') }}
- name: Cache SDL
uses: actions/cache@main
with:
path: '/var/tmp/sdl'
key: cache-sdl-${{ runner.os }}-${{ hashFiles( '.github/scripts/Linux/install_sdl.sh' ) }}
- name: Cache GLFW
uses: actions/cache@main
with:
path: '/var/tmp/glfw'
key: cache-glfw-${{ runner.os }}-${{ hashFiles( '.github/scripts/Linux/install_glfw.sh' ) }}
- name: bootstrap
run: |
. .github/scripts/environment.sh
.github/scripts/Linux/prepare.sh
- name: configure
run: "./autogen.sh $FEATURES || { RC=$?; cat config.log; exit $RC; }"
- name: make
run: make -j4
- name: make check
run: make check
- name: make distcheck
run: make distcheck
- name: check libc/libstdc++ ABI
run: .github/scripts/Linux/check_abi.sh 2.35 3.4.30 1.3.13 bin/* lib/ultragrid/*
- name: Create AppImage
run: data/scripts/Linux-AppImage/create-appimage.sh https://github.com/$GITHUB_REPOSITORY/releases/download/continuous/UltraGrid-$CHANNEL-x86_64.AppImage.zsync
- name: Check AppImage
run: |
.github/scripts/Linux/docker_appimage_tests.sh
curl -LSf -O https://raw.githubusercontent.com/AppImage/pkg2appimage/\
master/appdir-lint.sh -O https://raw.githubusercontent.com/probonopd/\
AppImages/master/excludelist
sudo apt install desktop-file-utils libfile-mimeinfo-perl # desktop-file-validate, mimetype
bash appdir-lint.sh squashfs-root
- name: Compute checksum
run: sha256sum UltraGrid-$VERSION-x86_64.AppImage
- name: Upload Release Asset
id: upload-release
if: (github.repository == 'armelvil/UltraGrid' && github.ref == 'refs/heads/master') || startsWith(github.ref, 'refs/tags/')
run: |
sudo apt install jq zsync
zsyncmake -C -u https://github.com/$GITHUB_REPOSITORY/releases/download/$TAG/UltraGrid-$VERSION-x86_64.AppImage -o UltraGrid-$CHANNEL-x86_64.AppImage.zsync UltraGrid-$VERSION-x86_64.AppImage
.github/scripts/replace-asset.sh continuous UltraGrid-$CHANNEL-x86_64.AppImage.zsync application/x-zsync AppImage%20${CHANNEL}%20zsync
.github/scripts/replace-asset.sh $TAG UltraGrid-$VERSION-x86_64.AppImage application/x-appimage Linux%20build
- name: Upload Build
if: steps.upload-release.conclusion == 'skipped'
uses: actions/upload-artifact@main
with:
name: UltraGrid-Linux
path: UltraGrid-${{ env.VERSION }}-x86_64.AppImage

# vi: set expandtab sw=2:
Loading