Release Qiosk #46
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release Qiosk | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: 'Version number (e.g. 1.12.0)' | |
required: true | |
type: string | |
jobs: | |
build-arm: | |
runs-on: ubuntu-24.04 | |
strategy: | |
matrix: | |
arch: [arm64] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: setup deb822 repos | |
run: | | |
if [[ $ImageOS == "ubuntu24" ]]; then | |
cat <<EOF > deb822sources | |
Types: deb | |
URIs: http://archive.ubuntu.com/ubuntu/ | |
Suites: noble | |
Components: main restricted universe | |
Architectures: amd64 | |
Types: deb | |
URIs: http://security.ubuntu.com/ubuntu/ | |
Suites: noble-security | |
Components: main restricted universe | |
Architectures: amd64 | |
Types: deb | |
URIs: http://archive.ubuntu.com/ubuntu/ | |
Suites: noble-updates | |
Components: main restricted universe | |
Architectures: amd64 | |
Types: deb | |
URIs: http://azure.ports.ubuntu.com/ubuntu-ports/ | |
Suites: noble | |
Components: main restricted multiverse universe | |
Architectures: ${{ matrix.arch }} | |
Types: deb | |
URIs: http://azure.ports.ubuntu.com/ubuntu-ports/ | |
Suites: noble-updates | |
Components: main restricted multiverse universe | |
Architectures: ${{ matrix.arch }} | |
EOF | |
sudo mv deb822sources /etc/apt/sources.list.d/ubuntu.sources | |
else | |
sudo mv config/crosscomp-sources.list /etc/apt/sources.list | |
fi | |
- name: Install dependencies | |
run: | | |
sudo dpkg --add-architecture ${{ matrix.arch }} | |
sudo apt update -qy | |
sudo apt install -y build-essential cmake crossbuild-essential-${{ matrix.arch }} \ | |
qt6-webengine-dev:${{ matrix.arch }} \ | |
qt6-websockets-dev:${{ matrix.arch }} \ | |
qt6-base-dev:${{ matrix.arch }} \ | |
qt6-base-dev-tools \ | |
qt6-declarative-dev:${{ matrix.arch }} \ | |
qt6-tools-dev:${{ matrix.arch }} \ | |
qt6-tools-dev-tools \ | |
qt6-l10n-tools \ | |
libqt6webenginewidgets6:${{ matrix.arch }} \ | |
libqt6websockets6:${{ matrix.arch }} | |
- name: Verify Qt6 Installation | |
run: | | |
ls -la /usr/lib/aarch64-linux-gnu/cmake/Qt6/ | |
ls -la /usr/lib/aarch64-linux-gnu/cmake/Qt6Core/ | |
- name: Create Toolchain File | |
run: | | |
cat > arm64-toolchain.cmake << 'EOL' | |
set(CMAKE_SYSTEM_NAME Linux) | |
set(CMAKE_SYSTEM_PROCESSOR aarch64) | |
set(CMAKE_C_COMPILER aarch64-linux-gnu-gcc) | |
set(CMAKE_CXX_COMPILER aarch64-linux-gnu-g++) | |
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) | |
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) | |
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) | |
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) | |
# Set the root path | |
set(CMAKE_FIND_ROOT_PATH /usr/aarch64-linux-gnu) | |
# Set Qt6 paths explicitly | |
set(QT_DIR "/usr/lib/aarch64-linux-gnu/cmake/Qt6") | |
set(Qt6CoreTools_DIR "/usr/lib/aarch64-linux-gnu/cmake/Qt6CoreTools") | |
set(Qt6Core_DIR "/usr/lib/aarch64-linux-gnu/cmake/Qt6Core") | |
set(Qt6DBusTools_DIR "/usr/lib/aarch64-linux-gnu/cmake/Qt6DBusTools") | |
set(Qt6DBus_DIR "/usr/lib/aarch64-linux-gnu/cmake/Qt6DBus") | |
set(Qt6GuiTools_DIR "/usr/lib/aarch64-linux-gnu/cmake/Qt6GuiTools") | |
set(Qt6Gui_DIR "/usr/lib/aarch64-linux-gnu/cmake/Qt6Gui") | |
set(Qt6Network_DIR "/usr/lib/aarch64-linux-gnu/cmake/Qt6Network") | |
set(Qt6OpenGL_DIR "/usr/lib/aarch64-linux-gnu/cmake/Qt6OpenGL") | |
set(Qt6Positioning_DIR "/usr/lib/aarch64-linux-gnu/cmake/Qt6Positioning") | |
set(Qt6PrintSupport_DIR "/usr/lib/aarch64-linux-gnu/cmake/Qt6PrintSupport") | |
set(Qt6QmlCompilerPlusPrivate_DIR "Qt6QmlCompilerPlusPrivate_DIR-NOTFOUND") | |
set(Qt6QmlIntegration_DIR "/usr/lib/aarch64-linux-gnu/cmake/Qt6QmlIntegration") | |
set(Qt6QmlModels_DIR "/usr/lib/aarch64-linux-gnu/cmake/Qt6QmlModels") | |
set(Qt6QmlTools_DIR "/usr/lib/aarch64-linux-gnu/cmake/Qt6QmlTools") | |
set(Qt6Qml_DIR "/usr/lib/aarch64-linux-gnu/cmake/Qt6Qml") | |
set(Qt6QuickWidgets_DIR "/usr/lib/aarch64-linux-gnu/cmake/Qt6QuickWidgets") | |
set(Qt6Quick_DIR "/usr/lib/aarch64-linux-gnu/cmake/Qt6Quick") | |
set(Qt6WebChannel_DIR "/usr/lib/aarch64-linux-gnu/cmake/Qt6WebChannel") | |
set(Qt6WebEngineCoreTools_DIR "/usr/lib/aarch64-linux-gnu/cmake/Qt6WebEngineCoreTools") | |
set(Qt6WebEngineCore_DIR "/usr/lib/aarch64-linux-gnu/cmake/Qt6WebEngineCore") | |
set(Qt6WebEngineWidgets_DIR "/usr/lib/aarch64-linux-gnu/cmake/Qt6WebEngineWidgets") | |
set(Qt6WebSockets_DIR "/usr/lib/aarch64-linux-gnu/cmake/Qt6WebSockets") | |
set(Qt6WidgetsTools_DIR "/usr/lib/aarch64-linux-gnu/cmake/Qt6WidgetsTools") | |
set(Qt6Widgets_DIR "/usr/lib/aarch64-linux-gnu/cmake/Qt6Widgets") | |
set(Qt6_DIR "/usr/lib/aarch64-linux-gnu/cmake/Qt6") | |
message(STATUS "CMAKE_SYSTEM_NAME: ${CMAKE_SYSTEM_NAME}") | |
message(STATUS "CMAKE_SYSTEM_PROCESSOR: ${CMAKE_SYSTEM_PROCESSOR}") | |
message(STATUS "CMAKE_C_COMPILER: ${CMAKE_C_COMPILER}") | |
message(STATUS "CMAKE_CXX_COMPILER: ${CMAKE_CXX_COMPILER}") | |
message(STATUS "CMAKE_PREFIX_PATH: ${CMAKE_PREFIX_PATH}") | |
message(STATUS "Qt6_DIR: ${Qt6_DIR}") | |
set(CMAKE_C_COMPILER_FORCED TRUE) | |
set(CMAKE_CXX_COMPILER_FORCED TRUE) | |
EOL | |
- name: Build | |
run: | | |
cmake -DCMAKE_TOOLCHAIN_FILE=arm64-toolchain.cmake -DCMAKE_BUILD_TYPE=Release -S . -B . | |
cmake --build . | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: ${{ secrets.AWS_REGION }} | |
- name: Upload to S3 | |
run: | | |
aws s3 cp ./qiosk s3://${{ secrets.S3_BUCKET }}/apps/qiosk-${{ inputs.version }}-${{ matrix.arch }} |