Files
UltraGrid/.github/workflows/linux.yml
Martin Pulec d13024feb6 CI: handle deprecation of actions/checkout@v4
use main branch instead

As for the other GH actions, use rather the main branch than a fixed
tag. The advantage is that we can avoid these technical commits because
the Node.js actions are gradually deprecated so that we'd need to update
every time it happens (although not often).

Although the actions example suggest using the fixed tags, this
doesn't seem to cause any problems while soe time used eg for
actions/cache. Otherwise, fixed tags may be returned at any time.
2026-03-11 11:22:58 +01:00

97 lines
3.9 KiB
YAML

# SPDX-License-Identifier: BSD-3-Clause
# Copyright (c) 2019-2026 CESNET, zájmové sdružení právnických osob
name: Linux build
on:
workflow_call:
workflow_dispatch:
push:
branches:
- linux-build
jobs:
Ubuntu:
name: run Ubuntu
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@main
- 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: Test AppImage with Docker images
run: |
.github/scripts/Linux/docker_appimage_tests.sh
- name: Validate AppImage images
run: |
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 == 'CESNET/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