Skip to content

Enable arm64 Linux builds #370

Enable arm64 Linux builds

Enable arm64 Linux builds #370

Workflow file for this run

name: Linux build
on:
push:
branches: '*'
tags: '*'
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-20.04
strategy:
matrix:
include:
- qt-host: 'linux_arm64'
qt-version: '6.8'
qt-target: 'desktop'
qt-modules: ''
qt-arch: 'linux_gcc_arm64'
arch: 'aarch64'
- qt-version: '6.8'
qt-target: 'desktop'
qt-modules: ''
qt-arch: 'linux_gcc_64'
arch: 'amd64'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: 'recursive'
- name: Setup environment
run: |
sed -i -e '/^#/d' .github/config.env
sed -i -e '/^$/d' .github/config.env
cat .github/config.env >> "${GITHUB_ENV}"
shell: bash
- if: contains(matrix.arch, 'amd64')
name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libxkbcommon-x11-0
shell: bash
- name: Install GCC11
shell: bash
run: |
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt install gcc-11 g++-11
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 110 --slave /usr/bin/g++ g++ /usr/bin/g++-11 --slave /usr/bin/gcov gcov /usr/bin/gcov-11
## Install Qt
- if: "!contains(matrix.arch, 'amd64')"
name: Install host Qt
uses: jdpurcell/install-qt-action@v4
with:
version: ${{ matrix.qt-version }}
arch: linux_gcc_64
target: ${{ matrix.qt-target }}
modules: ${{ matrix.qt-modules }}
dir: ${{ github.workspace }}/Qt_host
- if: "!contains(matrix.arch, 'amd64')"
name: Save host Qt path
run: echo "QT_HOST_PATH=${QT_ROOT_DIR}" >> "${GITHUB_ENV}"
shell: bash
- name: Install target Qt
uses: jdpurcell/install-qt-action@v4
with:
version: ${{ matrix.qt-version }}
host: ${{ matrix.qt-host}}
arch: ${{ matrix.qt-arch }}
target: ${{ matrix.qt-target }}
modules: ${{ matrix.qt-modules }}
## Build
- if: "!contains(matrix.arch, 'amd64')"
name: Prepare cross-compilation environment
run: .ci/prepare_cross_build.sh "${{ matrix.arch }}"
shell: bash
- name: Build AppImage
run: .ci/build_appimage.sh ${{ matrix.qt-arch }}
shell: 'script -q -e -c "bash {0}"'
## Upload
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: build-Qt-${{ matrix.qt-version }}-${{ matrix.arch }}
path: |
*.AppImage
*.zsync