File tree Expand file tree Collapse file tree 5 files changed +56
-5
lines changed
Expand file tree Collapse file tree 5 files changed +56
-5
lines changed Original file line number Diff line number Diff line change 1+ name : " Install vdev"
2+ description : " Install vdev CLI tool with caching based on source code changes"
3+
4+ branding :
5+ icon : tool
6+ color : purple
7+
8+ runs :
9+ using : " composite"
10+ steps :
11+ - name : Cache vdev binary
12+ id : cache-vdev
13+ uses : actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
14+ with :
15+ path : ~/.cargo/bin/vdev
16+ key : ${{ runner.os }}-vdev-${{ hashFiles('vdev/**', 'Cargo.toml', 'Cargo.lock') }}
17+ restore-keys : |
18+ ${{ runner.os }}-vdev-
19+
20+ - name : Build and install vdev
21+ if : steps.cache-vdev.outputs.cache-hit != 'true'
22+ shell : bash
23+ run : |
24+ echo "Building vdev from source (cache miss)"
25+ cargo install --path vdev --locked
Original file line number Diff line number Diff line change @@ -58,6 +58,10 @@ inputs:
5858 required : false
5959 default : false
6060 description : " Install wasm-pack for Rust to WASM bridge."
61+ vdev :
62+ required : false
63+ default : false
64+ description : " Install vdev CLI tool (cached by vdev/ directory changes)."
6165
6266 # prepare.sh - npm
6367 markdownlint :
8791 "${{ inputs.cargo-deny }}" \
8892 "${{ inputs.cargo-msrv }}" \
8993 "${{ inputs.dd-rust-license-tool }}" \
90- "${{ inputs.wasm-pack }}"; do
94+ "${{ inputs.wasm-pack }}" \
95+ "${{ inputs.vdev }}"; do
9196 if [[ "$val" == "true" ]]; then
9297 rust="true"
9398 break
@@ -201,6 +206,10 @@ runs:
201206 sudo cp "${TEMP}/cue" /usr/bin/cue
202207 rm -rf "$TEMP"
203208
209+ - name : Install vdev
210+ if : ${{ inputs.vdev == 'true' }}
211+ uses : ./.github/actions/install-vdev
212+
204213 - name : Run prepare.sh
205214 shell : bash
206215 run : |
Original file line number Diff line number Diff line change 2828 with :
2929 ref : ${{ inputs.checkout_ref || inputs.commit_sha }}
3030
31+ - uses : ./.github/actions/setup
32+ with :
33+ vdev : true
34+
3135 - name : Login to GitHub Container Registry
3236 uses : docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
3337 with :
3842 - name : Build and push integration test runner image
3943 run : |
4044 # Build integration test runner image with all-integration-tests feature
41- cargo vdev int build
45+ vdev int build
4246 # Get rust version from rust-toolchain.toml (same as vdev does)
4347 RUST_VERSION=$(grep '^channel = ' rust-toolchain.toml | cut -d'"' -f2)
4448 LOCAL_IMAGE="vector-test-runner-${RUST_VERSION}:latest"
Original file line number Diff line number Diff line change @@ -316,11 +316,15 @@ jobs:
316316 steps :
317317 - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
318318
319+ - uses : ./.github/actions/setup
320+ with :
321+ vdev : true
322+
319323 # creates a yaml file that contains the filters for each integration,
320324 # extracted from the output of the `vdev int ci-paths` command, which
321325 # sources the paths from the scripts/integration/.../test.yaml files
322326 - name : Create filter rules for integrations
323- run : cargo vdev int ci-paths > int_test_filters.yaml
327+ run : vdev int ci-paths > int_test_filters.yaml
324328
325329 - uses : dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
326330 id : filter
@@ -400,11 +404,15 @@ jobs:
400404 steps :
401405 - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
402406
407+ - uses : ./.github/actions/setup
408+ with :
409+ vdev : true
410+
403411 # creates a yaml file that contains the filters for each test,
404412 # extracted from the output of the `vdev int ci-paths` command, which
405413 # sources the paths from the scripts/e2e/.../test.yaml files
406414 - name : Create filter rules for e2e tests
407- run : cargo vdev e2e ci-paths > int_test_filters.yaml
415+ run : vdev e2e ci-paths > int_test_filters.yaml
408416
409417 - uses : dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
410418 id : filter
Original file line number Diff line number Diff line change 9797 - run : bash scripts/environment/prepare.sh --modules=rustup,cross
9898 - run : rustup target add x86_64-unknown-linux-gnu
9999 - run : echo "::add-matcher::.github/matchers/rust.json"
100- - run : VECTOR_VERSION="$(cargo vdev version)" make package-deb-x86_64-unknown-linux-gnu
100+
101+ # TODO: Use the setup action in this workflow.
102+ - name : Install vdev
103+ uses : ./.github/actions/install-vdev
104+
105+ - run : VECTOR_VERSION="$(vdev version)" make package-deb-x86_64-unknown-linux-gnu
101106
102107 - uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
103108 with :
You can’t perform that action at this time.
0 commit comments