From c68e67b2f865c497b1631b71537f9c56e2e86367 Mon Sep 17 00:00:00 2001 From: neuronull Date: Tue, 20 Jun 2023 16:11:10 -0600 Subject: [PATCH 1/5] enhancement(ci): reduce billable time of vrl checks --- .github/workflows/test.yml | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 76ad3ce2e27db..821b2423e9778 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -65,18 +65,6 @@ jobs: run: scripts/upload-test-results.sh if: always() - test-vrl: - name: VRL - Linux - continue-on-error: true - runs-on: [linux, ubuntu-20.04-8core] - needs: changes - if: ${{ needs.changes.outputs.source == 'true' || needs.changes.outputs.cue == 'true' }} - steps: - - uses: actions/checkout@v3 - - run: sudo -E bash scripts/environment/bootstrap-ubuntu-20.04.sh - - run: bash scripts/environment/prepare.sh - - run: cargo vdev test-vrl - checks: name: Checks runs-on: [linux, ubuntu-20.04-8core] @@ -133,6 +121,8 @@ jobs: - name: Check Rust Docs if: needs.changes.outputs.source == 'true' run: cd rust-doc && make docs + - if: needs.changes.outputs.source == 'true' || needs.changes.outputs.cue == 'true' + run: cargo vdev test-vrl - uses: actions/upload-artifact@v3 with: name: "config-schema.json" @@ -146,7 +136,6 @@ jobs: if: always() needs: - checks - - test-vrl - test-linux env: FAILED: ${{ contains(needs.*.result, 'failure') }} From c6c811929fd1a2f2d4d60bfc81b87ee4bf7624d7 Mon Sep 17 00:00:00 2001 From: neuronull Date: Wed, 21 Jun 2023 10:25:27 -0600 Subject: [PATCH 2/5] move make test to save on cached compilation --- .github/workflows/test.yml | 47 ++++++++++---------------------------- 1 file changed, 12 insertions(+), 35 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 821b2423e9778..9e9e33d6bae69 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -33,38 +33,6 @@ jobs: base_ref: ${{ github.event.merge_group.base_ref || github.event.pull_request.base.ref }} head_ref: ${{ github.event.merge_group.head_ref || github.event.pull_request.head.ref }} - # Remove this once https://github.com/vectordotdev/vector/issues/3771 is closed. - # Then, modify the `cross-linux` job to run `test` instead of `build`. - test-linux: - name: Unit - x86_64-unknown-linux-gnu - runs-on: [linux, ubuntu-20.04-8core] - needs: changes - env: - CARGO_INCREMENTAL: 0 - if: ${{ needs.changes.outputs.source == 'true' }} - steps: - - uses: actions/checkout@v3 - - uses: actions/cache@v3 - name: Cache Cargo registry + index - with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - restore-keys: | - ${{ runner.os }}-cargo- - - run: sudo -E bash scripts/environment/bootstrap-ubuntu-20.04.sh - - run: bash scripts/environment/prepare.sh - - run: echo "::add-matcher::.github/matchers/rust.json" - - run: make test - env: - CARGO_BUILD_JOBS: 5 - - name: Upload test results - run: scripts/upload-test-results.sh - if: always() - checks: name: Checks runs-on: [linux, ubuntu-20.04-8core] @@ -96,6 +64,17 @@ jobs: - name: Check clippy if: needs.changes.outputs.source == 'true' run: make check-clippy + + # Remove this once https://github.com/vectordotdev/vector/issues/3771 is closed. + # Then, modify the `cross-linux` job to run `test` instead of `build`. + - name: Unit - x86_64-unknown-linux-gnu + run: make test + env: + CARGO_BUILD_JOBS: 5 + - name: Upload test results + run: scripts/upload-test-results.sh + if: always() + - name: Check version run: make check-version - name: Check scripts @@ -134,9 +113,7 @@ jobs: name: Test Suite runs-on: ubuntu-20.04 if: always() - needs: - - checks - - test-linux + needs: checks env: FAILED: ${{ contains(needs.*.result, 'failure') }} steps: From 35beeb11f182014e2c50567b4dd8a1596241ef7b Mon Sep 17 00:00:00 2001 From: neuronull Date: Wed, 21 Jun 2023 11:55:05 -0600 Subject: [PATCH 3/5] feedback ds: move the cache step up --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9e9e33d6bae69..e9af5b4d31d19 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -44,8 +44,6 @@ jobs: with: # check-version needs tags fetch-depth: 0 # fetch everything - - run: sudo -E bash scripts/environment/bootstrap-ubuntu-20.04.sh - - run: bash scripts/environment/prepare.sh - uses: actions/cache@v3 name: Cache Cargo registry + index with: @@ -57,6 +55,8 @@ jobs: key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} restore-keys: | ${{ runner.os }}-cargo- + - run: sudo -E bash scripts/environment/bootstrap-ubuntu-20.04.sh + - run: bash scripts/environment/prepare.sh - name: Enable Rust matcher run: echo "::add-matcher::.github/matchers/rust.json" - name: Check code format From b4d0bf27bd83c5e2ab3bed1c362052e919933b7d Mon Sep 17 00:00:00 2001 From: neuronull Date: Wed, 21 Jun 2023 11:57:13 -0600 Subject: [PATCH 4/5] feedback ds: add name --- .github/workflows/test.yml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e9af5b4d31d19..2732fa1a48c0e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -44,6 +44,7 @@ jobs: with: # check-version needs tags fetch-depth: 0 # fetch everything + - uses: actions/cache@v3 name: Cache Cargo registry + index with: @@ -55,12 +56,17 @@ jobs: key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} restore-keys: | ${{ runner.os }}-cargo- + - run: sudo -E bash scripts/environment/bootstrap-ubuntu-20.04.sh + - run: bash scripts/environment/prepare.sh + - name: Enable Rust matcher run: echo "::add-matcher::.github/matchers/rust.json" + - name: Check code format run: make check-fmt + - name: Check clippy if: needs.changes.outputs.source == 'true' run: make check-clippy @@ -71,37 +77,49 @@ jobs: run: make test env: CARGO_BUILD_JOBS: 5 + - name: Upload test results run: scripts/upload-test-results.sh if: always() - name: Check version run: make check-version + - name: Check scripts run: make check-scripts + - name: Check events if: needs.changes.outputs.source == 'true' run: make check-events + - name: Check cargo deny advisories/licenses if: needs.changes.outputs.dependencies == 'true' || needs.changes.outputs.deny == 'true' run: make check-deny + - name: Check that the 3rd-party license file is up to date if: needs.changes.outputs.dependencies == 'true' run: make check-licenses + - name: Check Cue docs if: needs.changes.outputs.cue == 'true' run: make check-docs + - name: Check Markdown if: needs.changes.outputs.markdown == 'true' run: make check-markdown + - name: Check Component Docs if: needs.changes.outputs.source == 'true' || needs.changes.outputs.component_docs == 'true' run: make check-component-docs + - name: Check Rust Docs if: needs.changes.outputs.source == 'true' run: cd rust-doc && make docs - - if: needs.changes.outputs.source == 'true' || needs.changes.outputs.cue == 'true' + + - name: VRL - Linux + if: needs.changes.outputs.source == 'true' || needs.changes.outputs.cue == 'true' run: cargo vdev test-vrl + - uses: actions/upload-artifact@v3 with: name: "config-schema.json" From 472535fb912574a64e9f60c30b96c50b91865f3f Mon Sep 17 00:00:00 2001 From: neuronull Date: Wed, 21 Jun 2023 16:05:04 -0600 Subject: [PATCH 5/5] what I get for using github UI for merge conflicts --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 914a3f38e3e7e..76d8dc2e27f47 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -58,7 +58,7 @@ jobs: ${{ runner.os }}-cargo- - run: sudo -E bash scripts/environment/bootstrap-ubuntu-20.04.sh - + - uses: ruby/setup-ruby@v1 - run: bash scripts/environment/prepare.sh