Skip to content

Commit

Permalink
feat: Adds GitHub action for PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
gmbeard committed Nov 2, 2024
1 parent 8cab6b7 commit 67b1358
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Pull Request
on:
pull_request:
branches:
- main

jobs:
configure-build-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Params
id: strings
shell: bash
run: |
echo "build-output-dir=${{ github.workspace }}/build" >> $GITHUB_OUTPUT
echo "build-threads=$(nproc 2>/dev/null || echo '1')" >> $GITHUB_OUTPUT
- name: Configure
run: >
cmake -S ${{ github.workspace }}
-B ${{ steps.strings.outputs.build-output-dir }}
-DGPUFANCTL_ENABLE_TESTS=ON
- name: Build
run: >
cmake --build ${{ steps.strings.outputs.build-output-dir }}
-j${{ steps.strings.outputs.build-threads }}
- name: Test
run: >
ctest --test-dir ${{ steps.strings.outputs.build-output-dir }}
--output-on-failure

0 comments on commit 67b1358

Please sign in to comment.