Daily #62
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: Daily | |
| on: | |
| schedule: | |
| - cron: '0 0 * * *' # every day at midnight | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUSTFLAGS: -Dwarnings | |
| RUST_BACKTRACE: full | |
| jobs: | |
| daily-get-scylla-nightly-digest: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Get scylla-nightly digest for latest tag | |
| run: wget -q -O - "https://hub.docker.com/v2/namespaces/scylladb/repositories/scylla-nightly/tags/latest" | jq -r .digest > scylla-nightly-digest | |
| - name: Show scylla-nightly digest | |
| run: cat scylla-nightly-digest | |
| - name: Upload scylla-nightly digest as artifact | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: daily-scylla-nightly-digest | |
| path: scylla-nightly-digest | |
| daily-build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, ubuntu-24.04-arm] | |
| include: | |
| - os: ubuntu-latest | |
| arch: amd64 | |
| - os: ubuntu-24.04-arm | |
| arch: arm64 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| fetch-tags: true | |
| - name: Try to download vector-store artifact | |
| id: download-vector-store | |
| continue-on-error: true | |
| uses: dawidd6/action-download-artifact@v17 | |
| with: | |
| workflow: daily.yml | |
| name: daily-vector-store-${{matrix.arch}}-${{github.sha}} | |
| workflow_conclusion: "" | |
| search_artifacts: true | |
| - name: Try to download vector-search-validator artifact | |
| id: download-vector-search-validator | |
| continue-on-error: true | |
| uses: dawidd6/action-download-artifact@v17 | |
| with: | |
| workflow: daily.yml | |
| name: daily-vector-search-validator-${{matrix.arch}}-${{github.sha}} | |
| workflow_conclusion: "" | |
| search_artifacts: true | |
| - name: Chmod a+x vector-search-validator | |
| if: steps.download-vector-search-validator.outcome == 'success' | |
| run: chmod a+x vector-search-validator-${{matrix.arch}} | |
| - name: Setup local .cargo directories | |
| if: steps.download-vector-store.outcome == 'failure' || steps.download-vector-search-validator.outcome == 'failure' | |
| run: mkdir -p $HOME/.cargo/git $HOME/.cargo/registry | |
| - name: Print release toolchain rustc version | |
| if: steps.download-vector-store.outcome == 'failure' || steps.download-vector-search-validator.outcome == 'failure' | |
| env: | |
| TARGETARCH: ${{matrix.arch}} | |
| run: ./scripts/run-with-release-toolchain rustc --version | |
| - name: Fetching dependencies | |
| if: steps.download-vector-store.outcome == 'failure' || steps.download-vector-search-validator.outcome == 'failure' | |
| env: | |
| TARGETARCH: ${{matrix.arch}} | |
| run: ./scripts/run-with-release-toolchain cargo fetch | |
| - name: Build vector-store | |
| if: steps.download-vector-store.outcome == 'failure' | |
| env: | |
| TARGETARCH: ${{matrix.arch}} | |
| run: ./scripts/run-with-release-toolchain cargo build --release --bin vector-store | |
| - name: Copy vector-store | |
| if: steps.download-vector-store.outcome == 'failure' | |
| run: cp target/${{matrix.arch}}/release/vector-store vector-store-${{matrix.arch}} | |
| - name: Build vector-search-validator | |
| if: steps.download-vector-search-validator.outcome == 'failure' | |
| env: | |
| TARGETARCH: ${{matrix.arch}} | |
| run: ./scripts/run-with-release-toolchain cargo build --release --bin vector-search-validator -p vector-search-validator | |
| - name: Copy vector-search-validator | |
| if: steps.download-vector-search-validator.outcome == 'failure' | |
| run: cp target/${{matrix.arch}}/release/vector-search-validator vector-search-validator-${{matrix.arch}} | |
| - name: Upload vector-store as artifact | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: daily-vector-store-${{matrix.arch}}-${{github.sha}} | |
| path: vector-store-${{matrix.arch}} | |
| - name: Upload vector-search-validator as artifact | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: daily-vector-search-validator-${{matrix.arch}}-${{github.sha}} | |
| path: vector-search-validator-${{matrix.arch}} | |
| - name: Copy run-validator-with-scylla-docker script | |
| run: cp scripts/run-validator-with-scylla-docker . | |
| - name: Upload run-validator-with-scylla-docker as artifact | |
| if: matrix.arch == 'amd64' # Only upload the script once since it's architecture agnostic | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: run-validator-with-scylla-docker | |
| path: run-validator-with-scylla-docker | |
| daily-get-testcases: | |
| needs: daily-build | |
| runs-on: ubuntu-latest | |
| outputs: | |
| testcases: ${{ steps.testcases.outputs.testcases }} | |
| steps: | |
| - name: Download vector-search-validator artifact | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: daily-vector-search-validator-amd64-${{github.sha}} | |
| - name: Chmod a+x vector-search-validator | |
| run: chmod a+x vector-search-validator-amd64 | |
| - name: Set testcases output | |
| id: testcases | |
| run: | | |
| echo "testcases=[$(./vector-search-validator-amd64 list | cut -d : -f 1 | sort | uniq | xargs -n 1 -I '{}' echo \"{}\" | paste -sd,)]" >> "$GITHUB_OUTPUT" | |
| daily-validator-tests: | |
| needs: ["daily-get-scylla-nightly-digest", "daily-get-testcases"] | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| testcase: ${{fromJSON(needs.daily-get-testcases.outputs.testcases)}} | |
| os: [ubuntu-latest, ubuntu-24.04-arm] | |
| include: | |
| - os: ubuntu-latest | |
| arch: amd64 | |
| - os: ubuntu-24.04-arm | |
| arch: arm64 | |
| steps: | |
| - name: Download scylla-nightly digest artifact | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: daily-scylla-nightly-digest | |
| - name: Download vector-store artifact | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: daily-vector-store-${{matrix.arch}}-${{github.sha}} | |
| - name: Download vector-search-validator artifact | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: daily-vector-search-validator-${{matrix.arch}}-${{github.sha}} | |
| - name: Download run-validator-with-scylla-docker artifact | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: run-validator-with-scylla-docker | |
| - name: Chmod a+x downloaded artifacts | |
| run: chmod a+x vector-store-${{matrix.arch}} vector-search-validator-${{matrix.arch}} run-validator-with-scylla-docker | |
| - name: Run the Validator tests for testcase ${{matrix.testcase}} | |
| env: | |
| testcase: ${{matrix.testcase}} | |
| TARGETARCH: ${{matrix.arch}} | |
| run: | | |
| ./run-validator-with-scylla-docker scylladb/scylla-nightly@$(cat scylla-nightly-digest) vector-store-${TARGETARCH} vector-search-validator-${TARGETARCH} "\"${testcase}\"::" --verbose | |
| daily-save-scylla-nightly-digest: | |
| needs: daily-validator-tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download scylla-nightly digest artifact | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: daily-scylla-nightly-digest | |
| - name: Show scylla-nightly digest | |
| run: cat scylla-nightly-digest | |
| - name: Upload scylla-nightly digest artifact as artifact | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: scylla-nightly-digest | |
| path: scylla-nightly-digest |