Skip to content

feat: Add DurationVisitors for serde for modular serialization and de… #2

feat: Add DurationVisitors for serde for modular serialization and de…

feat: Add DurationVisitors for serde for modular serialization and de… #2

Workflow file for this run

name: 🚀 Release
on:
push:
branches:
- main
# We can't use `release-*` here because release-please uses `release-please-*` prefix
- "rel-*"
pull_request:
paths:
- ".github/workflows/release.yml"
workflow_dispatch:
env:
RUST_BACKTRACE: short
RUSTUP_MAX_RETRIES: 10
# Publish the build output as CI artifact to inspect
preview: ${{ !startsWith(github.ref, 'refs/tags/') || github.repository != 'lakekeeper/lakekeeper' }}
permissions:
contents: write # Needed for creating releases and uploading assets
pull-requests: write # Needed for release-please to create/update PRs
jobs:
# Update release PR
release_please:
name: Release Please
runs-on: ubuntu-24.04
if: ((github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.repository == 'lakekeeper/lakekeeper') || (github.event_name == 'pull_request' && github.repository == 'lakekeeper/lakekeeper' && github.event.pull_request.head.repo.full_name == github.repository)
outputs:
releases_created: ${{ steps.release.outputs.releases_created }}
tag_name: ${{ steps.release.outputs.tag_name }}
major: ${{ steps.release.outputs.major }}
minor: ${{ steps.release.outputs.minor }}
patch: ${{ steps.release.outputs.patch }}
steps:
- name: echo repository and branch
run: |
echo "Repository name: $GITHUB_REPOSITORY"
echo "Branch name: $GITHUB_REF"
- uses: googleapis/release-please-action@v4
id: release
with:
token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
config-file: release-please/release-please-config.json
manifest-file: release-please/.release-please-manifest.json
# # The short ref name of the branch or tag that triggered
# # the workflow run. For example, `main` or `1.x`
# target-branch: ${{ github.ref_name }}
build-binary:
name: Build Binary
needs:
- release_please
# not supported by windows nor macos
# services:
# postgres:
# image: postgres:16
# env:
# POSTGRES_USER: postgres
# POSTGRES_PASSWORD: postgres
# POSTGRES_DB: postgres
# options: >-
# --health-cmd pg_isready
# --health-interval 10s
# --health-timeout 5s
# --health-retries 5
# ports:
# - 5432:5432
strategy:
matrix:
include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-22.04
name: lakekeeper-x86_64-unknown-linux-gnu.tar.gz
- target: aarch64-unknown-linux-gnu
os: ubuntu-22.04-arm
name: lakekeeper-aarch64-unknown-linux-gnu.tar.gz
- target: aarch64-apple-darwin
os: macos-14
name: lakekeeper-aarch64-apple-darwin.tar.gz
# - target: x86_64-pc-windows-msvc
# os: windows-latest
# name: lakekeeper-x86_64-pc-windows-msvc.zip
# rustflags: -C target-feature=+crt-static
# # Windows with cross is extremely slow
# cross: false
#
# - target: aarch64-pc-windows-msvc
# os: windows-latest
# name: lakekeeper-aarch64-pc-windows-msvc.zip
# rustflags: -C target-feature=+crt-static
# cross: false
runs-on: ${{ matrix.os }}
continue-on-error: true
env:
RUSTFLAGS: --cfg tracing_unstable -D warnings
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
target: ${{ matrix.target }}
cache: false
- name: Setup node
uses: actions/setup-node@v6
with:
node-version: 23
- name: Build [Cargo]
run: cargo build --all-features --release --locked --target ${{ matrix.target }}
# - name: Prepare artifacts [Windows]
# if: matrix.os == 'windows-latest'
# run: |
# cd target/${{ matrix.target }}/release
# 7z a ../../../${{ matrix.name }} lakekeeper.exe
# cd -
- name: Prepare artifacts [-nix]
if: matrix.os != 'windows-latest'
run: |
cd target/${{ matrix.target }}/release
tar czvf ../../../${{ matrix.name }} lakekeeper
cd -
- name: Upload artifacts
uses: actions/upload-artifact@v5
with:
name: bin-${{ matrix.name }}
path: ${{ matrix.name }}
build-docker:
name: Build Docker
runs-on: ubuntu-24.04
needs:
- build-binary
- release_please
services:
postgres:
image: postgres:16
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Download Artifacts
uses: actions/download-artifact@v6
- name: List Artifacts
run: ls -lh
- name: Restore Binaries
run: |
cd bin-lakekeeper-x86_64-unknown-linux-gnu.tar.gz
tar xzvf lakekeeper-x86_64-unknown-linux-gnu.tar.gz
cd -
cd bin-lakekeeper-aarch64-unknown-linux-gnu.tar.gz
tar xzvf lakekeeper-aarch64-unknown-linux-gnu.tar.gz
ls -Rlh
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Docker info
run: docker info
- name: Build Docker image (amd64)
run: |
DOCKER_BUILDKIT=1 docker build -t localhost/lakekeeper-local:amd64 \
-f docker/bin.Dockerfile \
--build-arg "ARCH=amd64" \
--build-arg "EXPIRES=${{ needs.release_please.outputs.releases_created == 'true' && 'Never' || '4w' }}" \
--build-arg "BIN=bin-lakekeeper-x86_64-unknown-linux-gnu.tar.gz/lakekeeper" .
docker save -o /tmp/docker-lakekeeper-amd64.tar localhost/lakekeeper-local:amd64
- name: Build Docker image (arm64)
run: |
DOCKER_BUILDKIT=1 docker build \
--platform linux/arm64 -t localhost/lakekeeper-local:arm64 \
-f docker/bin.Dockerfile \
--build-arg "ARCH=arm64" \
--build-arg "EXPIRES=${{ needs.release_please.outputs.releases_created == 'true' && 'Never' || '4w' }}" \
--build-arg "BIN=bin-lakekeeper-aarch64-unknown-linux-gnu.tar.gz/lakekeeper" .
docker save -o /tmp/docker-lakekeeper-arm64.tar localhost/lakekeeper-local:arm64
- name: Save Docker
uses: actions/upload-artifact@v5
with:
name: docker-lakekeeper
path: /tmp/docker-lakekeeper-*.tar
test-docker:
name: Test Docker
runs-on: ubuntu-24.04
continue-on-error: true
needs:
- build-docker
- release_please
strategy:
matrix:
include:
- file: docker-lakekeeper/docker-lakekeeper-amd64.tar
arch: amd64
- file: docker-lakekeeper/docker-lakekeeper-arm64.tar
arch: arm64
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Download Artifacts
uses: actions/download-artifact@v6
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Docker info
run: docker info
- name: Load Docker
run: |
docker load -i ${{ matrix.file }}
docker images
- name: Test Docker
run: |
cd tests
docker compose run --quiet-pull spark /opt/entrypoint.sh bash -c "cd /opt/tests && bash run_all.sh"
env:
LAKEKEEPER_TEST__SERVER_IMAGE: localhost/lakekeeper-local:${{ matrix.arch }}
LAKEKEEPER_TEST__SPARK_IMAGE: apache/spark:3.5.6-java17-python3
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
AZURE_STORAGE_ACCOUNT_NAME: ${{ secrets.AZURE_STORAGE_ACCOUNT_NAME }}
AZURE_STORAGE_FILESYSTEM: ${{ secrets.AZURE_STORAGE_FILESYSTEM }}
GCS_CREDENTIAL: ${{ secrets.GCS_CREDENTIAL }}
GCS_BUCKET: ${{ secrets.GCS_BUCKET }}
- name: Dump docker logs on failure
if: failure()
uses: jwalton/gh-docker-logs@2741064ab9d7af54b0b1ffb6076cf64c16f0220e
debug:
name: Debug Artifacts
runs-on: ubuntu-24.04
needs:
- build-binary
- build-docker
- release_please
steps:
- name: Download Artifacts
uses: actions/download-artifact@v6
- name: List Artifacts
run: ls -Rlh
- name: Inspect Docker
run: |
docker load -i docker-lakekeeper/docker-lakekeeper-amd64.tar
docker load -i docker-lakekeeper/docker-lakekeeper-arm64.tar
docker images
docker inspect localhost/lakekeeper-local:amd64
docker inspect localhost/lakekeeper-local:arm64
- name: Release Please
run: echo ${{ needs.release_please.outputs.tag_name }}
- name: Test Login to Quay.io
uses: docker/login-action@v3
with:
registry: quay.io
username: lakekeeper+github
password: ${{ secrets.QUAY_LAKEKEEPER_PASSWORD }}
- name: Test Login to Dockerhub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
publish-container-main:
name: Publish Container (main branch)
runs-on: ubuntu-24.04
needs:
- build-docker
- build-binary
- release_please
- test-docker
if: ${{ needs.release_please.outputs.releases_created != 'true' }} && github.ref == 'refs/heads/main'

Check warning on line 308 in .github/workflows/release.yml

View workflow run for this annotation

GitHub Actions / 🚀 Release

Workflow syntax warning

.github/workflows/release.yml (Line: 308, Col: 9): Conditional expression contains literal text outside replacement tokens. This will cause the expression to always evaluate to truthy. Did you mean to put the entire expression inside ${{ }}?
steps:
- name: Download Artifacts
uses: actions/download-artifact@v6
- name: Login to Quay.io
uses: docker/login-action@v3
with:
registry: quay.io
username: lakekeeper+github
password: ${{ secrets.QUAY_LAKEKEEPER_PASSWORD }}
- name: Login to Dockerhub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Load Docker
run: |
docker load -i docker-lakekeeper/docker-lakekeeper-amd64.tar
docker load -i docker-lakekeeper/docker-lakekeeper-arm64.tar
docker images
- name: Push to quay.io
run: |
COMMIT_SHA=${GITHUB_SHA::8} # Get the first 8 characters of the commit SHA
docker tag localhost/lakekeeper-local:amd64 quay.io/lakekeeper/catalog:${COMMIT_SHA}-amd64
docker tag localhost/lakekeeper-local:arm64 quay.io/lakekeeper/catalog:${COMMIT_SHA}-arm64
docker push quay.io/lakekeeper/catalog:${COMMIT_SHA}-amd64
docker push quay.io/lakekeeper/catalog:${COMMIT_SHA}-arm64
docker manifest create quay.io/lakekeeper/catalog:latest-main quay.io/lakekeeper/catalog:${COMMIT_SHA}-amd64 quay.io/lakekeeper/catalog:${COMMIT_SHA}-arm64
docker manifest push quay.io/lakekeeper/catalog:latest-main
- name: Push to Dockerhub
run: |
COMMIT_SHA=${GITHUB_SHA::8} # Get the first 8 characters of the commit SHA
docker tag localhost/lakekeeper-local:amd64 vakamo/lakekeeper:${COMMIT_SHA}-amd64
docker tag localhost/lakekeeper-local:arm64 vakamo/lakekeeper:${COMMIT_SHA}-arm64
docker push vakamo/lakekeeper:${COMMIT_SHA}-amd64
docker push vakamo/lakekeeper:${COMMIT_SHA}-arm64
docker manifest create vakamo/lakekeeper:latest-main vakamo/lakekeeper:${COMMIT_SHA}-amd64 vakamo/lakekeeper:${COMMIT_SHA}-arm64
docker manifest push vakamo/lakekeeper:latest-main
# Create GitHub release with Rust build targets and release notes
publish-binary:
name: Publish Binary
runs-on: ubuntu-24.04
needs:
- build-binary
- build-docker
- release_please
- test-docker
if: ${{ needs.release_please.outputs.releases_created == 'true' }}
steps:
- name: Download Artifacts
uses: actions/download-artifact@v6
- name: Publish Release
run: gh release edit ${{ needs.release_please.outputs.tag_name }} --draft=false --repo=lakekeeper/lakekeeper
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build | Add Artifacts to Release
uses: softprops/action-gh-release@v2
with:
files: bin-lakekeeper-*/lakekeeper-*
tag_name: ${{ needs.release_please.outputs.tag_name }}
publish-container-lakekeeper:
name: Publish Container (Lakekeeper)
runs-on: ubuntu-24.04
needs:
- build-docker
- build-binary
- release_please
- test-docker
if: ${{ needs.release_please.outputs.releases_created == 'true' }}
steps:
- name: Download Artifacts
uses: actions/download-artifact@v6
- name: Login to Quay.io
uses: docker/login-action@v3
with:
registry: quay.io
username: lakekeeper+github
password: ${{ secrets.QUAY_LAKEKEEPER_PASSWORD }}
- name: Login to Dockerhub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Load Docker
run: |
docker load -i docker-lakekeeper/docker-lakekeeper-amd64.tar
docker load -i docker-lakekeeper/docker-lakekeeper-arm64.tar
docker images
- name: Push Images to quay.io
run: |
docker tag localhost/lakekeeper-local:amd64 quay.io/lakekeeper/catalog:${{ needs.release_please.outputs.tag_name }}-amd64
docker tag localhost/lakekeeper-local:arm64 quay.io/lakekeeper/catalog:${{ needs.release_please.outputs.tag_name }}-arm64
docker push quay.io/lakekeeper/catalog:${{ needs.release_please.outputs.tag_name }}-amd64
docker push quay.io/lakekeeper/catalog:${{ needs.release_please.outputs.tag_name }}-arm64
- name: Push Images to Dockerhub
run: |
docker tag localhost/lakekeeper-local:amd64 vakamo/lakekeeper:${{ needs.release_please.outputs.tag_name }}-amd64
docker tag localhost/lakekeeper-local:arm64 vakamo/lakekeeper:${{ needs.release_please.outputs.tag_name }}-arm64
docker push vakamo/lakekeeper:${{ needs.release_please.outputs.tag_name }}-amd64
docker push vakamo/lakekeeper:${{ needs.release_please.outputs.tag_name }}-arm64
- name: Check if Tag is vX.Y.Z
id: check-tag
run: |
if [[ ${{ needs.release_please.outputs.tag_name }} =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "match=true" >> $GITHUB_OUTPUT
fi
- name: Push Partial Tag to quay.io
if: steps.check-tag.outputs.match == 'true'
run: |
docker tag localhost/lakekeeper-local:amd64 quay.io/lakekeeper/catalog:latest-amd64
docker tag localhost/lakekeeper-local:amd64 quay.io/lakekeeper/catalog:v${{ needs.release_please.outputs.major }}-amd64
docker tag localhost/lakekeeper-local:amd64 quay.io/lakekeeper/catalog:v${{ needs.release_please.outputs.major }}.${{ needs.release_please.outputs.minor }}-amd64
docker tag localhost/lakekeeper-local:amd64 quay.io/lakekeeper/catalog:v${{ needs.release_please.outputs.major }}.${{ needs.release_please.outputs.minor }}.${{ needs.release_please.outputs.patch }}-amd64
docker tag localhost/lakekeeper-local:arm64 quay.io/lakekeeper/catalog:latest-arm64
docker tag localhost/lakekeeper-local:arm64 quay.io/lakekeeper/catalog:v${{ needs.release_please.outputs.major }}-arm64
docker tag localhost/lakekeeper-local:arm64 quay.io/lakekeeper/catalog:v${{ needs.release_please.outputs.major }}.${{ needs.release_please.outputs.minor }}-arm64
docker tag localhost/lakekeeper-local:arm64 quay.io/lakekeeper/catalog:v${{ needs.release_please.outputs.major }}.${{ needs.release_please.outputs.minor }}.${{ needs.release_please.outputs.patch }}-arm64
docker push quay.io/lakekeeper/catalog:latest-amd64
docker push quay.io/lakekeeper/catalog:v${{ needs.release_please.outputs.major }}-amd64
docker push quay.io/lakekeeper/catalog:v${{ needs.release_please.outputs.major }}.${{ needs.release_please.outputs.minor }}-amd64
docker push quay.io/lakekeeper/catalog:v${{ needs.release_please.outputs.major }}.${{ needs.release_please.outputs.minor }}.${{ needs.release_please.outputs.patch }}-amd64
docker push quay.io/lakekeeper/catalog:latest-arm64
docker push quay.io/lakekeeper/catalog:v${{ needs.release_please.outputs.major }}-arm64
docker push quay.io/lakekeeper/catalog:v${{ needs.release_please.outputs.major }}.${{ needs.release_please.outputs.minor }}-arm64
docker push quay.io/lakekeeper/catalog:v${{ needs.release_please.outputs.major }}.${{ needs.release_please.outputs.minor }}.${{ needs.release_please.outputs.patch }}-arm64
docker manifest create quay.io/lakekeeper/catalog:v${{ needs.release_please.outputs.major }} quay.io/lakekeeper/catalog:v${{ needs.release_please.outputs.major }}-amd64 quay.io/lakekeeper/catalog:v${{ needs.release_please.outputs.major }}-arm64
docker manifest push quay.io/lakekeeper/catalog:v${{ needs.release_please.outputs.major }}
docker manifest create quay.io/lakekeeper/catalog:v${{ needs.release_please.outputs.major }}.${{ needs.release_please.outputs.minor }} quay.io/lakekeeper/catalog:v${{ needs.release_please.outputs.major }}.${{ needs.release_please.outputs.minor }}-amd64 quay.io/lakekeeper/catalog:v${{ needs.release_please.outputs.major }}.${{ needs.release_please.outputs.minor }}-arm64
docker manifest push quay.io/lakekeeper/catalog:v${{ needs.release_please.outputs.major }}.${{ needs.release_please.outputs.minor }}
docker manifest create quay.io/lakekeeper/catalog:v${{ needs.release_please.outputs.major }}.${{ needs.release_please.outputs.minor }}.${{ needs.release_please.outputs.patch }} quay.io/lakekeeper/catalog:v${{ needs.release_please.outputs.major }}.${{ needs.release_please.outputs.minor }}.${{ needs.release_please.outputs.patch }}-amd64 quay.io/lakekeeper/catalog:v${{ needs.release_please.outputs.major }}.${{ needs.release_please.outputs.minor }}.${{ needs.release_please.outputs.patch }}-arm64
docker manifest push quay.io/lakekeeper/catalog:v${{ needs.release_please.outputs.major }}.${{ needs.release_please.outputs.minor }}.${{ needs.release_please.outputs.patch }}
docker image rm quay.io/lakekeeper/catalog:latest || true
docker manifest rm quay.io/lakekeeper/catalog:latest || true
docker manifest create quay.io/lakekeeper/catalog:latest quay.io/lakekeeper/catalog:latest-amd64 quay.io/lakekeeper/catalog:latest-arm64
docker manifest push quay.io/lakekeeper/catalog:latest
- name: Push Partial Tag to Dockerhub
if: steps.check-tag.outputs.match == 'true'
run: |
docker tag localhost/lakekeeper-local:amd64 vakamo/lakekeeper:latest-amd64
docker tag localhost/lakekeeper-local:amd64 vakamo/lakekeeper:v${{ needs.release_please.outputs.major }}-amd64
docker tag localhost/lakekeeper-local:amd64 vakamo/lakekeeper:v${{ needs.release_please.outputs.major }}.${{ needs.release_please.outputs.minor }}-amd64
docker tag localhost/lakekeeper-local:amd64 vakamo/lakekeeper:v${{ needs.release_please.outputs.major }}.${{ needs.release_please.outputs.minor }}.${{ needs.release_please.outputs.patch }}-amd64
docker tag localhost/lakekeeper-local:arm64 vakamo/lakekeeper:latest-arm64
docker tag localhost/lakekeeper-local:arm64 vakamo/lakekeeper:v${{ needs.release_please.outputs.major }}-arm64
docker tag localhost/lakekeeper-local:arm64 vakamo/lakekeeper:v${{ needs.release_please.outputs.major }}.${{ needs.release_please.outputs.minor }}-arm64
docker tag localhost/lakekeeper-local:arm64 vakamo/lakekeeper:v${{ needs.release_please.outputs.major }}.${{ needs.release_please.outputs.minor }}.${{ needs.release_please.outputs.patch }}-arm64
docker push vakamo/lakekeeper:latest-amd64
docker push vakamo/lakekeeper:v${{ needs.release_please.outputs.major }}-amd64
docker push vakamo/lakekeeper:v${{ needs.release_please.outputs.major }}.${{ needs.release_please.outputs.minor }}-amd64
docker push vakamo/lakekeeper:v${{ needs.release_please.outputs.major }}.${{ needs.release_please.outputs.minor }}.${{ needs.release_please.outputs.patch }}-amd64
docker push vakamo/lakekeeper:latest-arm64
docker push vakamo/lakekeeper:v${{ needs.release_please.outputs.major }}-arm64
docker push vakamo/lakekeeper:v${{ needs.release_please.outputs.major }}.${{ needs.release_please.outputs.minor }}-arm64
docker push vakamo/lakekeeper:v${{ needs.release_please.outputs.major }}.${{ needs.release_please.outputs.minor }}.${{ needs.release_please.outputs.patch }}-arm64
docker manifest create vakamo/lakekeeper:v${{ needs.release_please.outputs.major }} vakamo/lakekeeper:v${{ needs.release_please.outputs.major }}-amd64 vakamo/lakekeeper:v${{ needs.release_please.outputs.major }}-arm64
docker manifest push vakamo/lakekeeper:v${{ needs.release_please.outputs.major }}
docker manifest create vakamo/lakekeeper:v${{ needs.release_please.outputs.major }}.${{ needs.release_please.outputs.minor }} vakamo/lakekeeper:v${{ needs.release_please.outputs.major }}.${{ needs.release_please.outputs.minor }}-amd64 vakamo/lakekeeper:v${{ needs.release_please.outputs.major }}.${{ needs.release_please.outputs.minor }}-arm64
docker manifest push vakamo/lakekeeper:v${{ needs.release_please.outputs.major }}.${{ needs.release_please.outputs.minor }}
docker manifest create vakamo/lakekeeper:v${{ needs.release_please.outputs.major }}.${{ needs.release_please.outputs.minor }}.${{ needs.release_please.outputs.patch }} vakamo/lakekeeper:v${{ needs.release_please.outputs.major }}.${{ needs.release_please.outputs.minor }}.${{ needs.release_please.outputs.patch }}-amd64 vakamo/lakekeeper:v${{ needs.release_please.outputs.major }}.${{ needs.release_please.outputs.minor }}.${{ needs.release_please.outputs.patch }}-arm64
docker manifest push vakamo/lakekeeper:v${{ needs.release_please.outputs.major }}.${{ needs.release_please.outputs.minor }}.${{ needs.release_please.outputs.patch }}
docker image rm vakamo/lakekeeper:latest || true
docker manifest rm vakamo/lakekeeper:latest || true
docker manifest create vakamo/lakekeeper:latest vakamo/lakekeeper:latest-amd64 vakamo/lakekeeper:latest-arm64
docker manifest push vakamo/lakekeeper:latest