Skip to content

Commit 08ee1e7

Browse files
committed
Merge remote-tracking branch 'origin/master' into nxtedition
2 parents 2d3b884 + 8f66490 commit 08ee1e7

File tree

130 files changed

+2233
-1201
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

130 files changed

+2233
-1201
lines changed

.github/workflows/linux-system.yml

Lines changed: 80 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -11,41 +11,98 @@ jobs:
1111
strategy:
1212
fail-fast: false
1313
matrix:
14-
os:
15-
- ubuntu-22.04
16-
- ubuntu-24.04
14+
include:
15+
- os: ubuntu-22.04
16+
distribution: jammy
17+
- os: ubuntu-24.04
18+
distribution: noble
1719

1820
runs-on: ${{ matrix.os }}
1921

2022
steps:
2123
- uses: actions/checkout@v4
2224

2325
- name: Setup environment
26+
id: setup-env
2427
run: |
25-
sudo apt-get update
26-
sudo ./tools/linux/install-dependencies
27-
28-
sudo apt-get -y install software-properties-common
29-
sudo add-apt-repository ppa:casparcg/ppa
30-
31-
sudo apt-get -y install libboost-all-dev \
32-
libavcodec-dev \
33-
libavformat-dev \
34-
libavdevice-dev \
35-
libavutil-dev \
36-
libavfilter-dev \
37-
libswscale-dev \
38-
libpostproc-dev \
39-
libswresample-dev \
40-
casparcg-cef-117-dev
28+
ln -s tools/linux/deb/ubuntu-${{ matrix.distribution }}/debian ./
29+
30+
# Build a version number for this build
31+
GH_REF="${GITHUB_REF##*/}"
32+
GH_REF=$(echo "$GH_REF" | sed 's/[\/]/_/g' | sed 's/ /_/g')
33+
34+
VERSION_MAJOR=$(grep -oPi 'set\(CONFIG_VERSION_MAJOR \K\d+' src/CMakeLists.txt)
35+
VERSION_MINOR=$(grep -oPi 'set\(CONFIG_VERSION_MINOR \K\d+' src/CMakeLists.txt)
36+
VERSION_PATCH=$(grep -oPi 'set\(CONFIG_VERSION_BUG \K\d+' src/CMakeLists.txt)
37+
38+
BUILD_VERSION="${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}~${GH_REF}-${{ matrix.distribution }}+${GITHUB_SHA:0:7}"
39+
echo "BUILD_VERSION=$BUILD_VERSION" >> $GITHUB_OUTPUT
40+
echo "Building as $BUILD_VERSION"
41+
42+
BUILD_FILENAME="casparcg-server-${BUILD_VERSION}"
43+
echo "BUILD_FILENAME=$BUILD_FILENAME" >> $GITHUB_OUTPUT
44+
45+
# install some needed tooling
46+
sudo apt-get update
47+
sudo apt-get -y install software-properties-common build-essential dpkg-dev debhelper devscripts
48+
sudo add-apt-repository ppa:casparcg/ppa
49+
50+
# Put something in the changelog
51+
export DEBEMAIL="[email protected]"
52+
export DEBFULLNAME="CasparCG Builds"
53+
dch -v "$BUILD_VERSION" --create -D ${{ matrix.distribution }} --package casparcg-server-beta "Build"
54+
55+
# Install build dependencies
56+
sudo apt-get build-dep .
57+
58+
# update the control file to reference the current cef version
59+
CASPARCG_CEF_VER=$(dpkg-query -W -f='${Version}' casparcg-cef-131)
60+
sed -i "s/@CASPARCG_CEF_VER@/${CASPARCG_CEF_VER}/" debian/control
61+
62+
# Download required packages
63+
cd ..
64+
apt-get download casparcg-cef-131=$CASPARCG_CEF_VER
65+
apt-get download casparcg-scanner
66+
env:
67+
CI: 1
4168

4269
- name: Run build
4370
run: |
44-
mkdir build
45-
cd build
71+
# Perform build
72+
debuild -b -uc -us
73+
env:
74+
CI: 1
4675

47-
cmake ../src -DUSE_STATIC_BOOST=OFF -DUSE_SYSTEM_FFMPEG=ON -DUSE_SYSTEM_CEF=ON
48-
make -j2
76+
- name: Collect artifacts
77+
id: artifacts
78+
run: |
79+
mkdir -p dist
80+
mv ../*.deb dist/
81+
82+
# collect some docs for the zip
83+
cp README.md dist/
84+
cp tools/linux/deb/INSTALLING dist/
85+
86+
# check if a release branch, or master, or a tag
87+
if [[ "${{ github.ref_name }}" == "master" || "${{ github.ref_name }}" == "2.3.x-lts" ]]
88+
then
89+
# Only proceed if we have an sftp password
90+
if [ -n "${{ secrets.SFTP_PASSWORD }}" ]
91+
then
92+
zip -r "${{ steps.setup-env.outputs.BUILD_FILENAME }}.zip" dist
93+
94+
set -x
95+
eval $(ssh-agent -s)
96+
mkdir -v -m 700 $HOME/.ssh
97+
ssh-keyscan -H ${{ secrets.SFTP_HOST }} > $HOME/.ssh/known_hosts
98+
sshpass -p '${{ secrets.SFTP_PASSWORD }}' rsync -avvz --mkpath "${{ steps.setup-env.outputs.BUILD_FILENAME }}.zip" "${{ secrets.SFTP_USERNAME }}@${{ secrets.SFTP_HOST }}:${{ secrets.SFTP_ROOT }}/${{ github.ref_name }}/${{ steps.setup-env.outputs.BUILD_FILENAME }}.zip"
99+
fi
100+
fi
49101
50102
env:
51103
CI: 1
104+
105+
- uses: actions/upload-artifact@v4
106+
with:
107+
name: ${{ steps.setup-env.outputs.BUILD_FILENAME }}
108+
path: dist

.github/workflows/linux.yml

Lines changed: 0 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -19,62 +19,5 @@ jobs:
1919
- name: Run build
2020
run: |
2121
./tools/linux/build-in-docker
22-
./tools/linux/extract-from-docker
23-
2422
env:
2523
CI: 1
26-
27-
- name: Download media-scanner
28-
uses: robinraju/[email protected]
29-
with:
30-
repository: "casparcg/media-scanner"
31-
latest: true
32-
fileName: "*-linux-x64.zip"
33-
tarBall: false
34-
zipBall: false
35-
out-file-path: "casparcg_server/media-scanner"
36-
extract: true
37-
38-
- name: Tidy media-scanner download
39-
shell: bash
40-
run: |
41-
rm casparcg_server/media-scanner/*.zip
42-
mv casparcg_server/media-scanner/* casparcg_server/
43-
rmdir casparcg_server/media-scanner
44-
chmod +x casparcg_server/scanner
45-
46-
- name: Rename build
47-
id: "rename-build"
48-
shell: bash
49-
run: |
50-
TARGET=casparcg-server-${{ github.sha }}-ubuntu22.zip
51-
zip -r "$TARGET" casparcg_server/
52-
53-
echo "artifactname=$TARGET" >> $GITHUB_OUTPUT
54-
55-
# check if a release branch, or master, or a tag
56-
if [[ "${{ github.ref_name }}" == "master" || "${{ github.ref_name }}" == "2.3.x-lts" ]]
57-
then
58-
# Only proceed if we have an sftp password
59-
if [ -n "${{ secrets.SFTP_PASSWORD }}" ]
60-
then
61-
62-
echo "uploadname=$TARGET" >> $GITHUB_OUTPUT
63-
fi
64-
fi
65-
66-
- uses: actions/upload-artifact@v4
67-
with:
68-
name: upload-artifact
69-
path: ${{ steps.rename-build.outputs.artifactname }}
70-
71-
- name: Copy single file to remote
72-
uses: garygrossgarten/[email protected]
73-
if: ${{ steps.rename-build.outputs.uploadname }}
74-
timeout-minutes: 5
75-
with:
76-
local: "${{ steps.rename-build.outputs.uploadname }}"
77-
remote: "${{ secrets.SFTP_ROOT }}/${{ github.ref_name }}/${{ steps.rename-build.outputs.uploadname }}"
78-
host: ${{ secrets.SFTP_HOST }}
79-
username: ${{ secrets.SFTP_USERNAME }}
80-
password: ${{ secrets.SFTP_PASSWORD }}

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,7 @@ casparcg_server
1414

1515
src/cmake-build-*
1616
src/.idea
17+
18+
# debian build artifacts
19+
/debian
20+
/obj-*

BUILDING.md

Lines changed: 18 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -24,35 +24,25 @@ You can figure out which files you need by looking at each of the `ExternalProje
2424

2525
1. Install Visual Studio 2022.
2626

27-
2. Install CMake (http://www.cmake.org/download/).
27+
2. Install 7-zip (https://www.7-zip.org/).
2828

29-
3. Install 7-zip (https://www.7-zip.org/).
30-
31-
4. `git clone --single-branch --branch master https://github.com/CasparCG/server casparcg-server-master`
29+
3. `git clone --single-branch --branch master https://github.com/CasparCG/server casparcg-server-master`
3230

33-
5. `cd casparcg-server-master`
31+
4. `cd casparcg-server-master`
3432

35-
6. `.\tools\windows\build.bat`
33+
5. `.\tools\windows\build.bat`
3634

37-
7. Copy the `dist\casparcg_server.zip` file for distribution
35+
6. Copy the `dist\casparcg_server.zip` file for distribution
3836

3937
## Development using Visual Studio
4038

4139
1. Install Visual Studio 2022.
4240

43-
2. Install CMake (http://www.cmake.org/download/).
44-
4541
3. `git clone --single-branch --branch master https://github.com/CasparCG/server casparcg-server-master`
4642

47-
4. `cd casparcg-server-master`
48-
49-
5. `mkdir build`
50-
51-
6. `cd build`
52-
53-
7. `cmake -G "Visual Studio 17 2022" -A x64 ../src`
43+
4. Open the cloned folder in Visual Studio.
5444

55-
8. Open `CasparCG Server.sln`
45+
5. Build All and ensure it builds successfully
5646

5747
# Linux
5848

@@ -79,17 +69,22 @@ Before beginning, check the build options section below, to decide if you want t
7969
1. `git clone --single-branch --branch master https://github.com/CasparCG/server casparcg-server-master`
8070
2. `cd casparcg-server-master`
8171
3. Install dependencies, this can be done with `sudo ./tools/linux/install-dependencies`
82-
4. `mkdir build && cd build`
83-
5. `cmake ../src`
84-
6. If not using system ffmpeg, run `./_deps/ffmpeg-lib-src/ffmpeg/install-ffmpeg-dependencies` to install the dependencies needed by the ffmpeg build
85-
7. `make -j8`
72+
4. If not using system ffmpeg, run `./_deps/ffmpeg-lib-src/ffmpeg/install-ffmpeg-dependencies` to install the dependencies needed by the ffmpeg build
73+
5. If using system CEF, `sudo add-apt-repository ppa:casparcg/ppa` and `sudo apt-get install casparcg-cef-131-dev`
74+
6. `mkdir build && cd build`
75+
7. `cmake ../src`
76+
8. `make -j8`
8677

8778
If all goes to plan, a folder called 'staging' has been created with everything you need to run CasparCG server.
8879

8980
## Build options
9081

9182
-DENABLE_HTML=OFF - useful if you lack CEF, and would like to build without that module.
9283

93-
-DUSE_STATIC_BOOST=OFF - (Linux only) link against shared version of Boost.
84+
-DUSE_STATIC_BOOST=ON - (Linux only, default OFF) statically link against Boost.
85+
86+
-DUSE_SYSTEM_FFMPEG=OFF - (Linux only, default ON) use the version of ffmpeg from your OS.
87+
88+
-DUSE_SYSTEM_CEF=OFF - (Linux only, default ON) use the version of CEF from your OS. This expects to be using builds from https://launchpad.net/~casparcg/+archive/ubuntu/ppa
9489

95-
-DUSE_SYSTEM_FFMPEG - (Linux only) use the version of ffmpeg from your OS.
90+
-DDIAG_FONT_PATH - Specify an alternate path/font to use for the DIAG window. On linux, this will often want to be set to an absolute path of a font

0 commit comments

Comments
 (0)