-
Notifications
You must be signed in to change notification settings - Fork 32
153 lines (122 loc) · 3.55 KB
/
build.yml
File metadata and controls
153 lines (122 loc) · 3.55 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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
name: build
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
linux-x86_64:
name: build (linux-x86_64)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: install dependencies
run: |
sudo apt update && sudo apt install -y build-essential cmake ninja-build libudev-dev libavahi-compat-libdnssd-dev
- name: configure
run: |
cmake -B build -S . -G Ninja -DCMAKE_BUILD_TYPE=Release
- name: build
run: |
cmake --build build
linux-arm64:
name: build (linux-arm64)
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: install dependencies
run: |
sudo apt update && sudo apt install -y build-essential cmake ninja-build libudev-dev libavahi-compat-libdnssd-dev
- name: configure
run: |
cmake -B build -S . -G Ninja -DCMAKE_BUILD_TYPE=Release
- name: build
run: |
cmake --build build
macos:
name: build (macos-universal)
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: configure
run: |
cmake -B build -S . -G Ninja -DCMAKE_BUILD_TYPE=Release
- name: build
run: |
cmake --build build
windows-x86_64:
name: build (windows-x86_64)
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: install dependencies
uses: msys2/setup-msys2@v2
with:
msystem: CLANG64
update: true
install: >-
mingw-w64-clang-x86_64-clang
mingw-w64-clang-x86_64-cmake
mingw-w64-clang-x86_64-ninja
mingw-w64-clang-x86_64-nsis
- name: configure
run: |
cmake -B build -S . -G Ninja -DCMAKE_BUILD_TYPE=Release
- name: build
run: |
cmake --build build
- name: build installer
run: |
makensis //DFILE_SRC=$(cygpath -w "$PWD/build/bin") //DARCH=x86_64 installers/windows/installer.nsi
- name: upload artifacts
uses: actions/upload-artifact@v4
with:
name: serialosc-windows-x86_64
path: installers/windows/serialosc-*.exe
if-no-files-found: warn
windows-arm64:
name: build (windows-arm64)
runs-on: windows-11-arm
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: install dependencies
uses: msys2/setup-msys2@v2
with:
msystem: CLANGARM64
update: true
install: >-
mingw-w64-clang-aarch64-clang
mingw-w64-clang-aarch64-cmake
mingw-w64-clang-aarch64-ninja
mingw-w64-clang-x86_64-nsis
- name: configure
run: |
cmake -B build -S . -G Ninja -DCMAKE_BUILD_TYPE=Release
- name: build
run: |
cmake --build build
- name: build installer
run: |
/clang64/bin/makensis //DFILE_SRC=$(cygpath -w "$PWD/build/bin") //DARCH=arm64 installers/windows/installer.nsi
- name: upload artifacts
uses: actions/upload-artifact@v4
with:
name: serialosc-windows-arm64
path: installers/windows/serialosc-*.exe
if-no-files-found: warn