diff --git a/.github/workflows/sanitizers.yml b/.github/workflows/sanitizers.yml new file mode 100644 index 0000000..f2adf9e --- /dev/null +++ b/.github/workflows/sanitizers.yml @@ -0,0 +1,35 @@ +name: Sanitizers + +on: + workflow_call: {} + workflow_dispatch: {} + pull_request: {} + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + sanitizer: + name: ${{ matrix.sanitizer }} + runs-on: macos-latest + + strategy: + fail-fast: false + matrix: + sanitizer: [thread, address, undefined] + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Use Latest Stable Xcode + uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: latest-stable + + - name: Run tests with ${{ matrix.sanitizer }} sanitizer + run: swift test --sanitize ${{ matrix.sanitizer }}