Skip to content

Commit 81665d4

Browse files
committed
test arm runner
1 parent 03eb94e commit 81665d4

5 files changed

Lines changed: 53 additions & 4 deletions

File tree

.github/workflows/tests.yml

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches:
66
- main
7+
- develop
78

89
pull_request:
910
branches:
@@ -14,7 +15,6 @@ jobs:
1415
run-tests:
1516
runs-on: ubuntu-22.04
1617
strategy:
17-
1818
matrix:
1919
flag: [--static, --shared]
2020

@@ -23,13 +23,12 @@ jobs:
2323
uses: actions/checkout@v4
2424

2525
- name: Install dependencies
26-
env:
26+
env:
2727
QT_INSTALLER_JWT_TOKEN: ${{ secrets.QT_INSTALLER_JWT_TOKEN }}
2828
run: |
2929
echo "With flag ${{ matrix.flag }}"
3030
./scripts/setup ${{ matrix.flag }}
3131
32-
3332
- name: Build project
3433
run: |
3534
./scripts/configure -- -DBUILD_TESTING=ON
@@ -48,3 +47,23 @@ jobs:
4847
run: |
4948
tar -xvf ./build/snapshot-*.tar.gz -C /tmp
5049
/tmp/snapshot-*/snapshot_tests
50+
51+
run-arm-tests:
52+
runs-on: ubuntu-latest
53+
env:
54+
QT_INSTALLER_JWT_TOKEN: ${{ secrets.QT_INSTALLER_JWT_TOKEN }}
55+
steps:
56+
- uses: actions/checkout@v2
57+
- uses: pguyot/arm-runner-action@v2
58+
with:
59+
image_additional_mb: 5000
60+
commands: |
61+
export QT_INSTALLER_JWT_TOKEN=${{ secrets.QT_INSTALLER_JWT_TOKEN }}
62+
./scripts/setup --shared
63+
./scripts/configure -- -DBUILD_TESTING=ON
64+
cmake --build ./build --target package
65+
sudo cmake --install ./build
66+
ctest --test-dir ./build --verbose
67+
/opt/snapshot/snapshot_tests
68+
tar -xvf ./build/snapshot-*.tar.gz -C /tmp
69+
/tmp/snapshot-*/snapshot_tests
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
echo "Update apt database"
5+
sudo apt-get update -y
6+
sudo apt-get upgrade -y
7+
8+
echo "Installing build dependencies"
9+
sudo apt-get install -y clang ninja-build git cmake llvm pkg-config

scripts/helpers/apt_rpi/is_rpi

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/env bash
2+
3+
arch="$(uname -m)"
4+
case "$arch" in
5+
arm* | aarch64)
6+
exit 0
7+
;;
8+
*)
9+
exit 1
10+
;;
11+
esac

scripts/helpers/download-qt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,8 @@ while [[ $# -gt 0 ]]; do
3333
esac
3434
done
3535
"$this_dir/download-installer"
36+
if ! "$this_dir/qt-installer.run" --help >/dev/null 2>&1; then
37+
echo "Qt installer is not working as expected." >&2
38+
exit 1
39+
fi
3640
"$this_dir/qt-installer.run" --root "$install_dir" --accept-licenses --accept-obligations --default-answer --confirm-command install $packages

scripts/helpers/get-package-manager

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
#!/usr/bin/env bash
22
set -euo pipefail
33

4+
this_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
5+
46
if command -v apt &>/dev/null; then
5-
echo "apt"
7+
if "${this_dir}"/apt_rpi/is_rpi; then
8+
echo "apt_rpi"
9+
else
10+
echo "apt"
11+
fi
612
elif command -v pacman &>/dev/null; then
713
echo "pacman"
814
else

0 commit comments

Comments
 (0)