Skip to content

Commit

Permalink
Merge pull request #1 from Brewtarget/develop
Browse files Browse the repository at this point in the history
Merge back
  • Loading branch information
matty0ung authored Nov 27, 2022
2 parents e9d454d + 9ba8b9d commit ccc35d3
Show file tree
Hide file tree
Showing 273 changed files with 63,822 additions and 189,475 deletions.
75 changes: 44 additions & 31 deletions .github/workflows/linux-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,34 +16,48 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-18.04, ubuntu-latest]
#
# See https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources
# for info on runner images
#
# Usually "ubuntu-latest" is the most recent LTS version of Ubuntu, but there can be a bit of lag between a new
# LTS release and the update of ubuntu-latest (eg in October 2022, it was still Ubuntu 20.04 rather than 22.04.
# So we explicitly specify here which versions we want to build on.
#
# Note that ubuntu-18.04 is deprecated and we need to remove it by April 2023
#
os: [ubuntu-18.04, ubuntu-20.04, ubuntu-22.04]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Dependencies
shell: bash
run: |
sudo apt-get update && sudo apt-get install -y \
qtbase5-dev \
qttools5-dev \
qttools5-dev-tools \
qtmultimedia5-dev \
libqt5sql5-sqlite \
libqt5multimedia5-plugins \
libqt5sql5-psql \
libqt5sql5-sqlite \
libqt5svg5-dev \
libqt5multimedia5-plugins \
lintian \
rpmlint \
libxerces-c-dev \
libxalan-c-dev \
libboost-all-dev
- name: Apply Patches
shell: bash
working-directory: ${{github.workspace}}
run: ./build-scripts/linux/apply-patches.sh $GITHUB_WORKSPACE
libxerces-c-dev \
lintian \
qtbase5-dev \
qtmultimedia5-dev \
qttools5-dev \
qttools5-dev-tools \
rpmlint
cd ~
mkdir ~/boost-tmp
cd ~/boost-tmp
wget https://boostorg.jfrog.io/artifactory/main/release/1.79.0/source/boost_1_79_0.tar.bz2
tar --bzip2 -xf boost_1_79_0.tar.bz2
cd boost_1_79_0
./bootstrap.sh --prefix=/usr
sudo ./b2 install
cd ~
sudo rm -rf ~/boost-tmp
- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/build
Expand All @@ -54,10 +68,9 @@ jobs:
run: |
umask 022
cmake \
DESTDIR=/usr \
-DDO_RELEASE_BUILD=ON \
-DNO_QTMULTIMEDIA=ON \
-DNO_MESSING_WITH_FLAGS=ON \
-DEXEC_PREFIX=/usr \
$GITHUB_WORKSPACE
- name: Build
Expand All @@ -82,29 +95,29 @@ jobs:
umask 022
make package
- name: Lintian
continue-on-error: true
working-directory: ${{github.workspace}}/build
shell: bash
run: lintian --profile debian --pedantic *.deb | less

- name: rpmlint
- name: LintianAndRpmLint
continue-on-error: true
working-directory: ${{github.workspace}}/build
shell: bash
run: rpmlint *.rpm | less
run: make package_lint

- name: Upload Brewtarget Installers
- name: Upload Linux Packages (Installers)
if: ${{ success() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: brewtarget-${{matrix.os}}
path: build/brewtarget*
path: |
build/brewtarget*.rpm
build/brewtarget*.rpm.sha256
build/brewtarget*.deb
build/brewtarget*.deb.sha256
build/brewtarget*.tar.bz2
build/brewtarget*.tar.bz2.sha256
retention-days: 7

- name: Recover Debris Artifacts
if: ${{ failure() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: build-results-${{matrix.os}}
path: build
Expand Down
51 changes: 40 additions & 11 deletions .github/workflows/mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,27 +22,45 @@ jobs:

steps:

- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Install Qt
uses: jurplel/install-qt-action@v2
# Version 5.15.2 is, according to https://github.com/jurplel/install-qt-action, the last Qt 5 LTS
# When we're ready to migrate to Qt 6, we'll need to tweak this
uses: jurplel/install-qt-action@v3
with:
version: 5.9.5
version: 5.15.2

- name: Install dependencies
#
# Installing Xalan-C will cause Xerces-C to be installed too (as the former depends on the latter)
# .:TBD:. Installing Boost here doesn't seem to give us libboost_stacktrace_backtrace
# Also, trying to use the "--cc=clang" option to install boost gives an error ("Error: boost: no bottle
# available!") For the moment, we're just using Boost header files on Mac though, so this should be OK.
#
# The `brew doctor` command just checks that Homebrew (https://brew.sh/) is installed OK (expected output is "Your
# system is ready to brew". Having Homebrew installed should imply the Xcode Command Line Tools are also
# installed, but `xcode-select -p` confirms this (expected output "/Library/Developer/CommandLineTools"). As
# elsewhere we use the echo trick to ensure that a non-zero return value from these diagnostic commands is not
# treated as a build script failure.
#
# We use the tree command for diagnosing certain build problems (specifically to see what changes certain parts of
# the build have made to the build directory tree). (If need be, you can also download the entire build directory
# within a day of a failed build running, but you need a decent internet connection for this as it's quite large.)
#
run: |
echo "Output from brew doctor: $(brew doctor)"
echo "Output from xcode-select -p: $(xcode-select -p)"
brew install xalan-c
brew install boost
brew install tree
- name: Build
env:
QT_QPA_PLATFORM: offscreen
# Change `make` to `make VERBOSE=1` to get hugely detailed output
run: |
mkdir build
cd build
Expand Down Expand Up @@ -76,50 +94,61 @@ jobs:
ctest --extra-verbose --output-on-failure 2>&1
- name: Make package
# Change `make package` to `make package VERBOSE=1` to get hugely detailed output
run: |
cd build
pwd
make package
pwd
tree -sh
- name: Upload Mac
- name: Upload Mac Packages (Installers)
if: ${{ success() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: brewtarget-dev-mac
path: |
${{github.workspace}}/build/brewtarget*.sh
${{github.workspace}}/build/brewtarget*.dmg
${{github.workspace}}/build/brewtarget*.dmg.sha256
retention-days: 7

- name: Post-processing on cores
- name: Post-processing on any core dump
if: ${{ failure() }}
# It's all very well capturing core files, but if you don't have a Mac to analyse them on they are not a fat lot
# of use. So, if we did get a core, let's at least get a stack trace out of it.
#
# The loop in the last line should run either 0 or 1 times, depending on whether the build failure did or did not
# generate a core file.
# ls -1 | while read ii; do echo "bt" | lldb -c $ii; done
run: |
pwd
tree -sh
sudo chmod -R +rwx /cores
sudo chmod -R +rwx /Library/Logs/DiagnosticReports
echo "Contents of /cores directory: $(ls -ltr /cores)"
echo "Contents of /Library/Logs/DiagnosticReports directory: $(ls -ltr /Library/Logs/DiagnosticReports)"
cd /cores
echo "bt" | lldb -c $(ls -1)
ls -1 | while read ii; do echo "bt" | lldb -c $ii; done
- name: Recover Debris Artifacts (aka build output)
if: ${{ failure() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: build-results
path: ${{github.workspace}}/build
retention-days: 1

- name: Recover DiagnosticReports (if any)
if: ${{ failure() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: DiagnosticReports
path: /Library/Logs/DiagnosticReports
retention-days: 1

- name: Recover Cores (if any)
if: ${{ failure() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: cores
path: /cores
Expand Down
48 changes: 27 additions & 21 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,26 @@ jobs:
]
steps:

- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
path: temp
fetch-depth: 0
submodules: recursive

- uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.msystem }}
install: >-
mingw-w64-${{ matrix.arch }}-boost
mingw-w64-${{ matrix.arch }}-cmake
mingw-w64-${{ matrix.arch }}-make
mingw-w64-${{ matrix.arch }}-doxygen
mingw-w64-${{ matrix.arch }}-gcc
mingw-w64-${{ matrix.arch }}-libbacktrace
mingw-w64-${{ matrix.arch }}-make
mingw-w64-${{ matrix.arch }}-nsis
mingw-w64-${{ matrix.arch }}-qt5
mingw-w64-${{ matrix.arch }}-xalan-c
mingw-w64-${{ matrix.arch }}-nsis
mingw-w64-${{ matrix.arch }}-boost
mingw-w64-${{ matrix.arch }}-libbacktrace
mingw-w64-${{ matrix.arch }}-xerces-c
update: true
release: true
path-type: strict
Expand All @@ -65,41 +68,44 @@ jobs:
- name: CMake config
shell: msys2 {0}
run: |
cd /C/_/build
cp ./Locate/Include/Locate.nsh /mingw32/share/nsis/Include/
cp ./Locate/Plugin/locate.dll /mingw32/share/nsis/Plugins/ansi/
cp ./Nsislog/plugin/nsislog.dll /mingw32/share/nsis/Plugins/ansi
cmake .. -DCMAKE_RC_COMPILER:FILEPATH=windres.exe -G "MinGW Makefiles"
cd /C/_/build
cp ./Locate/Include/Locate.nsh /mingw32/share/nsis/Include/
cp ./Locate/Plugin/locate.dll /mingw32/share/nsis/Plugins/ansi/
cp ./Nsislog/plugin/nsislog.dll /mingw32/share/nsis/Plugins/ansi
cmake .. -DCMAKE_RC_COMPILER:FILEPATH=windres.exe -G "MinGW Makefiles"
- name: Build
shell: msys2 {0}
run: |
cd /C/_/build
cmake --build .
cd /C/_/build
pwd
cmake --build .
- name: Test
shell: msys2 {0}
run: |
cd /C/_/build
cmake --build . --target test
cd /C/_/build
cmake --build . --target test
- name: Package
shell: msys2 {0}
run: |
cd /C/_/build
cmake --build . --target package
cd /C/_/build
cmake --build . --target package --verbose
- name: "Upload binaries"
- name: Upload Windows binaries (installers)
if: ${{ success()}}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: brewtarget-dev-${{ matrix.msystem }}
path: C:/_/build/brewtarget*.exe
path: |
C:/_/build/brewtarget*.exe
C:/_/build/brewtarget*.exe.sha256
retention-days: 7

- name: "Upload error build"
- name: Upload error info from failed build
if: ${{ failure() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.msystem }}-build
path: C:/_/build/
Expand Down
Loading

0 comments on commit ccc35d3

Please sign in to comment.