-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
921b62e
commit 79dbddb
Showing
2 changed files
with
59 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: Build on Mac OS | ||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
jobs: | ||
build-mac: | ||
runs-on: macos-latest | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Dependencies | ||
run: | | ||
brew update | ||
brew install \ | ||
cmake gmp \ | ||
llvm@18 | ||
- name: Test LLVM | ||
run: | | ||
echo "/opt/homebrew/opt/llvm@18/bin" >> $GITHUB_PATH | ||
clang --version | ||
llvm-config --bindir | ||
- name: Spell Check | ||
uses: crate-ci/[email protected] | ||
|
||
- name: Clang Format | ||
run: | | ||
chmod +x scripts/run-clang-format | ||
scripts/run-clang-format | ||
- name: Build Repo | ||
run: | | ||
cmake -DCMAKE_BUILD_TYPE:STRING=Release \ | ||
-DLINK_LLVM_DYLIB=ON -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE \ | ||
-DCMAKE_INSTALL_PREFIX="/opt/knight" -DLLVM_BUILD_DIR="/opt/homebrew/opt/llvm@18" \ | ||
-B build | ||
cmake --build build -j16 | ||
echo $(pwd)/build/bin >> $GITHUB_PATH | ||
- name: Clang Tidy | ||
run: | | ||
chmod +x scripts/run-clang-tidy | ||
scripts/run-clang-tidy -j16 | ||
- name: Test Binary | ||
run: | | ||
knight --help | ||
- name: Unit Tests | ||
run: | | ||
pwd | ||
chmod +x scripts/unittest | ||
scripts/unittest run test/testcase/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters