[CI] Capture build stderr in a log file for later processing

This commit is contained in:
Mat Sutcliffe
2020-06-14 18:51:30 +01:00
parent 93137c017e
commit e38423a8b3
2 changed files with 24 additions and 11 deletions

View File

@@ -43,6 +43,7 @@ jobs:
- name: Install dependencies
run: |
sudo apt install doxygen graphviz libglu1-mesa-dev libopus-dev libsodium-dev libpulse-dev libdbus-1-dev libevent-dev
pip3 install tee
- name: Checkout repository
uses: actions/checkout@v2
with:
@@ -52,6 +53,7 @@ jobs:
if: ${{ ! env.do_symbols }}
run: |
python3 -u scripts/build.py -w 64 -t gcc -d -j2 -e $eol_months $BASH_KEY_ARGS
ls -l error.log
env:
VATSIM_ID: ${{ secrets.VATSIM_ID }}
VATSIM_KEY: ${{ secrets.VATSIM_KEY }}
@@ -59,6 +61,7 @@ jobs:
if: ${{ env.do_symbols }}
run: |
python3 -u scripts/build.py -w 64 -t gcc -d -j2 -e $eol_months $BASH_KEY_ARGS --upload
ls -l error.log
env:
VATSIM_ID: ${{ secrets.VATSIM_ID }}
VATSIM_KEY: ${{ secrets.VATSIM_KEY }}
@@ -100,9 +103,10 @@ jobs:
run: |
curl.exe --output "$HOME\installbuilder.exe" -L --url https://installbuilder.com/installbuilder-qt-professional-20.4.0-windows-x64-installer.exe
&"$HOME\installbuilder.exe" --mode unattended --prefix "$HOME\installbuilder"
- name: Install jom
- name: Install dependencies
run: |
choco install jom --yes
pip install tee
- name: Checkout repository
uses: actions/checkout@v2
with:
@@ -112,6 +116,7 @@ jobs:
if: ${{ ! env.do_symbols }}
run: |
python.exe -u scripts\build.py -w 64 -t msvc -d -e $env:eol_months ${{ env.PWSH_KEY_ARGS }}
dir error.log
env:
VATSIM_ID: ${{ secrets.VATSIM_ID }}
VATSIM_KEY: ${{ secrets.VATSIM_KEY }}
@@ -119,6 +124,7 @@ jobs:
if: ${{ env.do_symbols }}
run: |
python.exe -u scripts\build.py -w 64 -t msvc -d -e $env:eol_months ${{ env.PWSH_KEY_ARGS }} --upload
dir error.log
env:
VATSIM_ID: ${{ secrets.VATSIM_ID }}
VATSIM_KEY: ${{ secrets.VATSIM_KEY }}
@@ -161,9 +167,10 @@ jobs:
run: |
curl.exe --output "$HOME\installbuilder.exe" -L --url https://installbuilder.com/installbuilder-qt-professional-20.4.0-windows-installer.exe
&"$HOME\installbuilder.exe" --mode unattended --prefix "$HOME\installbuilder"
- name: Install jom
- name: Install dependencies
run: |
choco install jom --yes
pip install tee
- name: Checkout repository
uses: actions/checkout@v2
with:
@@ -173,6 +180,7 @@ jobs:
if: ${{ ! env.do_symbols }}
run: |
python.exe -u scripts\build.py -w 32 -t msvc -d -e $env:eol_months ${{ env.PWSH_KEY_ARGS }}
dir error.log
env:
VATSIM_ID: ${{ secrets.VATSIM_ID }}
VATSIM_KEY: ${{ secrets.VATSIM_KEY }}
@@ -180,6 +188,7 @@ jobs:
if: ${{ env.do_symbols }}
run: |
python.exe -u scripts\build.py -w 32 -t msvc -d -e $env:eol_months ${{ env.PWSH_KEY_ARGS }} --upload
dir error.log
env:
VATSIM_ID: ${{ secrets.VATSIM_ID }}
VATSIM_KEY: ${{ secrets.VATSIM_KEY }}
@@ -230,6 +239,7 @@ jobs:
- name: Install dependencies
run: |
pip3 install requests
pip3 install tee
- name: Checkout repository
uses: actions/checkout@v2
with:
@@ -239,6 +249,7 @@ jobs:
if: ${{ ! env.do_symbols }}
run: |
python3 -u scripts/build.py -w 64 -t clang -d -j2 -e $eol_months $BASH_KEY_ARGS
ls -l error.log
env:
VATSIM_ID: ${{ secrets.VATSIM_ID }}
VATSIM_KEY: ${{ secrets.VATSIM_KEY }}
@@ -246,6 +257,7 @@ jobs:
if: ${{ env.do_symbols }}
run: |
python3 -u scripts/build.py -w 64 -t clang -d -j2 -e $eol_months $BASH_KEY_ARGS --upload
ls -l error.log
env:
VATSIM_ID: ${{ secrets.VATSIM_ID }}
VATSIM_KEY: ${{ secrets.VATSIM_KEY }}

View File

@@ -21,6 +21,7 @@ import sys
import datastore
import tarfile
from lib.util import get_vs_env
from tee import StderrTee
if sys.version_info < (3, 0):
import ConfigParser as configparser
@@ -477,15 +478,15 @@ def main(argv):
print('Unknown or unsupported tool chain!')
sys.exit(2)
builder = builders[platform.system()][tool_chain](config_file, word_size)
builder.prepare()
builder.build(jobs, qmake_args, dev_build, eolInMonth)
builder.checks()
builder.install()
builder.publish()
builder.package_xswiftbus()
builder.symbols(upload_symbols)
with StderrTee('error.log', buff=-1):
builder = builders[platform.system()][tool_chain](config_file, word_size)
builder.prepare()
builder.build(jobs, qmake_args, dev_build, eolInMonth)
builder.checks()
builder.install()
builder.publish()
builder.package_xswiftbus()
builder.symbols(upload_symbols)
# run main if run directly