feat: perf(enforce): reuse buffers with sync.Pool to reduce allocations #2023
Workflow file for this run
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: Build | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| go: ['1.21'] | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Set up Go | |
| uses: actions/setup-go@v2 | |
| with: | |
| go-version: ${{ matrix.go }} | |
| - name: Run go test | |
| run: make test | |
| benchmark: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| go: ['1.21'] | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Set up Go | |
| uses: actions/setup-go@v2 | |
| with: | |
| go-version: ${{ matrix.go }} | |
| - name: Run go test bench | |
| run: make benchmark | |
| semantic-release: | |
| needs: test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: 20 | |
| - name: Run semantic-release | |
| if: github.repository == 'casbin/casbin' && github.event_name == 'push' | |
| run: make release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |