Merge pull request #43 from rex-rs/entry-generation #5
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: memcached_benchmark | |
| on: | |
| push: | |
| pull_request: | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| changes: | |
| if: github.repository == 'rex-rs/rex' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pull-requests: read | |
| outputs: | |
| bench: ${{ steps.filter.outputs.bench }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dorny/paths-filter@v3 | |
| id: filter | |
| with: | |
| filters: | | |
| bench: | |
| - 'tools/memcached_benchmark/**' | |
| build: | |
| needs: changes | |
| if: ${{ needs.changes.outputs.bench == 'true' }} | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: ./tools/memcached_benchmark | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - id: filter | |
| uses: dorny/paths-filter@v3 | |
| with: | |
| filters: | | |
| bench: | |
| - 'tools/memcached_benchmark/**' | |
| - uses: cachix/install-nix-action@v26 | |
| - uses: cachix/cachix-action@v14 | |
| with: | |
| name: devenv | |
| - name: Install devenv.sh | |
| run: nix profile install nixpkgs#devenv | |
| - name: Build the devenv shell and run any pre-commit hooks | |
| run: devenv test | |
| - name: Build | |
| shell: devenv shell bash -- -e {0} | |
| run: | | |
| cargo fmt --check --verbose | |
| cargo build -r --verbose | |
| - name: Run tests | |
| shell: devenv shell bash -- -e {0} | |
| run: | | |
| cargo test --verbose | |
| cargo test -r --verbose |