[CI] Fix stderr not being captured in log

This commit is contained in:
Mat Sutcliffe
2020-06-18 22:39:48 +01:00
parent ea0f1261ed
commit 9309beefc4
2 changed files with 24 additions and 26 deletions

View File

@@ -27,7 +27,6 @@ jobs:
- name: Get version number - name: Get version number
id: version id: version
run: | run: |
pip3 install tee
echo "::set-output name=value::$(python3 -u scripts/build.py --version)" echo "::set-output name=value::$(python3 -u scripts/build.py --version)"
- name: Remove artifacts - name: Remove artifacts
uses: swift-project/delete-artifact@swift uses: swift-project/delete-artifact@swift
@@ -60,7 +59,7 @@ jobs:
sudo apt install cppcheck sudo apt install cppcheck
sudo cpan Path::Class sudo cpan Path::Class
cppcheck --template=gcc --inline-suppr --std=c++14 --enable=style,unusedFunction -i externals \ cppcheck --template=gcc --inline-suppr --std=c++14 --enable=style,unusedFunction -i externals \
--suppressions-list=cppcheck.supp --library=qt.cfg --library=posix.cfg . | tee error.log --suppressions-list=cppcheck.supp --library=qt.cfg --library=posix.cfg . 2> >(tee error.log >&2)
perl scripts/warnings.pl error.log perl scripts/warnings.pl error.log
buildLinux: buildLinux:
@@ -85,7 +84,6 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: | run: |
sudo apt install doxygen graphviz libglu1-mesa-dev libopus-dev libsodium-dev libpulse-dev libdbus-1-dev libevent-dev sudo apt install doxygen graphviz libglu1-mesa-dev libopus-dev libsodium-dev libpulse-dev libdbus-1-dev libevent-dev
pip3 install tee
sudo cpan Path::Class sudo cpan Path::Class
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v2 uses: actions/checkout@v2
@@ -105,11 +103,11 @@ jobs:
- name: Build swift (without symbols) - name: Build swift (without symbols)
if: ${{ ! (env.do_symbols == 'true' && env.do_vatsim_key == 'true') }} if: ${{ ! (env.do_symbols == 'true' && env.do_vatsim_key == 'true') }}
run: | run: |
python3 -u scripts/build.py -w 64 -t gcc -d -j2 -e $eol_months -q "SWIFT_CONFIG_JSON+=$vatsim_key_file" python3 -u scripts/build.py -w 64 -t gcc -d -j2 -e $eol_months -q "SWIFT_CONFIG_JSON+=$vatsim_key_file" 2> >(tee error.log >&2)
- name: Build swift (with symbols) - name: Build swift (with symbols)
if: ${{ env.do_symbols == 'true' && env.do_vatsim_key == 'true' }} if: ${{ env.do_symbols == 'true' && env.do_vatsim_key == 'true' }}
run: | run: |
python3 -u scripts/build.py -w 64 -t gcc -d -j2 -e $eol_months -q "SWIFT_CONFIG_JSON+=$vatsim_key_file" --upload python3 -u scripts/build.py -w 64 -t gcc -d -j2 -e $eol_months -q "SWIFT_CONFIG_JSON+=$vatsim_key_file" --upload 2> >(tee error.log >&2)
- name: Check warnings - name: Check warnings
id: warnings id: warnings
run: | run: |
@@ -153,7 +151,6 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: | run: |
choco install jom --yes choco install jom --yes
pip install tee
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v2 uses: actions/checkout@v2
with: with:
@@ -171,16 +168,18 @@ jobs:
VATSIM_KEY: ${{ secrets.VATSIM_KEY }} VATSIM_KEY: ${{ secrets.VATSIM_KEY }}
- name: Build swift (without symbols) - name: Build swift (without symbols)
if: ${{ ! (env.do_symbols == 'true' && env.do_vatsim_key == 'true') }} if: ${{ ! (env.do_symbols == 'true' && env.do_vatsim_key == 'true') }}
shell: bash
run: | run: |
python.exe -u scripts\build.py -w 64 -t msvc -d -e $env:eol_months -q "SWIFT_CONFIG_JSON+=$env:vatsim_key_file" python -u scripts/build.py -w 64 -t msvc -d -e $eol_months -q "SWIFT_CONFIG_JSON+=$vatsim_key_file" 2>&1 | tee error.log
- name: Build swift (with symbols) - name: Build swift (with symbols)
if: ${{ env.do_symbols == 'true' && env.do_vatsim_key == 'true' }} if: ${{ env.do_symbols == 'true' && env.do_vatsim_key == 'true' }}
shell: bash
run: | run: |
python.exe -u scripts\build.py -w 64 -t msvc -d -e $env:eol_months -q "SWIFT_CONFIG_JSON+=$env:vatsim_key_file" --upload python -u scripts/build.py -w 64 -t msvc -d -e $eol_months -q "SWIFT_CONFIG_JSON+=$vatsim_key_file" --upload 2>&1 | tee error.log
- name: Check warnings - name: Check warnings
id: warnings id: warnings
run: | run: |
perl scripts/warnings.pl error.log perl.exe scripts\warnings.pl error.log
- name: Upload installer - name: Upload installer
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
with: with:
@@ -220,7 +219,6 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: | run: |
choco install jom --yes choco install jom --yes
pip install tee
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v2 uses: actions/checkout@v2
with: with:
@@ -238,16 +236,18 @@ jobs:
VATSIM_KEY: ${{ secrets.VATSIM_KEY }} VATSIM_KEY: ${{ secrets.VATSIM_KEY }}
- name: Build swift (without symbols) - name: Build swift (without symbols)
if: ${{ ! (env.do_symbols == 'true' && env.do_vatsim_key == 'true') }} if: ${{ ! (env.do_symbols == 'true' && env.do_vatsim_key == 'true') }}
shell: bash
run: | run: |
python.exe -u scripts\build.py -w 32 -t msvc -d -e $env:eol_months -q "SWIFT_CONFIG_JSON+=$env:vatsim_key_file" python -u scripts/build.py -w 32 -t msvc -d -e $eol_months -q "SWIFT_CONFIG_JSON+=$vatsim_key_file" 2>&1 | tee error.log
- name: Build swift (with symbols) - name: Build swift (with symbols)
if: ${{ env.do_symbols == 'true' && env.do_vatsim_key == 'true' }} if: ${{ env.do_symbols == 'true' && env.do_vatsim_key == 'true' }}
shell: bash
run: | run: |
python.exe -u scripts\build.py -w 32 -t msvc -d -e $env:eol_months -q "SWIFT_CONFIG_JSON+=$env:vatsim_key_file" --upload python -u scripts/build.py -w 32 -t msvc -d -e $eol_months -q "SWIFT_CONFIG_JSON+=$vatsim_key_file" --upload 2>&1 | tee error.log
- name: Check warnings - name: Check warnings
id: warnings id: warnings
run: | run: |
perl scripts/warnings.pl error.log perl.exe scripts\warnings.pl error.log
- name: Upload installer - name: Upload installer
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
with: with:
@@ -292,7 +292,6 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: | run: |
pip3 install requests pip3 install requests
pip3 install tee
cpan Path::Class cpan Path::Class
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v2 uses: actions/checkout@v2
@@ -312,11 +311,11 @@ jobs:
- name: Build swift (without symbols) - name: Build swift (without symbols)
if: ${{ ! (env.do_symbols == 'true' && env.do_vatsim_key == 'true') }} if: ${{ ! (env.do_symbols == 'true' && env.do_vatsim_key == 'true') }}
run: | run: |
python3 -u scripts/build.py -w 64 -t clang -d -j2 -e $eol_months -q "SWIFT_CONFIG_JSON+=$vatsim_key_file" python3 -u scripts/build.py -w 64 -t clang -d -j2 -e $eol_months -q "SWIFT_CONFIG_JSON+=$vatsim_key_file" 2> >(tee error.log >&2)
- name: Build swift (with symbols) - name: Build swift (with symbols)
if: ${{ env.do_symbols == 'true' && env.do_vatsim_key == 'true' }} if: ${{ env.do_symbols == 'true' && env.do_vatsim_key == 'true' }}
run: | run: |
python3 -u scripts/build.py -w 64 -t clang -d -j2 -e $eol_months -q "SWIFT_CONFIG_JSON+=$vatsim_key_file" --upload python3 -u scripts/build.py -w 64 -t clang -d -j2 -e $eol_months -q "SWIFT_CONFIG_JSON+=$vatsim_key_file" --upload 2> >(tee error.log >&2)
- name: Check warnings - name: Check warnings
id: warnings id: warnings
run: | run: |

View File

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