Skip to content

Commit

Permalink
Add macOS arm CI build
Browse files Browse the repository at this point in the history
  • Loading branch information
yh-sb committed Jan 19, 2025
1 parent c360865 commit 41c4444
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 5 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,3 +158,36 @@ jobs:
name: minicom2-${{env.git_artifact_suffix}}-linux-x64
path: build/*.AppImage
if-no-files-found: error

macos-clang:
runs-on: macos-latest
steps:
- name: Checkout with submodules
uses: actions/checkout@v4
with:
submodules: recursive

- name: Install Clang
run: |
brew update
brew install llvm
- uses: xmake-io/github-action-setup-xmake@v1
with:
xmake-version: latest

- name: Build
run: |
export CC=/opt/homebrew/opt/llvm/bin/clang
export CXX=/opt/homebrew/opt/llvm/bin/clang++
xmake -y
- name: clang-tidy
run: ./check.sh

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: minicom2-${{env.git_artifact_suffix}}-macos
path: build/minicom2
if-no-files-found: error
12 changes: 12 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@
"version": "0.2.0",
"configurations":
[
{
"name": "Clang",
"type": "cppdbg",
"request": "launch",
"MIMode": "lldb",
"osx": { "targetArchitecture": "arm64" },
"program": "${workspaceFolder}/build/minicom2",
"args": ["/dev/cu.usbserial-210292AD33E90", "--baudrate", "115200", "--databits", "8", "--parity", "none", "--stopbits", "1", "--flowctrl", "none"],
"cwd": "${workspaceFolder}/build",
"preLaunchTask": "xmake",
"postDebugTask": "hide terminal"
},
{
"name": "GDB",
"type": "cppdbg",
Expand Down
4 changes: 3 additions & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"label": "xmake",
"type": "shell",
"command": "xmake",
"presentation": { "showReuseMessage": false, "panel": "shared" },
"args": ["-y"],
"presentation": { "showReuseMessage": false, "clear": true },
"group": { "kind": "build" },
"problemMatcher": ["$gcc", "$msCompile"]
},
{
Expand Down
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ Modern crossplatform serial terminal emulator
- [ ] Implement Ctrl+V feature

## How to build and launch
```powershell
```sh
xmake -y
xmake run
```

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

Usage:
Expand All @@ -34,5 +34,11 @@ Options:
```

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

0 comments on commit 41c4444

Please sign in to comment.