-
-
Notifications
You must be signed in to change notification settings - Fork 79
82 lines (71 loc) · 3.17 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
78
79
80
81
82
name: Build Linux
on:
push:
branches: [ master, feature/github-actions, feature/python ]
pull_request:
branches: [ master, feature/github-actions, feature/python ]
jobs:
build:
name: "Build: ${{ matrix.os }} - ${{ matrix.qtver }}"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04]
arch: [x64]
config: [Release]
statictype: [ON, OFF]
include:
- statictype: ON
qtver: Qt6
host_triplet: release
release_suffix: static
- statictype: OFF
qtver: Qt6-Dynamic
host_triplet: dynamic-apng-release
release_suffix: shared
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 apt install -y autoconf automake autoconf-archive '^libxcb.*-dev' libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev libegl1-mesa-dev libudev-dev libusb-1.0-0-dev
- name: Install latest CMake
uses: lukka/get-cmake@a70f1cfa1857a3eecfe0d34962269e1b1e8be56c # latest as of 2024-08-08
- name: Restore artifacts, or setup vcpkg (do not install any package)
uses: lukka/run-vcpkg@d87e7fac99f22776a4973d7e413921ea254c1fc9 # latest as of 2024-08-08
with:
vcpkgJsonGlob: '**/gui/qt/vcpkg.json'
- name: Build CEmu ${{ matrix.qtver }} ${{ matrix.config }} on Linux ${{ matrix.arch }}
uses: lukka/run-cmake@4b1adc1944be8367be9f4e08303ce49918db8e3c # latest as of 2024-08-08
with:
cmakeListsTxtPath: '${{ github.workspace }}/gui/qt/CMakeLists.txt'
configurePreset: 'Linux-${{ matrix.arch }}-${{ matrix.qtver }}'
configurePresetAdditionalArgs: "['-DDEPS_RELEASE_ONLY=ON', '-DSHORT_VERSION=v3.0']"
buildPreset: 'Linux-${{ matrix.arch }}-${{ matrix.qtver }}-${{ matrix.config }}'
env:
VCPKG_DEFAULT_HOST_TRIPLET: ${{ matrix.arch }}-linux-${{ matrix.host_triplet }}
VCPKG_FORCE_SYSTEM_BINARIES: 1
- name: Upload binary as artifact
uses: actions/upload-artifact@v3
with:
name: CEmu_linux_${{ matrix.qtver }}_master
path: ${{ github.workspace }}/gui/qt/CEmu.build/Linux-${{ matrix.arch }}-${{ matrix.qtver }}/${{ matrix.config }}/CEmu
- name: Prepare binary for release upload
run: |
mv ${{ github.workspace }}/gui/qt/CEmu.build/Linux-${{ matrix.arch }}-${{ matrix.qtver }}/${{ matrix.config }}/CEmu ${{ github.workspace }}/CEmu-nightly_linux64_qt6_${{ matrix.release_suffix }}
- name: Update nightly release
if: ${{ 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 }}/CEmu-nightly_linux64_qt6_${{ matrix.release_suffix }}