Restore workflow for linux build, remove others (temporary to focus o… #1014
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
# This is a basic workflow to help you get started with Actions | |
name: CI | |
env: | |
DISPLAY: ':99' | |
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true' | |
# Controls when the action will run. Triggers the workflow on push or pull request | |
# events but only for the master branch | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ test-timeouts ] | |
pull_request: | |
branches: [ test-timeouts ] | |
schedule: | |
- cron: "0 0 * * *" | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "build" | |
linux-x86-build: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-20.04 | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
- name: release | |
uses: actions/create-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
id: create_release | |
with: | |
draft: false | |
prerelease: false | |
release_name: ${{ steps.version.outputs.version }} | |
tag_name: ${{ github.ref }} | |
body_path: CHANGELOG.md | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
# - name: Cache Qt Linux Desktop | |
# id: cache-qt-linux-desktop | |
# uses: actions/cache@v1 | |
# with: | |
# path: '${{ github.workspace }}/output/linux-desktop/' | |
# key: ${{ runner.os }}-QtCache-Linux-Desktop | |
# - name: Cache Qt Linux Android | |
# id: cache-qt-android | |
# uses: actions/cache@v1 | |
# with: | |
# path: '${{ github.workspace }}/output/android/' | |
# key: ${{ runner.os }}-QtCache-Android | |
- name: Xvfb install and run | |
run: | | |
sudo apt-get install -y xvfb | |
Xvfb -ac ${{ env.DISPLAY }} -screen 0 1280x780x24 & | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v2 | |
- name: Checkout submodule repo | |
uses: actions/checkout@v2 | |
with: | |
repository: bluetiger9/SmtpClient-for-Qt | |
path: "src/smtpclient/" | |
ref: 3fa4a0fe5797070339422cf18b5e9ed8dcb91f9c | |
- uses: actions/checkout@v2 | |
- name: Checkout submodule repo | |
uses: actions/checkout@v2 | |
with: | |
repository: cagnulein/qmdnsengine | |
path: "src/qmdnsengine/" | |
ref: "zwift" | |
- uses: actions/checkout@v2 | |
- name: Checkout submodule repo | |
uses: actions/checkout@v2 | |
with: | |
repository: google/googletest | |
path: "tst/googletest/" | |
ref: "release-1.12.1" | |
- uses: actions/checkout@v2 | |
- name: Checkout qHttpServer | |
uses: actions/checkout@v2 | |
with: | |
repository: qt-labs/qthttpserver | |
path: "src/qthttpserver" | |
- name: Install packages required to run QZ inside workflow | |
run: sudo apt update -y && sudo apt-get install -y qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools qtquickcontrols2-5-dev libqt5bluetooth5 libqt5widgets5 libqt5positioning5 libqt5xml5 qtconnectivity5-dev qtpositioning5-dev libqt5charts5-dev libqt5charts5 libqt5networkauth5-dev libqt5websockets5* libxcb-randr0-dev libxcb-xtest0-dev libxcb-xinerama0-dev libxcb-shape0-dev libxcb-xkb-dev | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v3 | |
with: | |
version: '5.15.2' | |
host: 'linux' | |
modules: 'qtnetworkauth qtcharts' | |
cache: 'true' | |
cache-key-prefix: 'install-qt-action-linux' | |
- name: download 3rd party files for qthttpserver | |
run: | | |
cp qHttpServerBin/5.15.2/headers/* src/qthttpserver/src/3rdparty/http-parser/ | |
- name: Build qthttpserver | |
run: | | |
cd src/qthttpserver | |
qmake | |
make -j8 | |
make install | |
cd ../.. | |
- name: Compile Linux Desktop | |
run: qmake; make -j8 | |
- name: Archive linux-desktop binary | |
uses: actions/upload-artifact@v4 | |
with: | |
name: linux-desktop-binary | |
path: src/qdomyos-zwift | |
- name: Test | |
run: cd tst; GTEST_OUTPUT=xml:test-results/ GTEST_COLOR=1 ./qdomyos-zwift-tests; cd .. | |
- name: Upload test results | |
uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: test_results_xml | |
path: tst/test-results/**/*.xml | |