Skip to content
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

chore: patch z3-sys & add musl build to ci #14786

Merged
merged 9 commits into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions .github/actions/build_bindings_python/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ runs:
rust-toolchain: ${{ steps.toolchain.outputs.RUST_TOOLCHAIN }}
working-directory: src/bendpy
target: ${{ inputs.target }}
manylinux: auto
manylinux: "2_28"
# Keep them in one line due to https://github.com/PyO3/maturin-action/issues/153
rustup-components: rust-std rustfmt
args: ${{ steps.opts.outputs.BUILD_ARGS }}
Expand All @@ -62,7 +62,7 @@ runs:
- name: Run tests
working-directory: src/bendpy
if: startsWith(inputs.target, 'x86_64-')
if: endsWith(inputs.target, '-gnu')
shell: bash
run: |
pip install dist/*.whl
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/build_linux/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ runs:
flags="-C target-feature=+sse4.2"
;;
x86_64-unknown-linux-musl)
flags="-C target-feature=+sse4.2 -C link-arg=--max-memory=4294967296"
flags="-C target-feature=+sse4.2"
;;
aarch64-unknown-linux-gnu)
flags=""
;;
aarch64-unknown-linux-musl)
flags="-C link-arg=--max-memory=4294967296"
flags=""
;;
*)
flags=""
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/build_linux_sanitizer/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ runs:
if: env.BUILD_PROFILE == 'debug' && endsWith(inputs.target, '-gnu')
shell: bash
run: |
artifacts="meta,metactl,query"
artifacts="${{ inputs.artifacts }}"
for artifact in ${artifacts//,/ }; do
echo "==> building databend-$artifact with sanitizer ..."
cargo -Zbuild-std -Zgitoxide=fetch -Zgit=shallow-index,shallow-deps build --target ${{ inputs.target }} --features ${{ inputs.features }} --manifest-path src/binaries/Cargo.toml --bin databend-$artifact
Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/bindings.python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,19 @@ concurrency:

jobs:
linux:
runs-on: [self-hosted, X64, Linux, 8c16g, gcp]
runs-on: [self-hosted, "${{ matrix.runner }}", Linux, 8c16g, gcp]
strategy:
matrix:
target:
- x86_64-unknown-linux-gnu
include:
- { arch: x86_64, runner: X64 }
# - { arch: aarch64, runner: ARM64 }
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/build_bindings_python
with:
target: ${{ matrix.target }}
target: ${{ matrix.arch }}-unknown-linux-gnu
version: ${{ inputs.tag }}
- name: upload
if: inputs.tag
Expand All @@ -45,15 +46,15 @@ jobs:
runs-on: macos-latest
strategy:
matrix:
target:
- aarch64-apple-darwin
arch:
- aarch64
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/build_bindings_python
with:
target: ${{ matrix.target }}
target: ${{ matrix.arch }}-apple-darwin
version: ${{ inputs.tag }}
- name: upload
if: inputs.tag
Expand Down
60 changes: 41 additions & 19 deletions .github/workflows/build_tool.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,72 +13,94 @@ permissions:
contents: read

jobs:
build:
debian:
runs-on: ubuntu-latest
strategy:
matrix:
os:
- debian
- alpine
steps:
- uses: actions/checkout@v4

- uses: ./.github/actions/setup_docker
id: login
with:
repo: build-tool
ecr_role_arn: ${{ secrets.ECR_ROLE_ARN }}
dockerhub_user: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Get rust toolchain version
id: toolchain
run: |
version=$(awk -F'[ ="]+' '$1 == "channel" { print $2 }' scripts/setup/rust-toolchain.toml)
echo "TOOLCHAIN=${version}" >> $GITHUB_OUTPUT

- name: Build and publish databend build image
uses: docker/build-push-action@v5
with:
pull: true
push: true
tags: |
${{ steps.login.outputs.dockerhub_repo }}:${{ matrix.os }}
${{ steps.login.outputs.dockerhub_repo }}:${{ matrix.os }}-${{ steps.toolchain.outputs.TOOLCHAIN }}
${{ steps.login.outputs.dockerhub_repo }}:debian
${{ steps.login.outputs.dockerhub_repo }}:debian-${{ steps.toolchain.outputs.TOOLCHAIN }}
context: ./scripts/setup
file: ./docker/build-tool/${{ matrix.os }}/Dockerfile
file: ./docker/build-tool/debian/Dockerfile
platforms: linux/amd64,linux/arm64

dev:
musl:
runs-on: ubuntu-latest
needs: build
strategy:
matrix:
arch:
- aarch64
- x86_64
steps:
- uses: actions/checkout@v4

- uses: ./.github/actions/setup_docker
id: login
with:
repo: build-tool
ecr_role_arn: ${{ secrets.ECR_ROLE_ARN }}
dockerhub_user: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Get rust toolchain version
id: toolchain
run: |
version=$(awk -F'[ ="]+' '$1 == "channel" { print $2 }' scripts/setup/rust-toolchain.toml)
echo "TOOLCHAIN=${version}" >> $GITHUB_OUTPUT
- name: Build and publish databend build image
uses: docker/build-push-action@v5
with:
pull: true
push: true
tags: |
${{ steps.login.outputs.dockerhub_repo }}:${{ matrix.arch }}-unknown-linux-musl
${{ steps.login.outputs.dockerhub_repo }}:${{ matrix.arch }}-unknown-linux-musl-${{ steps.toolchain.outputs.TOOLCHAIN }}
context: ./docker/build-tool/musl
file: ./docker/build-tool/musl/Dockerfile
build-args: |
ARCH=${{ matrix.arch }}
RUST_TOOLCHAIN=${{ steps.toolchain.outputs.TOOLCHAIN }}

- name: Build and publish databend build base image
dev:
runs-on: ubuntu-latest
needs: debian
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup_docker
id: login
with:
repo: build-tool
ecr_role_arn: ${{ secrets.ECR_ROLE_ARN }}
dockerhub_user: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Get rust toolchain version
id: toolchain
run: |
version=$(awk -F'[ ="]+' '$1 == "channel" { print $2 }' scripts/setup/rust-toolchain.toml)
echo "TOOLCHAIN=${version}" >> $GITHUB_OUTPUT
- name: Build and publish databend build image
uses: docker/build-push-action@v5
with:
pull: true
push: true
tags: |
${{ steps.login.outputs.dockerhub_repo }}:dev
${{ steps.login.outputs.dockerhub_repo }}:dev-${{ steps.toolchain.outputs.TOOLCHAIN }}
${{ steps.login.outputs.ecr_repo }}:dev
${{ steps.login.outputs.ecr_repo }}:dev-${{ steps.toolchain.outputs.TOOLCHAIN }}
context: ./scripts/setup
file: ./docker/build-tool/dev/Dockerfile
build-args: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/cloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ jobs:
strategy:
matrix:
include:
- {target: x86_64-unknown-linux-gnu, runner: X64}
- {target: aarch64-unknown-linux-gnu, runner: ARM64}
- {arch: x86_64, runner: X64}
- {arch: aarch64, runner: ARM64}
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -59,7 +59,7 @@ jobs:
timeout-minutes: 60
with:
sha: ${{ needs.info.outputs.sha }}
target: ${{ matrix.target }}
target: ${{ matrix.arch }}-unknown-linux-gnu
artifacts: meta,query

docker:
Expand Down
45 changes: 23 additions & 22 deletions .github/workflows/reuse.linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
fail-fast: false
matrix:
include:
- { target: x86_64-unknown-linux-gnu, runner: X64 }
- { arch: x86_64, runner: X64 }
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -69,7 +69,7 @@ jobs:
timeout-minutes: 60
with:
sha: ${{ github.sha }}
target: ${{ matrix.target }}
target: ${{ matrix.arch }}-unknown-linux-gnu
artifacts: all

build_address_sanitizer:
Expand All @@ -78,7 +78,7 @@ jobs:
fail-fast: false
matrix:
include:
- { target: aarch64-unknown-linux-gnu, runner: ARM64 }
- { arch: aarch64, runner: ARM64 }
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -87,27 +87,28 @@ jobs:
- uses: ./.github/actions/build_linux_sanitizer
timeout-minutes: 60
with:
target: ${{ matrix.target }}
target: ${{ matrix.arch }}-unknown-linux-gnu
artifacts: query

# build_other:
# runs-on: [self-hosted, "${{ matrix.runner }}", Linux, 16c32g, "${{ inputs.runner_provider }}"]
# strategy:
# fail-fast: false
# matrix:
# include:
# - { target: aarch64-unknown-linux-musl, runner: ARM64 }
# steps:
# - uses: actions/checkout@v4
# with:
# # fetch all tags, metasrv and metaclient need tag as its version.
# fetch-depth: 0
# - uses: ./.github/actions/build_linux
# timeout-minutes: 60
# with:
# sha: ${{ github.sha }}
# target: ${{ matrix.target }}
# artifacts: query
build_musl:
runs-on: [self-hosted, X64, Linux, 16c32g, "${{ inputs.runner_provider }}"]
strategy:
fail-fast: false
matrix:
arch:
- x86_64
- aarch64
steps:
- uses: actions/checkout@v4
with:
# fetch all tags, metasrv and metaclient need tag as its version.
fetch-depth: 0
- uses: ./.github/actions/build_linux
timeout-minutes: 60
with:
sha: ${{ github.sha }}
target: ${{ matrix.arch }}-unknown-linux-musl
artifacts: query

test_unit:
runs-on: [self-hosted, X64, Linux, 16c32g, "${{ inputs.runner_provider }}"]
Expand Down
Loading
Loading