-
Notifications
You must be signed in to change notification settings - Fork 67
89 lines (85 loc) · 3.17 KB
/
linux-static.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
name: Linux Static
on:
# push代码时触发workflow
push:
# 忽略README.md
paths-ignore:
- "README.md"
- "LICENSE"
- "BUILD.md"
# pull_request时触发workflow
pull_request:
# 忽略README.md
paths-ignore:
- "README.md"
- "LICENSE"
- "BUILD.md"
release:
types: [published]
jobs:
check_commit_msg:
outputs:
commit_message: ${{ steps.get_message.outputs.message }}
name: Check if the workflow has been disabled.
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get commit message
id: get_message
run: |
echo "message=$(git log --format=%B -n 1 ${{ github.event.after }})" >> $GITHUB_OUTPUT
linux:
strategy:
fail-fast: false
matrix:
build_type: [Release, RelWithDebInfo]
needs: check_commit_msg
if: ${{ !contains( needs.check_commit_msg.outputs.commit_message, 'NO_DEB') }}
name: Linux Static ${{ matrix.build_type }}
runs-on: ubuntu-20.04
steps:
- name: Get the version
id: get_version
shell: bash
run: echo "VERSION=$(echo $GITHUB_REF | cut -d / -f 3)" >> $GITHUB_OUTPUT
- name: Checking out sources
uses: actions/checkout@v4
with:
submodules: "recursive"
- name: Install build dependencies
run: |
sudo apt update
sudo apt install -y build-essential ninja-build cmake pkgconf bash
sudo apt install -y libgl1-mesa-dev libglu1-mesa-dev
sudo apt install -y libfontconfig1-dev libfreetype6-dev libx11-dev libx11-xcb-dev libxext-dev libxfixes-dev libxi-dev libxrender-dev libxcb1-dev libxcb-glx0-dev libxcb-keysyms1-dev libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev libxcb-sync0-dev libxcb-xfixes0-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0-dev libxcb-xinerama0-dev libxkbcommon-dev libxkbcommon-x11-dev
sudo apt install -y libharfbuzz-dev libsm-dev libdrm-dev
sudo apt install -y libspdlog-dev
- name: Install Qt
run: |
cd ..
wget https://github.com/Project-LemonLime/qt5ci/releases/latest/download/qt-5.15.3-kde-static-linux.tar.gz
tar -zxvf qt-5.15.3-kde-static-linux.tar.gz
- name: Build
run: |
cd ..
mkdir build
cd build
cmake ../Project_LemonLime -GNinja -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DLEMON_BUILD_INFO="Build for Linux" -DLEMON_BUILD_EXTRA_INFO="Build on $(uname -sr)" -DCMAKE_PREFIX_PATH=../qt
cmake --build . --target package --parallel $(nproc)
cd ..
cd Project_LemonLime
cp ../build/lemon ./
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: LemonLime-linux-x86_64-${{ matrix.build_type }}
path: lemon
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v1-release
if: startsWith(github.event.ref, 'refs/tags/')
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: lemon
asset_name: LemonLime-linux-x86_64-${{ matrix.build_type }}
tag: ${{ github.ref }}
overwrite: true