-
Notifications
You must be signed in to change notification settings - Fork 6
90 lines (77 loc) · 2.58 KB
/
cpp.yml
File metadata and controls
90 lines (77 loc) · 2.58 KB
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
90
name: C++ CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest] # TO-DO: Add back windows-latest when the project is tested on a Windows machine.
fail-fast: false
continue-on-error: true
steps:
- uses: actions/checkout@v4
# Set up Python 3.10 or later
- name: Set up Python 3.10 (Windows)
if: matrix.os == 'windows-latest'
uses: actions/setup-python@v2
with:
python-version: '3.10'
# Install C++ Compiler & Build Tools
- name: Set up C++ environment (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y g++ make cmake libyaml-cpp-dev
g++ --version
cmake --version
make --version
- name: Set up C++ environment (macOS)
if: matrix.os == 'macos-latest'
run: |
brew install yaml-cpp
echo 'export PATH="/usr/local/opt/gcc/bin:$PATH"' >> ~/.bash_profile
source ~/.bash_profile
g++ --version
cmake --version
make --version
- name: Set up C++ environment (Windows)
if: matrix.os == 'windows-latest'
run: |
choco install mingw --version=8.1.0-1
choco install make cmake
echo C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw64\bin | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
echo C:\ProgramData\chocolatey\lib\cmake\bin | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
g++ --version
cmake --version
make --version
# Install Qt6
- name: Install Qt6 (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get install -y qt6-base-dev
echo 'export PATH="/usr/lib/qt6/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
- name: Install Qt6 (macOS)
if: matrix.os == 'macos-latest'
run: |
brew install qt6
echo 'export PATH="/opt/homebrew/opt/qt6/bin:$PATH"' >> ~/.bash_profile
source ~/.bash_profile
- name: Install Qt6 (Windows)
if: matrix.os == 'windows-latest'
run: |
python -m pip install aqtinstall
python -m aqt install-qt windows desktop 6.6.0 win64_mingw --outputdir C:\Qt
echo C:\Qt\6.6.0\mingw_64\bin | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
# Build the Project
- name: Build project
run: make build
# Install the Project
- name: Install project
run: |
cd ${{ github.workspace }}
make install