forked from Brewtarget/brewtarget
-
Notifications
You must be signed in to change notification settings - Fork 0
124 lines (113 loc) · 3.48 KB
/
linux-ubuntu.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
name: Linux
on:
push:
branches:
- develop
- "stable/**"
pull_request:
branches:
- develop
schedule:
- cron: "0 2 * * *"
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
#
# 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@v3
with:
fetch-depth: 0
- name: Dependencies
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
- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/build
- name: Configure CMake
shell: bash
working-directory: ${{github.workspace}}/build
run: |
umask 022
cmake \
DESTDIR=/usr \
-DDO_RELEASE_BUILD=ON \
-DNO_MESSING_WITH_FLAGS=ON \
$GITHUB_WORKSPACE
- name: Build
working-directory: ${{github.workspace}}/build
shell: bash
run: |
make
- name: Test
working-directory: ${{github.workspace}}/build
shell: bash
env:
CTEST_OUTPUT_ON_FAILURE: TRUE
QT_QPA_PLATFORM: minimal
run: |
make test
- name: Package
working-directory: ${{github.workspace}}/build
shell: bash
run: |
umask 022
make package
- name: LintianAndRpmLint
continue-on-error: true
working-directory: ${{github.workspace}}/build
shell: bash
run: make package_lint
- name: Upload Linux Packages (Installers)
if: ${{ success() }}
uses: actions/upload-artifact@v3
with:
name: brewtarget-${{matrix.os}}
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@v3
with:
name: build-results-${{matrix.os}}
path: build
retention-days: 1