-
Notifications
You must be signed in to change notification settings - Fork 7
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
50c8d17
commit 52f706c
Showing
1 changed file
with
19 additions
and
8 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 |
---|---|---|
@@ -1,28 +1,39 @@ | ||
name: Run perft tests | ||
|
||
on: | ||
workflow_call: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build-and-test: | ||
perft-test: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest] | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install Dependencies | ||
run: | | ||
sudo apt-get update || brew update | ||
sudo apt-get install -y build-essential || brew install make | ||
if [[ "$RUNNER_OS" == "Linux" ]]; then | ||
sudo apt-get update | ||
sudo apt-get install -y build-essential | ||
elif [[ "$RUNNER_OS" == "macOS" ]]; then | ||
brew update | ||
brew install make | ||
fi | ||
- name: Build Sonic | ||
working-directory: Sonic/src | ||
working-directory: src | ||
run: make | ||
|
||
- name: Run perft tests | ||
working-directory: Sonic/src | ||
working-directory: src | ||
run: | | ||
echo -e "perft\nquit" | ./sonic |