Skip to content

Commit 06b77c9

Browse files
authored
Create build-macos-arm64.yml
1 parent 7f1f321 commit 06b77c9

1 file changed

Lines changed: 52 additions & 0 deletions

File tree

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Build OpenCC on macOS ARM64
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
build:
13+
runs-on: macos-12
14+
strategy:
15+
matrix:
16+
platform: [arm64]
17+
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v3
21+
22+
- name: Install Homebrew
23+
run: |
24+
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
25+
26+
- name: Install dependencies
27+
run: |
28+
brew install cmake boost
29+
30+
- name: Create build directory
31+
run: mkdir build
32+
33+
- name: Run CMake
34+
run: |
35+
cd build
36+
cmake .. -DCMAKE_OSX_ARCHITECTURES=arm64
37+
38+
- name: Build OpenCC
39+
run: |
40+
cd build
41+
make
42+
43+
- name: Run tests
44+
run: |
45+
cd build
46+
make test
47+
48+
- name: Upload build artifacts
49+
uses: actions/upload-artifact@v3
50+
with:
51+
name: opencc-build
52+
path: build/

0 commit comments

Comments
 (0)