-
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
4692786
commit 9c27013
Showing
1 changed file
with
72 additions
and
0 deletions.
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,72 @@ | ||
name: Build on Windows | ||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
jobs: | ||
build-win: | ||
runs-on: windows-latest | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install LLVM and Clang | ||
uses: KyleMayes/install-llvm-action@v2 | ||
with: | ||
version: "18.1.8" | ||
directory: ${{ runner.temp }}/llvm | ||
|
||
- name: Add LLVM to PATH | ||
run: echo "${{ runner.temp }}/llvm/bin" >> $GITHUB_PATH | ||
|
||
- name: Install Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.9 | ||
|
||
- name: Test LLVM | ||
run: | | ||
which clang | ||
clang --version | ||
clang-tidy --version | ||
clang-format --version | ||
- name: Spell Check | ||
uses: crate-ci/[email protected] | ||
|
||
- name: Clang Format | ||
run: | | ||
chmod +x scripts/run-clang-format | ||
scripts/run-clang-format | ||
- name: Install GMP | ||
run: | | ||
choco install gmp | ||
echo "C:\Program Files\GMP\include" >> $GITHUB_PATH | ||
- name: Build Repo | ||
run: | | ||
cmake -DCMAKE_BUILD_TYPE:STRING=Release \ | ||
-DLINK_LLVM_DYLIB=ON -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE \ | ||
-DLLVM_BUILD_DIR=${{ runner.temp }}/llvm \ | ||
-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/ | ||
|