Skip to content

Commit

Permalink
Fix workflow for perft test (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
fffelix-huang authored Oct 25, 2024
1 parent 50c8d17 commit 52f706c
Showing 1 changed file with 19 additions and 8 deletions.
27 changes: 19 additions & 8 deletions .github/workflows/perft-test.yml
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

0 comments on commit 52f706c

Please sign in to comment.