Build the release-5.6 branch with Rust 1.71.1 to match the downstream #187
Workflow file for this run
This file contains 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: Test Suite | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
env: | |
AUTOINSTALL: true | |
AWS_ACCESS_KEY_ID: "dummy" | |
AWS_SECRET_ACCESS_KEY: "dummy" | |
CONTAINER_TOOL: "docker" | |
DD_ENV: "ci" | |
DD_API_KEY: ${{ secrets.DD_API_KEY }} | |
RUST_BACKTRACE: full | |
RUST_TEST_THREADS: 1 | |
TEST_LOG: vector=debug | |
VERBOSE: true | |
CI: true | |
PROFILE: debug | |
RUSTFLAGS: "-D warnings" | |
jobs: | |
cancel-previous: | |
name: Cancel redundant jobs | |
runs-on: ubuntu-20.04 | |
timeout-minutes: 3 | |
if: github.ref != 'refs/heads/master' | |
steps: | |
- uses: styfle/[email protected] | |
with: | |
access_token: ${{ secrets.GITHUB_TOKEN }} | |
all_but_latest: true # can cancel workflows scheduled later | |
changes: | |
runs-on: ubuntu-20.04 | |
# Set job outputs to values from filter step | |
outputs: | |
source: ${{ steps.filter.outputs.source }} | |
dependencies: ${{ steps.filter.outputs.dependencies }} | |
internal_events: ${{ steps.filter.outputs.internal_events }} | |
cue: ${{ steps.filter.outputs.cue }} | |
markdown: ${{ steps.filter.outputs.markdown }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dorny/paths-filter@v2 | |
id: filter | |
with: | |
filters: | | |
source: | |
- ".github/workflows/test.yml" | |
- ".cargo/**" | |
- "benches/**" | |
- "lib/**" | |
- "proto/**" | |
- "scripts/**" | |
- "skaffold/**" | |
- "src/**" | |
- "tests/**" | |
- "build.rs" | |
- "Cargo.lock" | |
- "Cargo.toml" | |
- "Makefile" | |
- "rust-toolchain" | |
deny: | |
- 'deny.toml' | |
dependencies: | |
- ".cargo/**" | |
- 'Cargo.toml' | |
- 'Cargo.lock' | |
- 'rust-toolchain.toml' | |
- '.github/workflows/pr.yml' | |
- 'Makefile' | |
- 'scripts/cross/**' | |
cue: | |
- 'website/cue/**' | |
markdown: | |
- '**/**.md' | |
internal_events: | |
- 'src/internal_events/**' | |
docker: | |
- 'distribution/docker/**' | |
# 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, test-runner] | |
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() | |
test-cli: | |
name: CLI - Linux | |
runs-on: [linux, test-runner] | |
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-cli | |
- name: Upload test results | |
run: scripts/upload-test-results.sh | |
if: always() | |
test-misc: | |
name: Miscellaneous - Linux | |
runs-on: [linux, test-runner] | |
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-behavior | |
- run: make check-examples | |
- run: make test-docs | |
cross-linux: | |
name: Cross - ${{ matrix.target }} | |
runs-on: ubuntu-20.04 | |
needs: changes | |
env: | |
CARGO_INCREMENTAL: 0 | |
strategy: | |
matrix: | |
target: | |
- x86_64-unknown-linux-gnu | |
- x86_64-unknown-linux-musl | |
- aarch64-unknown-linux-gnu | |
- aarch64-unknown-linux-musl | |
- armv7-unknown-linux-gnueabihf | |
- armv7-unknown-linux-musleabihf | |
# We run cross checks when dependencies change to ensure they still build. | |
# This helps us avoid adopting dependencies that aren't compatible with other architectures. | |
if: ${{ needs.changes.outputs.dependencies == '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: echo "::add-matcher::.github/matchers/rust.json" | |
# Why is this build, not check? Because we need to make sure the linking phase works. | |
# aarch64 and musl in particular are notoriously hard to link. | |
# While it may be tempting to slot a `check` in here for quickness, please don't. | |
- run: make cross-build-${{ matrix.target }} | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: "vector-debug-${{ matrix.target }}" | |
path: "./target/${{ matrix.target }}/debug/vector" | |
cross-linux-check: | |
if: ${{ needs.changes.outputs.dependencies == 'true' }} | |
runs-on: ubuntu-latest | |
name: Cross - Linux | |
needs: cross-linux | |
steps: | |
- name: Check cross matrix status | |
if: ${{ needs.cross-linux.result != 'success' }} | |
run: exit 1 | |
test-mac: | |
name: Unit - Mac | |
# Full CI suites for this platform were only recently introduced. | |
# Some failures are permitted until we can properly correct them. | |
continue-on-error: true | |
runs-on: macos-latest | |
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: bash scripts/environment/bootstrap-macos-10.sh | |
- run: bash scripts/environment/prepare.sh | |
- run: echo "::add-matcher::.github/matchers/rust.json" | |
- run: make test | |
- run: make test-behavior | |
test-windows: | |
name: Unit - Windows | |
runs-on: [windows, test-runner] | |
needs: changes | |
if: ${{ needs.changes.outputs.source == 'true' }} | |
steps: | |
- uses: actions/checkout@v3 | |
- run: .\scripts\environment\bootstrap-windows-2019.ps1 | |
- run: make test | |
test-vrl: | |
name: VRL - Linux | |
continue-on-error: true | |
runs-on: [linux, test-runner] | |
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: make test-vrl | |
check-component-features: | |
name: Component Features - Linux | |
runs-on: [linux, test-runner] | |
needs: changes | |
if: ${{ needs.changes.outputs.source == 'true' }} | |
steps: | |
- uses: actions/checkout@v3 | |
- 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: cargo install cargo-hack | |
- run: make check-component-features | |
check-msrv: | |
name: Check minimum supported Rust version | |
runs-on: [linux, test-runner] | |
needs: changes | |
if: ${{ needs.changes.outputs.source == 'true' }} | |
steps: | |
- uses: actions/checkout@v3 | |
- run: sudo -E bash scripts/environment/bootstrap-ubuntu-20.04.sh | |
- run: cargo install cargo-msrv --version 0.15.1 | |
- run: cargo msrv verify | |
checks: | |
name: Checks | |
runs-on: ubuntu-20.04 | |
container: timberio/ci_image:sha-5e4db9de84473ea817048e204561eb54a4f025d8 | |
needs: changes | |
env: | |
CARGO_INCREMENTAL: 0 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
# check-version needs tags | |
fetch-depth: 0 # fetch everything | |
- 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- | |
- name: Enable Rust matcher | |
run: echo "::add-matcher::.github/matchers/rust.json" | |
- name: Check style | |
run: make check-style | |
- name: Check code format || needs.changes.outputs.source == 'true' | |
if: needs.changes.outputs.source == 'true' | |
run: make check-fmt | |
- name: Check clippy | |
if: needs.changes.outputs.source == 'true' | |
run: make check-clippy | |
- 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 | |
if: needs.changes.outputs.dependencies == 'true' || needs.changes.outputs.deny == 'true' | |
uses: EmbarkStudios/[email protected] | |
with: | |
command: check advisories | |
- name: Check cargo deny licenses | |
if: needs.changes.outputs.dependencies == 'true' || needs.changes.outputs.deny == 'true' | |
uses: EmbarkStudios/[email protected] | |
with: | |
command: 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 | |
master-failure: | |
name: master-failure | |
if: failure() && github.ref == 'refs/heads/master' | |
needs: | |
- cancel-previous | |
- changes | |
- cross-linux | |
- test-misc | |
- test-linux | |
- test-mac | |
- test-windows | |
- test-vrl | |
- check-component-features | |
- checks | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Discord notification | |
env: | |
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} | |
uses: Ilshidur/[email protected] | |
with: | |
args: "Master tests failed: <https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}>" |