Skip to content

Commit 5c6009f

Browse files
committed
Add macOS arm CI build
1 parent c360865 commit 5c6009f

File tree

4 files changed

+66
-5
lines changed

4 files changed

+66
-5
lines changed

.github/workflows/build.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,3 +158,44 @@ jobs:
158158
name: minicom2-${{env.git_artifact_suffix}}-linux-x64
159159
path: build/*.AppImage
160160
if-no-files-found: error
161+
162+
macos-clang:
163+
runs-on: macos-15
164+
steps:
165+
- name: Checkout with submodules
166+
uses: actions/checkout@v4
167+
with:
168+
submodules: recursive
169+
170+
- name: Install Clang and xmake
171+
run: |
172+
brew update
173+
brew install llvm xmake
174+
175+
- name: Build
176+
run: |
177+
export PATH="/opt/homebrew/opt/llvm/bin:$PATH"
178+
export CC=/opt/homebrew/opt/llvm/bin/clang
179+
export CXX=/opt/homebrew/opt/llvm/bin/clang++
180+
xmake -y
181+
182+
- name: clang-tidy
183+
run: |
184+
export PATH="/opt/homebrew/opt/llvm/bin:$PATH"
185+
./check.sh
186+
187+
- name: Get git branch+hash or release tag
188+
run: |
189+
if [[ "$GITHUB_REF" == refs/tags/* ]]; then
190+
git_artifact_suffix=$(git describe --tags --abbrev=0)
191+
else
192+
git_artifact_suffix="$(git rev-parse --abbrev-ref HEAD)-$(git rev-parse --short HEAD)"
193+
fi
194+
echo "git_artifact_suffix=$git_artifact_suffix" >> $GITHUB_ENV
195+
196+
- name: Upload artifacts
197+
uses: actions/upload-artifact@v4
198+
with:
199+
name: minicom2-${{env.git_artifact_suffix}}-macos
200+
path: build/minicom2
201+
if-no-files-found: error

.vscode/launch.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@
22
"version": "0.2.0",
33
"configurations":
44
[
5+
{
6+
"name": "Clang",
7+
"type": "cppdbg",
8+
"request": "launch",
9+
"MIMode": "lldb",
10+
"osx": { "targetArchitecture": "arm64" },
11+
"program": "${workspaceFolder}/build/minicom2",
12+
"args": ["/dev/cu.usbserial-210292AD33E90", "--baudrate", "115200", "--databits", "8", "--parity", "none", "--stopbits", "1", "--flowctrl", "none"],
13+
"cwd": "${workspaceFolder}/build",
14+
"preLaunchTask": "xmake",
15+
"postDebugTask": "hide terminal"
16+
},
517
{
618
"name": "GDB",
719
"type": "cppdbg",

.vscode/tasks.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
"label": "xmake",
66
"type": "shell",
77
"command": "xmake",
8-
"presentation": { "showReuseMessage": false, "panel": "shared" },
8+
"args": ["-y"],
9+
"presentation": { "showReuseMessage": false, "clear": true },
10+
"group": { "kind": "build" },
911
"problemMatcher": ["$gcc", "$msCompile"]
1012
},
1113
{

README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ Modern crossplatform serial terminal emulator
1313
- [ ] Implement Ctrl+V feature
1414

1515
## How to build and launch
16-
```powershell
16+
```sh
1717
xmake -y
1818
xmake run
1919
```
2020

2121
Since pseudo-graphical UI has not yet been integrated, it is possible to configure the serial port using command line options:
22-
```powershell
22+
```sh
2323
build/minicom2 --help
2424

2525
Usage:
@@ -34,5 +34,11 @@ Options:
3434
```
3535

3636
## Requirements
37-
* [MinGW-w64](https://winlibs.com) or [MSVC](https://visualstudio.microsoft.com/free-developer-offers) or Linux GCC
38-
* [Xmake](https://xmake.io/#/guide/installation)
37+
* [xmake](https://xmake.io/#/guide/installation)
38+
* For Windows: [MinGW-w64](https://winlibs.com) or [MSVC](https://visualstudio.microsoft.com/free-developer-offers)
39+
* For Linux: `sudo apt install g++` or `clang`
40+
* For macOS:
41+
```sh
42+
brew install llvm
43+
echo -e 'export PATH="/opt/homebrew/opt/llvm/bin:$PATH"\nexport CC=clang\nexport CXX=clang++' >> ~/.bash_profile # or ~/.zshrc
44+
```

0 commit comments

Comments
 (0)