Bracket failure #87
Workflow file for this run
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
--- | |
# Inspired by https:/qt/qtbase/blob/dev/.github/workflows/ninja-build.yml | |
# yamllint disable rule:line-length | |
name: Build Qt | |
# yamllint disable-line rule:truthy | |
on: | |
push: | |
paths: | |
- tablet_qt/tools/build_qt.py | |
- .github/scripts/change_apt_mirror.sh | |
- .github/scripts/free_up_disk_space.sh | |
- .github/workflows/build-qt.yml | |
jobs: | |
build-qt: | |
strategy: | |
matrix: | |
include: | |
- name: ubuntu-20.04 | |
os: ubuntu-20.04 | |
- name: ubuntu-22.04 | |
os: ubuntu-22.04 | |
- name: windows-2019 | |
os: windows-2019 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Free up disk space | |
if: runner.os == 'Linux' | |
run: | | |
set -eux -o pipefail | |
${GITHUB_WORKSPACE}/.github/scripts/free_up_disk_space.sh | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- name: Ubuntu 20.04 prerequisites | |
if: matrix.os == 'ubuntu-20.04' | |
run: | | |
set -eux -o pipefail | |
${GITHUB_WORKSPACE}/.github/scripts/change_apt_mirror.sh | |
${GITHUB_WORKSPACE}/.github/scripts/add_apt_sources.sh | |
sudo apt-get -y build-dep qt5-default | |
sudo apt-get -y install build-essential perl python git | |
sudo apt-get -y install ninja-build ccache | |
sudo apt-get -y install '^libxcb.*-dev' libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev | |
sudo apt-get -y install flex bison gperf libicu-dev libxslt-dev ruby yasm | |
sudo apt-get -y install libxcursor-dev libxcomposite-dev libxdamage-dev libxrandr-dev libxtst-dev libxss-dev libdbus-1-dev libevent-dev libfontconfig1-dev libcap-dev libpulse-dev libudev-dev libpci-dev libnss3-dev libasound2-dev libegl1-mesa-dev nodejs | |
sudo apt-get -y install libxcb-xinerama0-dev | |
sudo apt-get -y install libdrm-dev libxcb-glx0-dev libzstd-dev | |
sudo apt-get -y install libclang-10-dev libclang-11-dev libclang-12-dev | |
- name: Ubuntu 22.04 prerequisites | |
if: matrix.os == 'ubuntu-22.04' | |
run: | | |
set -eux -o pipefail | |
${GITHUB_WORKSPACE}/.github/scripts/change_apt_mirror.sh | |
${GITHUB_WORKSPACE}/.github/scripts/add_apt_sources.sh | |
sudo apt-get -y install libunwind-dev | |
sudo apt-get -y install build-essential python3 git | |
sudo apt-get -y install ninja-build clang ccache | |
sudo apt-get -y install '^libxcb.*-dev' libx11-xcb-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev | |
sudo apt-get -y install flex bison gperf yasm | |
sudo apt-get -y install libxcursor-dev libxcomposite-dev libxdamage-dev libxrandr-dev libfontconfig1-dev libpulse-dev libnss3-dev libegl1-mesa-dev nodejs | |
sudo apt-get -y install libdrm-dev | |
sudo apt-get -y install libatspi2.0-dev libbluetooth-dev libclang-dev libcups2-dev | |
sudo apt-get -y install libfreetype6-dev | |
sudo apt-get -y install libhunspell-dev libopengl-dev | |
sudo apt-get -y install libts-dev libx11-dev | |
sudo apt-get -y install libxext-dev | |
sudo apt-get -y install libxfixes-dev | |
sudo apt-get -y install libxkbfile-dev libxshmfence-dev | |
sudo apt-get -y install libxshmfence1 llvm | |
- uses: ilammy/msvc-dev-cmd@v1 | |
with: | |
arch: x64 | |
- name: Windows prerequisites | |
if: matrix.os == 'windows-2019' | |
run: | | |
$ErrorActionPreference = "Stop" | |
choco install ninja nasm --yes --no-progress | |
choco install ccache --version 3.7.12 --yes --no-progress | |
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build" >> $env:GITHUB_PATH | |
# Chocolatey uses the Windows installer, which doesn't update Path | |
# https://bugzilla.nasm.us/show_bug.cgi?id=3392224 | |
"C:\Program Files\NASM" >> $env:GITHUB_PATH | |
- name: restore ccache | |
id: ccache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ runner.temp }}/ccache | |
# "github.run_id" is unique, which causes the cache to always get | |
# saved at the end of a successful run. | |
key: ccache-${{ matrix.os }}-${{ github.ref }}-${{ github.run_id }} | |
# As the unique "key" above will never be found in the cache when the | |
# job starts, we need these broader "restore-keys" in order to match | |
# and restore the most recent cache. | |
restore-keys: | | |
ccache-${{ matrix.os }}-${{ github.ref }}- | |
ccache-${{ matrix.os }}- | |
- name: configure ccache | |
run: | | |
# This must be valid in bash and PowerShell | |
ccache --set-config sloppiness=file_macro,time_macros | |
ccache --set-config cache_dir='${{ runner.temp }}'/ccache | |
ccache --set-config compression=true | |
ccache --set-config max_size=1G | |
- name: Windows specific versions | |
if: runner.os == 'Windows' | |
run: | | |
$ErrorActionPreference = "Stop" | |
nasm --version | |
- name: print versions and environment | |
run: | | |
# This must be valid in bash and PowerShell | |
ccache --version | |
ccache --show-config | |
clang --version | |
cmake --version | |
gcc --version | |
git --version | |
ninja --version | |
perl --version | |
tar --version | |
echo Environment: | |
printenv | |
- name: Ubuntu Pip install | |
if: runner.os == 'Linux' | |
run: | | |
set -eux -o pipefail | |
python -m venv ${HOME}/venv | |
source ${HOME}/venv/bin/activate | |
python -VV | |
python -m site | |
python -m pip install -U pip | |
echo dumping pre-installed packages | |
python -m pip freeze | |
echo installing pip packages | |
python -m pip install cardinal_pythonlib | |
python -m pip install distro | |
- name: Windows Pip install | |
if: runner.os == 'Windows' | |
run: | | |
$ErrorActionPreference = "Stop" | |
cd "$env:USERPROFILE" | |
python -m venv venv | |
.\venv\Scripts\activate | |
python -VV | |
python -m site | |
python -m pip install -U pip | |
echo "dumping pre-installed packages" | |
python -m pip freeze | |
echo "installing pip packages" | |
python -m pip install cardinal_pythonlib | |
python -m pip install distro | |
- name: Ubuntu Build Qt | |
if: runner.os == 'Linux' | |
run: | | |
set -eux -o pipefail | |
echo "Free space:" | |
df -h | |
source ${HOME}/venv/bin/activate | |
export CAMCOPS_QT6_BASE_DIR=${HOME}/qt_local_build | |
cd tablet_qt/tools | |
./build_qt.py --build_linux_x86_64 | |
- name: Windows Build Qt | |
if: runner.os == 'Windows' | |
run: | | |
$ErrorActionPreference = "Stop" | |
cd "$env:USERPROFILE" | |
.\venv\Scripts\activate | |
$env:CAMCOPS_QT6_BASE_DIR = "$env:USERPROFILE\qt_local_build" | |
cd "$env:GITHUB_WORKSPACE\tablet_qt\tools" | |
python build_qt.py --build_windows_x86_64 | |
- name: Cache stats | |
# Print ccache utilization statistics, then reset them. | |
run: | | |
# This must be valid in bash and PowerShell | |
ccache -s | |
ccache -z |