feat: support arrow_result_version. (#769) #125
This file contains hidden or 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
| # .github/workflows/docker-publish.yml | |
| name: TTC docker publish | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - v* | |
| paths: | |
| - 'core/**' | |
| - 'driver/**' | |
| - 'ttc/**' | |
| - 'sql/**' | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| target: | |
| - x86_64-unknown-linux-musl | |
| - aarch64-unknown-linux-musl | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - uses: ./.github/actions/setup | |
| with: | |
| cache-key: ttc-${{ matrix.target }} | |
| target: ${{ matrix.target }} | |
| - name: Install cross | |
| run: | | |
| cargo install cross | |
| - name: Build TTC | |
| run: | | |
| cross build --bin ttc-server --package databend-ttc --release --target ${{ matrix.target }} | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ttc-binaries-${{ matrix.target }} | |
| path: target/${{ matrix.target }}/release/ttc-server | |
| docker: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Download build artifacts for x86_64-unknown-linux-musl | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: ttc-binaries-x86_64-unknown-linux-musl | |
| path: dist/linux/amd64 | |
| - name: Download build artifacts for aarch64-unknown-linux-musl | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: ttc-binaries-aarch64-unknown-linux-musl | |
| path: dist/linux/arm64 | |
| - name: Check artifacts | |
| run: | | |
| tree dist/ | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Set Docker tag | |
| id: tag | |
| shell: bash | |
| run: | | |
| ref_v="${{ github.ref }}" | |
| if [[ $ref_v == refs/tags/* ]]; then | |
| DOCKER_TAG=${ref_v:10} | |
| else | |
| DOCKER_TAG="latest" | |
| fi | |
| echo "tag=${DOCKER_TAG}" >> $GITHUB_OUTPUT | |
| - name: Login to DockerHub | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ github.token }} | |
| - name: TTC Build and push | |
| uses: docker/build-push-action@v6 | |
| with: | |
| push: true | |
| context: . | |
| file: ./ttc/Dockerfile | |
| platforms: linux/amd64,linux/arm64 | |
| tags: ghcr.io/databendlabs/ttc-rust:${{ steps.tag.outputs.tag }} |