-
Notifications
You must be signed in to change notification settings - Fork 215
107 lines (91 loc) · 3.28 KB
/
main.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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
name: ROS Qt Creator plugin build and archive release
on:
push:
paths-ignore: ["**.md"]
pull_request:
paths-ignore: ["**.md"]
jobs:
build:
name: build (${{ matrix.config.name }})
runs-on: ${{ matrix.config.os }}
strategy:
matrix:
config:
- { name: "Linux", os: ubuntu-20.04, build: "RelWithDebInfo" }
- { name: "Windows", os: windows-latest, build: "Release" }
- { name: "macOS", os: macos-14, build: "Release" }
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: install Microsoft Visual C++ (Windows)
uses: ilammy/msvc-dev-cmd@v1
if: runner.os == 'Windows'
- name: install Linux system dependencies
if: runner.os == 'Linux'
run: |
sudo apt update
sudo apt install libgl1-mesa-dev ninja-build libutf8proc-dev libcups2-dev
sudo apt install desktop-file-utils
- name: install Windows system dependencies
if: runner.os == 'Windows'
run: |
choco install ninja
- name: install macOS system dependencies
if: runner.os == 'macOS'
run: brew install ninja
- name: install Qt and Qt Creator
shell: bash
run: |
pip install pyyaml requests py7zr==0.21 tqdm_loggable
python install-sdk.py --export_variables
cat env >> $GITHUB_ENV
- name: build plugin
run: |
cmake -B build -GNinja -DCMAKE_BUILD_TYPE=${{ matrix.config.build }} -DCMAKE_PREFIX_PATH="${{ env.QTC_PATH }};${{ env.QT_PATH }}" -DBUILD_ROSTERMINAL=OFF
cmake --build build --target package
- name: upload artifact
uses: actions/upload-artifact@v4
with:
name: plugin_archive_artifact_${{ matrix.config.name }}
if-no-files-found: error
path: |
./build/ROSProjectManager-*-*-*.zip
- name: install Qt Creator DEB package
if: runner.os == 'Linux'
run: |
wget $(./packaging/format-deb-url.py) --directory-prefix=${GITHUB_WORKSPACE}/build
sudo apt install ${GITHUB_WORKSPACE}/build/qtcreator-opensource-linux-*-*.deb
- name: generate plugin DEB package
if: runner.os == 'Linux'
run: |
cd build
cpack -G DEB
- name: upload artifact (DEB)
if: runner.os == 'Linux'
uses: actions/upload-artifact@v4
with:
name: plugin_archive_artifact_${{ matrix.config.name }}_deb
if-no-files-found: error
path: |
./build/qtcreator-opensource-linux-*-*.deb
./build/ROSProjectManager-*-*-*.deb
./build/ROSProjectManager-*-*-*-dbgsym.ddeb
release:
name: create release
if: contains(github.ref, '/tags/')
runs-on: ubuntu-latest
needs: build
steps:
- name: download artifact
uses: actions/download-artifact@v4
with:
pattern: plugin_archive_artifact_*
merge-multiple: true
path: ./
- name: create release
uses: ncipollo/release-action@v1
id: create_release
with:
artifacts: qtcreator-opensource-linux-*-*.deb,ROSProjectManager-*-*-*.zip,ROSProjectManager-*-*-*.deb,ROSProjectManager-*-*-*-dbgsym.ddeb