-
Notifications
You must be signed in to change notification settings - Fork 10
59 lines (47 loc) · 1.87 KB
/
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
name: Ubuntu Build
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
pull_request:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
# workflow_dispatch:
# env:
# # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
# BUILD_TYPE: Release
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
strategy:
matrix:
os: [ ubuntu-20.04, ubuntu-22.04 ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: "Apt update"
run: "sudo apt-get update"
- name: "Install dependencies Ubuntu 20.04"
if: matrix.os == 'ubuntu-20.04'
run: "sudo apt-get install build-essential qt5-default cmake libqt5svg5-dev qtmultimedia5-dev"
- name: "Install dependencies Ubuntu 22.04"
if: matrix.os == 'ubuntu-22.04'
run: "sudo apt-get install build-essential qt6-base-dev cmake libqt6svg6-dev qt6-multimedia-dev"
- name: "Create build directory and run CMake Ubuntu 20.04"
if: matrix.os == 'ubuntu-20.04'
run: "mkdir build && cd build && \
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr -DUSE_QT6='NO' .."
- name: "Create build directory and run CMake Ubuntu 22.04"
if: matrix.os == 'ubuntu-22.04'
run: "mkdir build && cd build && \
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr .."
- name: "Build"
run: "cd build && make"
- name: Prepare build artifacts
run: "cd build && make DESTDIR=install install"
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: build-install
path: build/install