Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tidy up and first stab at Mac packaging fixes #69

Merged
merged 99 commits into from
Dec 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
a0cdac2
Mostly adding new fields to Hop
Sep 29, 2022
57b6892
JSON parsing corrections
Oct 2, 2022
f3bea99
Tidy up (mostly)
Oct 4, 2022
9cea4bd
Now at the point of being able to read in hop records
Oct 13, 2022
7a851db
Various tidy-ups, plus steps towards writing BeerJSON
Oct 29, 2022
5e44991
Fixes for missing and wrong proportion country flags in languages lis…
Oct 29, 2022
472879f
Improve logic for determining resource directory, plus fix checking f…
Nov 2, 2022
1114840
Tidy up and first stab at Mac packaging fixes
Nov 8, 2022
8e72e91
More on Mac packaging fixes
Nov 8, 2022
3e4215d
Fix for pre 5.15 versions of Qt
Nov 8, 2022
6c8bcb8
Start-up logging fixes, and further inching forward on fixing Mac build
Nov 9, 2022
2a86930
Mac build experiments continue
Nov 9, 2022
b1ef8aa
Mac build experiments part 3
Nov 9, 2022
f27f5e3
Mac build experiments part 4
Nov 9, 2022
d6e56da
Mac build experiments part 5
Nov 9, 2022
3859fbe
Mac build experiments part 6
Nov 9, 2022
9b6624d
Mac build experiments part 7
Nov 9, 2022
7f56d34
Mac build experiments part 8
Nov 10, 2022
69eb6dc
Mac build experiments part 9
Nov 10, 2022
357640c
Mac build experiments part 10
Nov 10, 2022
dde24a3
Mac build experiments part 11
Nov 11, 2022
e7d2eb9
Mac build experiments part 12
Nov 11, 2022
c57f603
Mac build experiments part 13
Nov 11, 2022
6b512ae
Mac build experiments part 14
Nov 11, 2022
5ce9d51
Mac build experiments part 15
Nov 12, 2022
897fc3b
Mac build experiments part 16
Nov 12, 2022
33e6464
Mac build experiments part 17
Nov 12, 2022
2848362
Mac build experiments part 18
Nov 12, 2022
5e6bc8f
Mac build experiments part 19
Nov 12, 2022
e9fe2f7
Mac build experiments part 20
Nov 13, 2022
ec4e9cf
Mac build experiments part 21
Nov 14, 2022
becc954
Mac build experiments part 22
Nov 14, 2022
e6b65fe
Mac build experiments part 23
Nov 14, 2022
e8ef18a
Mac build experiments part 24
Nov 14, 2022
71766c3
Mac build experiments part 25
Nov 14, 2022
c10a881
Mac build experiments part 26
Nov 14, 2022
883a6b1
Mac build experiments part 27
Nov 14, 2022
9aa00bc
Mac build experiments part 28
Nov 15, 2022
926fdab
Mac build experiments part 29
Nov 16, 2022
bc02d32
Mac build experiments part 30
Nov 16, 2022
afa2e9d
Mac build experiments part 31
Nov 16, 2022
473c36b
Mac build experiments part 32
Nov 16, 2022
7d89c71
Mac build experiments part 33
Nov 16, 2022
7cfff38
Mac build experiments part 34
Nov 16, 2022
d7ac538
Mac build experiments part 35
Nov 17, 2022
55e63a7
Mac build experiments part 36
Nov 18, 2022
45a047f
Mac build experiments part 37
Nov 18, 2022
73671f8
Mac build experiments part 38
Nov 18, 2022
ddf23a5
Mac build experiments part 39
Nov 18, 2022
75685e3
Mac build experiments part 40
Nov 18, 2022
32eeafb
Mac build experiments part 41
Nov 19, 2022
af6e44c
Mac build experiments part 42
Nov 19, 2022
af1dde9
Mac build experiments part 43
Nov 19, 2022
5f89136
Mac build experiments part 44
Nov 19, 2022
044c805
Mac build experiments part 45
Nov 19, 2022
3bdd353
Mac build experiments part 46
Nov 19, 2022
39f30c1
Mac build experiments part 47
Nov 19, 2022
c5e7baa
Mac build experiments part 48
Nov 19, 2022
47a6b65
Mac build experiments part 49 (seems working!)
Nov 20, 2022
4b6bb64
Mac build experiments part 50
Nov 20, 2022
96c8d40
Mac build experiments part 51, plus fix-up Linux desktop icon etc loc…
Nov 20, 2022
c5b55b2
Mac build experiments part 52
Nov 20, 2022
b5980c9
Mac build experiments part 53
Nov 21, 2022
511840a
Minor tidy-up plus experimental meson build
Nov 23, 2022
1c723de
Tidy up and fix build warnings (since meson builds with more warnings…
Nov 25, 2022
7ca3513
Windows build error
Nov 25, 2022
2e61ef6
Windows build error - second time lucky
Nov 25, 2022
2d70dab
Windows build error - third time lucky
Nov 25, 2022
e86a5cf
More on Meson build plus fix for https://github.com/Brewtarget/brewta…
Nov 26, 2022
0f148ba
Allow unit tests to run concurrently
Nov 27, 2022
b0a4979
More progress on Meson, but packaging not yet working
Nov 27, 2022
05798c3
Meson build (mostly working on Linux) EXCEPT packaging still to do
Dec 4, 2022
b4932c7
Fixes for Meson in GitHub actions
Dec 4, 2022
6668d9d
Fixes for Meson in GitHub actions - pt 2
Dec 4, 2022
d0f23ef
Fixes for Meson in GitHub actions - pt 3
Dec 4, 2022
5c63339
Fixes for Meson in GitHub actions - pt 4
Dec 4, 2022
3aa5122
Fixes for Meson in GitHub actions - pt 5
Dec 4, 2022
9eefe19
Fixes for Meson in GitHub actions - pt 6
Dec 4, 2022
a554a92
More on Meson build & packaging, plus fix for https://github.com/Brew…
Dec 9, 2022
2725ac8
Build fix for older Ubuntus
Dec 9, 2022
42233de
Linux build setup fix
Dec 10, 2022
27af7d4
Fix for https://github.com/Brewtarget/brewtarget/issues/688
Dec 10, 2022
1228dad
Linux automated build diagnostic
Dec 11, 2022
0d467fa
Tidy up and fix for Ubunto 20.04
Dec 11, 2022
a378960
Tidy up and fix for Ubunto 20.04 - attempt #2
Dec 11, 2022
5d12a1d
Tidy up and fix for Ubunto 20.04 - attempt #3 (plus some comments on …
Dec 11, 2022
d40ca56
Tidy up and fix for Ubunto 20.04 - attempt #4
Dec 11, 2022
e68ad42
Tidy up and fix for Ubunto 20.04 - attempt #5
Dec 12, 2022
320619a
Tidy up and fix for Ubunto 20.04 - attempt #6
Dec 12, 2022
36e8e77
Tidy up and fix for Ubunto 20.04 - attempt #7 (diagnostic)
Dec 12, 2022
8456670
Tidy up and fix for Ubunto 20.04 - attempt #8
Dec 12, 2022
f18fea5
Improvements to bt script
Dec 14, 2022
f0d4f41
More on install scripts etc
Dec 14, 2022
440e3a2
More on install scripts etc - pt 2
Dec 14, 2022
f3b4ee5
More on install scripts etc - pt 3
Dec 15, 2022
fb721ff
More on install scripts etc - pt 4
Dec 15, 2022
1c56c30
More on install scripts etc - pt 5
Dec 15, 2022
1c7fb85
More on install scripts etc - pt 6
Dec 15, 2022
7a66c8e
More on install scripts etc - pt 7
Dec 15, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
122 changes: 95 additions & 27 deletions .github/workflows/linux-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,44 +35,92 @@ 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.
#
os: [ubuntu-20.04, ubuntu-22.04]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0

#
# See https://github.com/Brewken/brewken/wiki/Development:-Getting-Started for more on what is needed to build
# the software. It seems we can assume the following packages are already installed:
# cmake
# git
# debhelper
# rpm
#
# Note that we need CMake even for the Meson build because meson uses CMake as one of its library-finding tools
#
# Some of the things below could be installed via actions (jurplel/install-qt-action@v3) but there's an advantage,
# where we can, in doing the exact same steps that give as instructions to developers to set up their build
# environment.
#
# Note that we need Python 3.10 or newer, which means you can't just use `sudo apt install` on older Ubuntus. (Eg
# Ubuntu 18.04 packages have only Python 3.6.7 and Ubuntu 20.04 only have Python 3.8.2. However Ubuntu 22.04 has
# Python 3.10.6.) There are ways to get around this, but, in this context, it's simplest to use a canned GitHub
# action.
#
# Similarly, Ubuntu 20.04 packages only have Meson 0.53.2, and we need 0.56.0 or later. In this case it means we
# have to install Meson via pip, which is not ideal on Linux (per comments in meson.build).
# sudo apt-get update && sudo apt-get install -y \
# libqt5multimedia5-plugins \
# libqt5sql5-psql \
# libqt5sql5-sqlite \
# libqt5svg5-dev \
# libxalan-c-dev \
# libxerces-c-dev \
# lintian \
# meson \
# ninja-build \
# python3 \
# 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.80.0/source/boost_1_80_0.tar.bz2
# tar --bzip2 -xf boost_1_80_0.tar.bz2
# cd boost_1_80_0
# ./bootstrap.sh
# sudo ./b2 install
# cd ~
# sudo rm -rf ~/boost-tmp
#
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install Frameworks and Libraries
working-directory: ${{github.workspace}}
shell: bash
run: |
pwd
./bt -v setup all
if [[ $(lsb_release -r | awk '{print $2}' | awk -F. '{print $1}') -lt 22 ]]
then
sudo apt remove -y meson
sudo pip3 install meson
fi
ls -l /usr/local/lib/libboost_*

- name: Setup Build Environment (New)
working-directory: ${{github.workspace}}
# I'm sure there's a better way to invoke this script, but I haven't yet discovered it
shell: bash
run: |
sudo apt-get update && sudo apt-get install -y \
libqt5multimedia5-plugins \
libqt5sql5-psql \
libqt5sql5-sqlite \
libqt5svg5-dev \
libxalan-c-dev \
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
export BOOST_ROOT=/usr
ls -l /usr/lib
python3 bt setup

- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/build
Expand All @@ -96,6 +144,13 @@ jobs:
find ../third-party
make

- name: Build (New)
working-directory: ${{github.workspace}}/mbuild
shell: bash
run: |
pwd
meson compile

- name: Test
working-directory: ${{github.workspace}}/build
shell: bash
Expand All @@ -105,13 +160,26 @@ jobs:
run: |
make test

- name: Test (New)
working-directory: ${{github.workspace}}/mbuild
shell: bash
run: |
meson test

- name: Package
working-directory: ${{github.workspace}}/build
shell: bash
run: |
umask 022
make package

- name: Package (New)
working-directory: ${{github.workspace}}/mbuild
shell: bash
run: |
umask 022
../bt package

- name: LintianAndRpmLint
continue-on-error: true
working-directory: ${{github.workspace}}/build
Expand All @@ -120,7 +188,7 @@ jobs:

- name: Upload Linux Packages (Installers)
if: ${{ success() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: brewken-${{matrix.os}}
path: |
Expand All @@ -134,7 +202,7 @@ jobs:

- 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
58 changes: 47 additions & 11 deletions .github/workflows/mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,33 +38,60 @@ 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 Python
# TBD We could probably also install this with brew below
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Install dependencies
#
# Installing Xalan-C will cause Xerces-C to be installed too (as the former depends on the latter)
#
# Similarly, installing meson will cause ninja to be installed (and confirm that Python is installed)
#
# .: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 meson
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
cmake ..
make
ls -ltr

- name: Prep for tests
# If a test fails and we get a core, we'd like to analyse it. This will be easier if we have access to the
Expand Down Expand Up @@ -93,52 +120,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
ls -ltr
pwd
tree -sh

- name: Upload Mac Packages (Installers)
if: ${{ success() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: brewken-dev-mac
path: |
${{github.workspace}}/build/brewken*.dmg
${{github.workspace}}/build/brewken*.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
9 changes: 6 additions & 3 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
]
steps:

- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
path: temp
fetch-depth: 0
Expand All @@ -62,7 +62,10 @@ jobs:
mingw-w64-${{ matrix.arch }}-gcc
mingw-w64-${{ matrix.arch }}-libbacktrace
mingw-w64-${{ matrix.arch }}-make
mingw-w64-${{ matrix.arch }}-meson
mingw-w64-${{ matrix.arch }}-ninja
mingw-w64-${{ matrix.arch }}-nsis
mingw-w64-${{ matrix.arch }}-python
mingw-w64-${{ matrix.arch }}-qt5
mingw-w64-${{ matrix.arch }}-xalan-c
mingw-w64-${{ matrix.arch }}-xerces-c
Expand Down Expand Up @@ -115,7 +118,7 @@ jobs:

- name: Upload Windows binaries (installers)
if: ${{ success()}}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: brewken-dev-${{ matrix.msystem }}
path: |
Expand All @@ -125,7 +128,7 @@ jobs:

- 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