-
Notifications
You must be signed in to change notification settings - Fork 0
86 lines (72 loc) · 2.78 KB
/
cmake-multi-platform.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
name: CMake Build
on:
push:
branches: [ main ]
workflow_dispatch:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
c_compiler: gcc
cpp_compiler: g++
build_type: Release
- os: ubuntu-latest
c_compiler: gcc
cpp_compiler: g++
build_type: Release
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: '5.15.2'
- name: Create Build Directory
run: mkdir build
- name: Configure CMake
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} -DZLIB_TAG=develop -DMZ_FORCE_FETCH_LIBS=ON
- name: Build with CMake
run: cmake --build build --config ${{ matrix.build_type }}
- name: Deploy (Linux)
if: runner.os == 'Linux'
run: |
sudo wget -O /tmp/cqtdeployer.deb https://github.com/QuasarApp/CQtDeployer/releases/download/v1.6.2351/CQtDeployer_1.6.2351.ec4840f_Linux_x86_64.deb
sudo dpkg -i /tmp/cqtdeployer.deb
cqtdeployer -bin ${{ github.workspace }}/build/SnakeQT -targetDir FileDistributionKit
shell: bash
- uses: actions/upload-artifact@v4
if: runner.os == 'Linux'
with:
name: Linux_Files
path: FileDistributionKit/*
- name: Deploy (Linux)
if: runner.os == 'Linux'
run: |
sudo wget -O /tmp/cqtdeployer.deb https://github.com/QuasarApp/CQtDeployer/releases/download/v1.6.2351/CQtDeployer_1.6.2351.ec4840f_Linux_x86_64.deb
sudo dpkg -i /tmp/cqtdeployer.deb
cqtdeployer -bin ${{ github.workspace }}/build/SnakeQT qif -targetDir InstallerDistributionKit
shell: bash
- uses: actions/upload-artifact@v4
if: runner.os == 'Linux'
with:
name: Linux_Installer
path: InstallerDistributionKit/*
- name: Deploy (Windows)
if: runner.os == 'Windows'
run: |
$url = "https://github.com/QuasarApp/CQtDeployer/releases/download/v1.6.2351/CQtDeployer_1.6.2351.ec4840f_Windows_AMD64.zip"
$output = "cqtdeployer.zip"
Invoke-WebRequest -Uri $url -OutFile $output
Expand-Archive -Path $output -DestinationPath .\cqtdeployer
.\cqtdeployer\cqtdeployer -bin ${{ github.workspace }}/build/Release/SnakeQT.exe -targetDir FileDistributionKit
shell: pwsh
- uses: actions/upload-artifact@v4
if: runner.os == 'Windows'
with:
name: Windows_Files
path: FileDistributionKit/*