Release Qiosk #34
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 | |
- name: Create toolchain file | |
run: | | |
cat > arm64-toolchain.cmake << 'EOF' | |
set(CMAKE_SYSTEM_NAME Linux) | |
set(CMAKE_SYSTEM_PROCESSOR aarch64) | |
set(CMAKE_C_COMPILER /usr/bin/aarch64-linux-gnu-gcc) | |
set(CMAKE_CXX_COMPILER /usr/bin/aarch64-linux-gnu-g++) | |
set(CMAKE_FIND_ROOT_PATH /usr/aarch64-linux-gnu) | |
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) | |
EOF | |
- 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 }} |