refactor: use Mesa-style thread yielding and mutex #20
This file contains hidden or 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
| name: Threading Library CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y gcc make | |
| - name: Show build information | |
| run: make version | |
| - name: Build threading library and tests | |
| run: make build | |
| - name: Run tests with system pthreads | |
| run: | | |
| echo "Testing with system pthreads" | |
| make MY_PTHREADS=0 test | |
| - name: Run tests with preemption | |
| run: | | |
| echo "Running tests with PREEMPT=1" | |
| make clean | |
| make test | |
| - name: Run tests without preemption | |
| run: | | |
| echo "Running tests with PREEMPT=0" | |
| make clean | |
| make PREEMPT=0 test |