-
-
Notifications
You must be signed in to change notification settings - Fork 77
77 lines (66 loc) · 2.33 KB
/
build.linux.workflow.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
name: Build Linux
on:
push:
branches: [ master, feature/github-actions ]
pull_request:
branches: [ master, feature/github-actions ]
release:
types: [published]
jobs:
build:
name: "Build: ${{ matrix.os }} - static ${{ matrix.statictype }}"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04]
statictype: [ON, OFF]
steps:
- name: Checkout Git Repo
uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: workaround for default apt mirror connectivity issues
run: |
sudo sed -i 's/azure\.//' /etc/apt/sources.list
- name: Install dependencies
run: |
set -e
sudo add-apt-repository universe
sudo apt update
sudo apt install -y cmake ninja-build libarchive-dev libzstd-dev zlib1g-dev libgl1-mesa-dev nettle-dev libacl1-dev liblz4-dev libc6-dev
- name: Install Qt
uses: jurplel/install-qt-action@43ec12788e42f375acfcb2cec059edfb9572fbaa # v3
with:
version: 6.6.1
target: desktop
setup-python: false
cache: true
- name: Build static libpng-apng dependency
run: |
set -e
cd gui/qt/capture ; /bin/bash ./get_libpng-apng.sh ; cd ../../../
- name: Build CEmu Qt in Release
run: |
set -e
mkdir build && cd build
cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DTRY_STATIC_LIBS=${{ matrix.statictype }} ../gui/qt
cmake --build . --target all
- name: Upload binary as artifact
uses: actions/upload-artifact@v3
with:
name: CEmu_linux_static${{ matrix.statictype }}_master
path: ${{ github.workspace }}/build/CEmu
- name: Prepare binary for release upload
if: ${{ matrix.statictype == 'ON' }}
run: |
mv ${{ github.workspace }}/build/CEmu ${{ github.workspace }}/build/CEmu-nightly_linux64_qt6
- name: Update nightly release
if: ${{ matrix.statictype == 'ON' && github.ref == 'refs/heads/master' && github.event_name != 'pull_request' }}
uses: softprops/action-gh-release@d4e8205d7e959a9107da6396278b2f1f07af0f9b # latest as of 2023-01-13
with:
tag_name: nightly
prerelease: true
token: ${{secrets.GITHUB_TOKEN}}
files: |
${{ github.workspace }}/build/CEmu-nightly_linux64_qt6