forked from sigrokproject/pulseview
-
Notifications
You must be signed in to change notification settings - Fork 0
117 lines (104 loc) · 3.46 KB
/
Copy pathbuild.yml
File metadata and controls
117 lines (104 loc) · 3.46 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
name: Build U3LogicAnalyzer
on:
push:
branches:
- master
tags:
- 'v*'
pull_request:
workflow_dispatch:
permissions:
contents: write
jobs:
build:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- name: macOS
os: macos-latest
- name: Linux
os: ubuntu-latest
- name: Windows
os: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup MSYS2 (Windows)
if: runner.os == 'Windows'
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
install: >-
mingw-w64-x86_64-gcc
mingw-w64-x86_64-cmake
mingw-w64-x86_64-ninja
mingw-w64-x86_64-pkgconf
mingw-w64-x86_64-glib2
mingw-w64-x86_64-glibmm
mingw-w64-x86_64-libusb
mingw-w64-x86_64-hidapi
mingw-w64-x86_64-libzip
mingw-w64-x86_64-boost
mingw-w64-x86_64-qt5
mingw-w64-x86_64-python
zip
- name: Install macOS dependencies
if: runner.os == 'macOS'
run: |
brew install pkgconf cmake ninja qt@5 glibmm@2.66 glib libusb \
hidapi libzip boost python@3.14
- name: Install Linux dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y build-essential cmake ninja-build pkg-config \
qtbase5-dev qttools5-dev libqt5svg5-dev \
libglib2.0-dev libglibmm-2.4-dev libusb-1.0-0-dev \
libhidapi-dev libzip-dev libboost-dev libboost-filesystem-dev \
libboost-serialization-dev python3-dev
- name: Build (macOS / Linux)
if: runner.os != 'Windows'
env:
LIBSIGROK_URL: ${{ vars.LIBSIGROK_URL }}
LIBSIGROKDECODE_URL: ${{ vars.LIBSIGROKDECODE_URL }}
run: ./build_macos.sh
- name: Build (Windows)
if: runner.os == 'Windows'
shell: msys2 {0}
env:
LIBSIGROK_URL: ${{ vars.LIBSIGROK_URL }}
LIBSIGROKDECODE_URL: ${{ vars.LIBSIGROKDECODE_URL }}
run: ./build_windows.sh
- name: Package macOS app + DMG
if: runner.os == 'macOS'
run: ./package_app.sh --dmg
- name: Package Linux tarball
if: runner.os == 'Linux'
run: |
mkdir -p dist/U3LogicAnalyzer-linux/bin \
dist/U3LogicAnalyzer-linux/share/libsigrokdecode
cp build/pulseview_build/LogicAnalyzer dist/U3LogicAnalyzer-linux/bin/
cp -R build/install/share/libsigrokdecode/decoders \
dist/U3LogicAnalyzer-linux/share/libsigrokdecode/
tar -C dist -czf build/U3LogicAnalyzer-linux.tar.gz U3LogicAnalyzer-linux
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.name }}-${{ github.ref_name }}
path: |
build/U3LogicAnalyzer.dmg
build/U3LogicAnalyzer-linux.tar.gz
build/LogicAnalyzer-win64.zip
if-no-files-found: warn
- name: Publish release (on tag)
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
with:
files: |
build/U3LogicAnalyzer.dmg
build/U3LogicAnalyzer-linux.tar.gz
build/LogicAnalyzer-win64.zip
generate_release_notes: true