diff --git a/.github/workflows/perft-test.yml b/.github/workflows/perft-test.yml index 26bad81..094b74a 100644 --- a/.github/workflows/perft-test.yml +++ b/.github/workflows/perft-test.yml @@ -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