mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-03-22 03:40:30 +00:00
Use version v10.0.2a. + do not build Cineform tools - not needed and current Cineform master (not this one checked) fails to compile the tools in MSW
214 lines
7.6 KiB
YAML
214 lines
7.6 KiB
YAML
name: C/C++ CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- devel
|
|
- master
|
|
paths:
|
|
- '.github/scripts/**'
|
|
- '.github/workflows/ccpp.yml'
|
|
- '**.c'
|
|
- '**.cpp'
|
|
- '**.cu'
|
|
- '**.h'
|
|
- '**.hpp'
|
|
- '**.m'
|
|
- '**.mm'
|
|
- 'autogen.sh'
|
|
- 'cineform-sdk'
|
|
- 'configure.ac'
|
|
- 'data/scripts/**'
|
|
- 'gpujpeg'
|
|
- 'Makefile.in'
|
|
|
|
jobs:
|
|
retag-continuous:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, we do not need to create own token.
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
if: github.repository == 'CESNET/UltraGrid' && github.ref == 'refs/heads/master'
|
|
with:
|
|
persist-credentials: true
|
|
- name: Retag continuous
|
|
if: github.repository == 'CESNET/UltraGrid' && github.ref == 'refs/heads/master'
|
|
run: |
|
|
git tag -f continuous
|
|
git push -f origin refs/tags/continuous:refs/tags/continuous
|
|
- name: Update Release
|
|
if: github.repository == 'CESNET/UltraGrid' && github.ref == 'refs/heads/master'
|
|
run: |
|
|
sudo apt install jq
|
|
URL=$(curl -H "Authorization: token $GITHUB_TOKEN" -X GET https://api.github.com/repos/$GITHUB_REPOSITORY/releases/tags/continuous | jq -r '.url')
|
|
REQ=PATCH
|
|
if [ $URL = null ]; then # release doesn't yet exist
|
|
REQ=POST
|
|
URL=https://api.github.com/repos/$GITHUB_REPOSITORY/releases
|
|
fi
|
|
curl -H "Authorization: token $GITHUB_TOKEN" -X $REQ $URL -T - <<'EOF'
|
|
{
|
|
"tag_name": "continuous", "name": "continuous builds",
|
|
"body": "Current builds from GIT master branch. Here are [archived builds](https://frakira.fi.muni.cz/~xpulec/ug-nightly-archive/).",
|
|
"draft": false, "prerelease": true
|
|
}
|
|
EOF
|
|
|
|
Ubuntu:
|
|
name: run Ubuntu
|
|
needs: retag-continuous
|
|
runs-on: ubuntu-16.04
|
|
env:
|
|
appimage_key: ${{ secrets.appimage_key }}
|
|
sdk_pass: ${{ secrets.sdk_pass }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
with:
|
|
submodules: true
|
|
- name: bootstrap
|
|
run: .github/scripts/Linux/prepare.sh
|
|
- name: configure
|
|
run: ./autogen.sh --enable-qt --with-cuda-host-compiler=$CUDA_HOST_COMPILER --enable-plugins --with-live555=/usr/local --disable-ndi
|
|
- name: make
|
|
run: make -j4
|
|
- name: make check
|
|
run: make check
|
|
- name: make distcheck
|
|
run: make distcheck
|
|
- name: Create AppImage
|
|
run: APPIMAGE=`data/scripts/Linux-AppImage/create-appimage.sh` && mv $APPIMAGE UltraGrid-continuous-x86_64.AppImage
|
|
- name: Upload Build
|
|
if: github.repository != 'CESNET/UltraGrid' || github.ref != 'refs/heads/master'
|
|
uses: actions/upload-artifact@v1
|
|
with:
|
|
name: UltraGrid CI Linux build
|
|
path: UltraGrid-continuous-x86_64.AppImage
|
|
- name: Upload Release Asset
|
|
if: github.repository == 'CESNET/UltraGrid' && github.ref == 'refs/heads/master'
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: |
|
|
sudo apt install jq zsync
|
|
zsyncmake -C UltraGrid-continuous-x86_64.AppImage
|
|
.github/scripts/replace-asset.sh continuous UltraGrid-continuous-x86_64.AppImage.zsync application/x-zsync AppImage%20zsync
|
|
.github/scripts/replace-asset.sh continuous UltraGrid-continuous-x86_64.AppImage application/x-appimage Linux%20build
|
|
|
|
macOS:
|
|
name: run macOS
|
|
needs: retag-continuous
|
|
runs-on: macos-latest
|
|
env:
|
|
altool_pass: ${{ secrets.altool_pass }}
|
|
apple_key_p12_b64: ${{ secrets.apple_key_p12_b64 }}
|
|
sdk_pass: ${{ secrets.sdk_pass }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
with:
|
|
submodules: true
|
|
- name: bootstrap
|
|
run: .github/scripts/macOS/prepare.sh
|
|
- name: configure
|
|
run: ARCH=-msse4.2 ./autogen.sh --enable-qt --with-live555=/usr/local
|
|
- name: make bundle
|
|
run: make -j4 gui-bundle
|
|
- name: sign+notarize
|
|
run: .github/scripts/macOS/sign.sh gui/QT/uv-qt.app
|
|
- name: make dmg
|
|
run: |
|
|
make osx-gui-dmg
|
|
mv UltraGrid.dmg UltraGrid-continuous.dmg
|
|
- name: make check
|
|
run: make check
|
|
- name: make distcheck
|
|
run: |
|
|
for n in lib opt; do sudo mv /usr/local/$n /usr/local/$n-; done # hide local libs
|
|
make distcheck TARGET=gui/QT/uv-qt.app/Contents/MacOS/uv GUI_EXE=gui/QT/uv-qt.app/Contents/MacOS/uv-qt
|
|
for n in lib opt; do sudo mv /usr/local/$n- /usr/local/$n; done # return back
|
|
- name: Upload Build
|
|
if: github.repository != 'CESNET/UltraGrid' || github.ref != 'refs/heads/master'
|
|
uses: actions/upload-artifact@v1
|
|
with:
|
|
name: UltraGrid CI macOS build
|
|
path: UltraGrid-continuous.dmg
|
|
- name: Upload Release Asset
|
|
if: github.repository == 'CESNET/UltraGrid' && github.ref == 'refs/heads/master'
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: |
|
|
brew install jq
|
|
.github/scripts/replace-asset.sh continuous UltraGrid-continuous.dmg application/x-apple-diskimage macOS%20build
|
|
|
|
Windows:
|
|
name: run Windows
|
|
needs: retag-continuous
|
|
runs-on: windows-latest
|
|
env:
|
|
MSYS2_PATH_TYPE: inherit
|
|
sdk_pass: ${{ secrets.sdk_pass }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
with:
|
|
submodules: true
|
|
- name: Find MSVC
|
|
run: .github/scripts/Windows/find_msvc.ps1
|
|
- name: bootsrap
|
|
run: .github/scripts/Windows/prepare.ps1
|
|
- name: Cache JACK
|
|
id: cache-jack
|
|
uses: actions/cache@v1
|
|
with:
|
|
path: 'C:\Program Files (x86)\Jack'
|
|
key: cache-jack-2
|
|
- name: Install JACK
|
|
if: steps.cache-jack.outputs.cache-hit != 'true'
|
|
run: .github/scripts/Windows/install_jack.ps1
|
|
- name: Cache MSYS2
|
|
id: cache-msys2
|
|
uses: actions/cache@v1
|
|
with:
|
|
path: C:\msys64
|
|
key: cache-msys2-7
|
|
- name: bootsrap MSYS2
|
|
if: steps.cache-msys2.outputs.cache-hit != 'true'
|
|
run: |
|
|
choco install --no-progress msys2 --params "/NoUpdate /InstallDir:C:\msys64"
|
|
C:\msys64\usr\bin\bash -cel '$GITHUB_WORKSPACE/.github/scripts/Windows/prepare_msys.sh'
|
|
- name: configure
|
|
run: C:\msys64\usr\bin\bash -cel "./autogen.sh --enable-qt --disable-ndi --with-live555=/usr/local"
|
|
- name: make
|
|
run: C:\msys64\usr\bin\bash -cel "make -j4"
|
|
- name: make check
|
|
run: C:\msys64\usr\bin\bash -cel "make check"
|
|
- name: add DLL depends
|
|
run: |
|
|
C:\msys64\usr\bin\bash -cel '
|
|
cp gui/QT/uv-qt.exe bin
|
|
rm bin/run_tests.exe
|
|
IFS=\"|\"; for exe in bin/*exe; do for n in `data/scripts/get_dll_depends.sh \"$exe\" | tr \"\n\" \"|\"`; do cp \"$n\" bin; done; done
|
|
windeployqt bin/uv-qt.exe
|
|
cp data/update.ps1 bin
|
|
mkdir build
|
|
mv bin build/UltraGrid-continuous-win64'
|
|
- name: make dist-check
|
|
run: C:\msys64\usr\bin\bash -cel 'PATH=
|
|
/usr/bin/make distcheck TARGET=build/UltraGrid-continuous-win64/uv.exe GUI_EXE=build/UltraGrid-continuous-win64/uv-qt.exe'
|
|
- name: Upload Build
|
|
if: github.repository != 'CESNET/UltraGrid' || github.ref != 'refs/heads/master'
|
|
uses: actions/upload-artifact@v1
|
|
with:
|
|
name: UltraGrid CI Windows build
|
|
path: build
|
|
- name: Upload Release Asset
|
|
if: github.repository == 'CESNET/UltraGrid' && github.ref == 'refs/heads/master'
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: |
|
|
C:\msys64\usr\bin\bash -cel 'cd build; zip -9 -r UltraGrid-continuous-win64.zip UltraGrid-continuous-win64
|
|
$GITHUB_WORKSPACE/.github/scripts/replace-asset.sh continuous UltraGrid-continuous-win64.zip application/zip Windows%20build'
|
|
|
|
# vi: set expandtab sw=2:
|