Skip to content

Commit 3143b2a

Browse files
committed
add CI tests
1 parent 258b598 commit 3143b2a

3 files changed

Lines changed: 66 additions & 0 deletions

File tree

.github/scripts/run_tests.sh

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#!/bin/sh -eu
2+
3+
case "$RUNNER_OS" in
4+
Linux)
5+
ug_build=UltraGrid-continuous-x86_64.AppImage
6+
prepare() {
7+
chmod +x "$ug_build"
8+
./"$ug_build" --appimage-extract
9+
}
10+
run=squashfs-root/AppRun
11+
;;
12+
Windows)
13+
ug_build=UltraGrid-continuous-win64.zip
14+
prepare() {
15+
unzip "$ug_build"
16+
}
17+
run=UltraGrid-continuos-win64/uv.exe
18+
;;
19+
macOS)
20+
ug_build=UltraGrid-continuous-arm64.dmg
21+
prepare() {
22+
hdiutil mount "$ug_build"
23+
}
24+
run=/Volumes/ULTRAGRID/uv-qt.app/Contents/MacOS/uv
25+
esac
26+
27+
curl -LOf https://github.com/CESNET/UltraGrid/releases/download/continuous/\
28+
"$ug_build"
29+
30+
prepare
31+
32+
# basic sanity test
33+
$run -v
34+
35+
## @1 args (manadatory)
36+
add_test() {
37+
38+
}
39+
40+
. "$(dirname "$0")"/run_test_data.sh

.github/scripts/run_tests_data.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

.github/workflows/daily_tests.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Continuous daily build tests
2+
3+
on:
4+
push:
5+
branches:
6+
- run_tests
7+
schedule:
8+
- cron: '30 4 * * *' # every day at 4:30 UTC
9+
10+
jobs:
11+
run_tests:
12+
strategy:
13+
matrix:
14+
os: [ubuntu-latest, windows-latest, macos-latest]
15+
16+
runs-on: ${{ matrix.os }}
17+
defaults:
18+
run:
19+
shell: ${{ matrix.os == 'windows-latest' && 'C:\shells\msys2bash.cmd {0}' || 'bash {0}' }}
20+
21+
steps:
22+
- uses: actions/checkout@v4
23+
- name: Run
24+
shell: bash
25+
run: .github/scripts/run_tests.sh

0 commit comments

Comments
 (0)