MOD-10712 - Port RM_ScanKey #102
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: CI | |
| on: [pull_request] | |
| jobs: | |
| get-nightly-version: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| nightly-version: ${{ steps.get-nightly.outputs.version }} | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v4 | |
| - name: Get nightly version from rust-toolchain.toml | |
| id: get-nightly | |
| run: | | |
| NIGHTLY_VERSION=$(grep 'channel = ' rust-toolchain.toml | sed 's/.*"\(.*\)".*/\1/') | |
| echo "version=$NIGHTLY_VERSION" >> $GITHUB_OUTPUT | |
| test: | |
| name: Build and run the unit tests using the latest rust. | |
| runs-on: ${{ matrix.os }} | |
| needs: get-nightly-version | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - ubuntu-latest | |
| - macos-latest | |
| redis-version: | |
| - [6-0, "7.2"] | |
| - [6-2, "7.2"] | |
| - [7-0, "7.2"] | |
| - [7-2, "7.2"] | |
| toolchain: | |
| - stable | |
| - ${{ needs.get-nightly-version.outputs.nightly-version }} | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Checkout redis sources | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| repository: redis/redis | |
| ref: ${{ matrix.redis-version[1] }} | |
| path: redis | |
| - name: Install redis | |
| run: | | |
| export HOMEBREW_NO_AUTO_UPDATE=1 | |
| cd redis | |
| make -j | |
| ./src/redis-server --version | |
| make install PREFIX=/usr/local | |
| redis-server --version | |
| - name: Setup python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10' | |
| - name: Install toolchain | |
| id: tc | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: ${{ matrix.toolchain }} | |
| profile: minimal | |
| override: true | |
| components: rustfmt, clippy | |
| - name: Setup cache | |
| if: runner.os != 'macOS' | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-test-${{ steps.tc.outputs.rustc_hash }}-${{ hashFiles('**/Cargo.toml') }} | |
| - name: Format | |
| run: cargo fmt --all -- --check | |
| - name: Clippy | |
| run: cargo clippy --all-targets --no-default-features --features "bindgen/runtime min-redis-compatibility-version-${{ matrix.redis-version[0] }}" | |
| - name: Build debug | |
| run: cargo build --no-default-features --features "bindgen/runtime min-redis-compatibility-version-${{ matrix.redis-version[0] }}" | |
| - name: Build release | |
| run: cargo build --release --no-default-features --features "bindgen/runtime min-redis-compatibility-version-${{ matrix.redis-version[0] }}" | |
| - name: Test | |
| run: cargo test --no-default-features --features "bindgen/runtime min-redis-compatibility-version-${{ matrix.redis-version[0] }}" | |
| - name: Doc | |
| run: cargo doc --no-default-features --features "all-features-but-xor bindgen/runtime min-redis-compatibility-version-${{ matrix.redis-version[0] }}" |