Skip to content

chore(operations)!: Teach Environment to build for other architectures. #3358

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 41 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
4e68a4e
Cross wip
Hoverbear Jul 17, 2020
70f2a4e
Failing on a secure_getenv in jemalloc
Hoverbear Jul 17, 2020
6b134c1
Musl x86 is gold
Hoverbear Jul 17, 2020
9bfdb49
aarch builds?
Hoverbear Jul 18, 2020
2e4df58
Almost working armv7
Hoverbear Jul 18, 2020
5623121
Some cleanup
Hoverbear Jul 20, 2020
0121801
Merge branch 'master' into cross-env
Hoverbear Jul 28, 2020
85ce192
wip
Hoverbear Jul 28, 2020
ac430d5
Merge branch 'master' into cross-env
Hoverbear Jul 29, 2020
cfa9069
wip
Hoverbear Jul 29, 2020
ff9ef91
wip
Hoverbear Aug 4, 2020
4eb94fb
Merge branch 'master' into cross-env
Hoverbear Aug 4, 2020
6cb7e3d
Checkpoint
Hoverbear Aug 5, 2020
c829f18
Checkpoint
Hoverbear Aug 5, 2020
a4a2b63
wip
Hoverbear Aug 5, 2020
c35f9bc
Merge branch 'master' into cross-env
Hoverbear Aug 5, 2020
020ecd0
The right linker!
Hoverbear Aug 5, 2020
ca2ab87
aarch and x86 work
Hoverbear Aug 5, 2020
81db26c
Add github jobs
Hoverbear Aug 5, 2020
dbac5d1
Improve names
Hoverbear Aug 5, 2020
4bdc539
Get rid of the old builders
Hoverbear Aug 5, 2020
16f9791
Support ENVIRONMENT
Hoverbear Aug 5, 2020
d1a121d
Export the builds
Hoverbear Aug 5, 2020
388196e
Upload artifacts
Hoverbear Aug 5, 2020
c98f557
Add gnu builder
Hoverbear Aug 5, 2020
0b353fa
Clean up envs
Hoverbear Aug 6, 2020
2c838d5
Fix format
Hoverbear Aug 6, 2020
fc6e62b
Fixup checks
Hoverbear Aug 6, 2020
7d899b8
We use rbenv now so macs can relax
Hoverbear Aug 6, 2020
c935627
Fixup rbenv
Hoverbear Aug 6, 2020
e1600ca
Whelp
Hoverbear Aug 6, 2020
341a51c
Almost
Hoverbear Aug 6, 2020
46ec2e4
Fixup prepare
Hoverbear Aug 7, 2020
3008ede
x86 musl works
Hoverbear Aug 7, 2020
e3ec69b
aarch64
Hoverbear Aug 7, 2020
960b78c
Env in tests
Hoverbear Aug 7, 2020
34ea84c
Fixup rbenv again
Hoverbear Aug 7, 2020
6fcb9ac
Merge branch 'master' into cross-env
Hoverbear Aug 7, 2020
dd04aa8
checkpoint
Hoverbear Aug 7, 2020
244b49d
checkpoint
Hoverbear Aug 7, 2020
560cebd
Broken
Hoverbear Aug 7, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .cargo/config

This file was deleted.

1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
!shell.nix
!default.nix
!scripts/environment
scripts/environment/cross
!.envrc
!tests
2 changes: 1 addition & 1 deletion .github/workflows/benches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ jobs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- run: sudo bash scripts/environment/bootstrap-ubuntu-20.04.sh
- run: sudo bash scripts/environment/bootstrap/ubuntu-20.04.sh
- run: bash scripts/environment/prepare.sh
- run: make bench
4 changes: 2 additions & 2 deletions .github/workflows/lints.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- run: sudo bash scripts/environment/bootstrap-ubuntu-20.04.sh
- run: sudo bash scripts/environment/bootstrap/ubuntu-20.04.sh
- run: bash scripts/environment/prepare.sh
- run: make slim-builds
- run: make check-markdown
Expand All @@ -62,7 +62,7 @@ jobs:
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- run: sudo bash scripts/environment/bootstrap-ubuntu-20.04.sh
- run: sudo bash scripts/environment/bootstrap/ubuntu-20.04.sh
- run: bash scripts/environment/prepare.sh
- run: make slim-builds
- run: echo "::add-path::/home/runner/.local/bin"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ jobs:
with:
name: vector-aarch64.rpm
path: target/artifacts
- run: sudo bash scripts/environment/bootstrap-ubuntu-20.04.sh
- run: sudo bash scripts/environment/bootstrap/ubuntu-20.04.sh
- run: bash scripts/environment/prepare.sh
- run: |
export VERSION=$(make version)
Expand Down Expand Up @@ -377,7 +377,7 @@ jobs:
with:
name: vector-aarch64.rpm
path: target/artifacts
- run: sudo bash scripts/environment/bootstrap-ubuntu-20.04.sh
- run: sudo bash scripts/environment/bootstrap/ubuntu-20.04.sh
- run: bash scripts/environment/prepare.sh
- run: |
export VERSION=$(make version)
Expand Down
100 changes: 87 additions & 13 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- run: sudo bash scripts/environment/bootstrap-ubuntu-20.04.sh
- run: sudo bash scripts/environment/bootstrap/ubuntu-20.04.sh
- run: bash scripts/environment/prepare.sh
- run: make slim-builds
- run: make test
Expand All @@ -82,7 +82,7 @@ jobs:
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- run: bash scripts/environment/bootstrap-macos-10.sh
- run: bash scripts/environment/bootstrap/macos-10.sh
- run: bash scripts/environment/prepare.sh
- run: make slim-builds
- run: make test
Expand All @@ -100,6 +100,80 @@ jobs:
RUSTFLAGS: "-D warnings"
run: cargo test --no-default-features --features default-msvc

build-centos-7-x64_64-unknown-linux-gnu:
name: Release build - CentOS 7 - x64_64-unknown-linux-gnu
runs-on: ubuntu-20.04
env:
RELEASE: false
# We need Centos 7 for Glibc 2.17 here! :)
ENVIRONMENT_BASEIMAGE: "centos:7"
ENVIRONMENT: true
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- run: make environment-prepare
- run: make build-x64_64-unknown-linux-gnu
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: vector-x64_64-unknown-linux-gnu
path: target/x64_64-unknown-linux-gnu/debug/vector

build-ubuntu-20-04-x86_64-unknown-linux-musl:
name: Release build - Ubuntu 20.04 - x86_64-unknown-linux-musl
runs-on: ubuntu-20.04
env:
RELEASE: false
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- run: sudo bash scripts/environment/bootstrap/ubuntu-20.04.sh
- run: bash scripts/environment/prepare.sh
- run: make slim-builds
- run: make build-cross-x86_64-unknown-linux-musl
- run: make clean-cross
- run: make build-x86_64-unknown-linux-musl
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: vector-x86_64-unknown-linux-musl
path: target/x86_64-unknown-linux-musl/debug/vector

build-ubuntu-20-04-aarch64-unknown-linux-musl:
name: Release build - Ubuntu 20.04 - aarch64-unknown-linux-musl
runs-on: ubuntu-20.04
env:
RELEASE: false
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- run: sudo bash scripts/environment/bootstrap/ubuntu-20.04.sh
- run: bash scripts/environment/prepare.sh
- run: make slim-builds
- run: make build-cross-aarch64-unknown-linux-musl
- run: make clean-cross
- run: make build-aarch64-unknown-linux-musl
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: vector-aarch64-unknown-linux-musl
path: target/aarch64-unknown-linux-musl/debug/vector

test-misc:
name: Shutdown - Linux
runs-on: ubuntu-20.04
Expand All @@ -111,7 +185,7 @@ jobs:
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- run: sudo bash scripts/environment/bootstrap-ubuntu-20.04.sh
- run: sudo bash scripts/environment/bootstrap/ubuntu-20.04.sh
- run: bash scripts/environment/prepare.sh
- run: make slim-builds
- run: make test-shutdown
Expand All @@ -129,7 +203,7 @@ jobs:
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- run: sudo bash scripts/environment/bootstrap-ubuntu-20.04.sh
- run: sudo bash scripts/environment/bootstrap/ubuntu-20.04.sh
- run: bash scripts/environment/prepare.sh
- run: make slim-builds
- run: make test-integration-aws
Expand All @@ -145,7 +219,7 @@ jobs:
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- run: sudo bash scripts/environment/bootstrap-ubuntu-20.04.sh
- run: sudo bash scripts/environment/bootstrap/ubuntu-20.04.sh
- run: bash scripts/environment/prepare.sh
- run: make slim-builds
- run: make test-integration-clickhouse
Expand All @@ -161,7 +235,7 @@ jobs:
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- run: sudo bash scripts/environment/bootstrap-ubuntu-20.04.sh
- run: sudo bash scripts/environment/bootstrap/ubuntu-20.04.sh
- run: bash scripts/environment/prepare.sh
- run: make slim-builds
- run: make test-integration-docker
Expand All @@ -177,7 +251,7 @@ jobs:
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- run: sudo bash scripts/environment/bootstrap-ubuntu-20.04.sh
- run: sudo bash scripts/environment/bootstrap/ubuntu-20.04.sh
- run: bash scripts/environment/prepare.sh
- run: make slim-builds
- run: make test-integration-elasticsearch
Expand All @@ -193,7 +267,7 @@ jobs:
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- run: sudo bash scripts/environment/bootstrap-ubuntu-20.04.sh
- run: sudo bash scripts/environment/bootstrap/ubuntu-20.04.sh
- run: bash scripts/environment/prepare.sh
- run: make slim-builds
- run: make test-integration-gcp
Expand All @@ -209,7 +283,7 @@ jobs:
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- run: sudo bash scripts/environment/bootstrap-ubuntu-20.04.sh
- run: sudo bash scripts/environment/bootstrap/ubuntu-20.04.sh
- run: bash scripts/environment/prepare.sh
- run: make slim-builds
- run: make test-integration-influxdb
Expand All @@ -225,7 +299,7 @@ jobs:
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- run: sudo bash scripts/environment/bootstrap-ubuntu-20.04.sh
- run: sudo bash scripts/environment/bootstrap/ubuntu-20.04.sh
- run: bash scripts/environment/prepare.sh
- run: make slim-builds
- run: make test-integration-kafka
Expand All @@ -241,7 +315,7 @@ jobs:
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- run: sudo bash scripts/environment/bootstrap-ubuntu-20.04.sh
- run: sudo bash scripts/environment/bootstrap/ubuntu-20.04.sh
- run: bash scripts/environment/prepare.sh
- run: make slim-builds
- run: make test-integration-loki
Expand All @@ -257,7 +331,7 @@ jobs:
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- run: sudo bash scripts/environment/bootstrap-ubuntu-20.04.sh
- run: sudo bash scripts/environment/bootstrap/ubuntu-20.04.sh
- run: bash scripts/environment/prepare.sh
- run: make slim-builds
- run: make test-integration-pulsar
Expand All @@ -273,7 +347,7 @@ jobs:
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- run: sudo bash scripts/environment/bootstrap-ubuntu-20.04.sh
- run: sudo bash scripts/environment/bootstrap/ubuntu-20.04.sh
- run: bash scripts/environment/prepare.sh
- run: make slim-builds
- run: make test-integration-splunk
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ scripts/package-lock.json
target
node_modules
tests/data/wasm/*/target
scripts/environment/cross
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -201,20 +201,20 @@ k8s-test-framework = { version = "0.1", path = "lib/k8s-test-framework" }
[features]
# Default features for *-unknown-linux-gnu and *-apple-darwin
default = ["sources", "transforms", "sinks", "vendor-all", "unix", "leveldb-plain", "rdkafka-plain"]
default-musl = ["sources", "transforms", "sinks", "vendor-all", "unix", "leveldb-cmake", "rdkafka-cmake"]
default-musl = ["sources", "transforms", "sinks", "vendor-all", "unix", "leveldb-plain", "rdkafka-plain"]
# Default features for *-unknown-linux-* which make use of `cmake` for dependencies
default-cmake = ["sources", "transforms", "sinks", "vendor-all", "unix", "leveldb-cmake", "rdkafka-cmake"]
# Default features for *-pc-windows-msvc
# TODO: Enable SASL https://github.com/timberio/vector/pull/3081#issuecomment-659298042
default-msvc = ["sources", "transforms", "sinks", "vendor-openssl", "vendor-libz", "leveldb-cmake", "rdkafka-cmake"]
default-msvc = ["sources", "transforms", "sinks", "vendor-openssl", "vendor-libz", "rdkafka-cmake"]

# Enables features that work only on systems providing `cfg(unix)`
unix = ["jemallocator"]
# These are **very** useful on Cross compilations!
vendor-all = ["vendor-sasl", "vendor-openssl", "vendor-libz"]
vendor-sasl = ["rdkafka/gssapi-vendored"]
vendor-openssl = ["openssl/vendored"]
vendor-libz = ["libz-sys/static"]
vendor-openssl = ["openssl/vendored", "rdkafka/ssl-vendored"]
vendor-libz = ["libz-sys/static", "rdkafka/libz-static"]
sasl = ["rdkafka/gssapi"]
# This feature is less portable, but doesn't require `cmake` as build dependency
rdkafka-plain = ["rdkafka"]
Expand Down
Loading