diff --git a/.github/workflows/arm64-alpine-smoke.yml b/.github/workflows/arm64-alpine-smoke.yml new file mode 100644 index 0000000..6599204 --- /dev/null +++ b/.github/workflows/arm64-alpine-smoke.yml @@ -0,0 +1,52 @@ +name: ARM64 Alpine Smoke Test + +on: + workflow_dispatch: + inputs: + version: + description: "Citus version to build (blank = Dockerfile default)" + required: false + default: "" + +jobs: + arm64-alpine-smoke: + runs-on: ubuntu-24.04-arm + steps: + - name: Checkout repository + uses: actions/checkout@v6 + + - name: Build alpine image (native arm64) + run: | + BUILD_ARGS="" + if [ -n "${{ github.event.inputs.version }}" ]; then + BUILD_ARGS="--build-arg VERSION=${{ github.event.inputs.version }}" + fi + docker build -f alpine/Dockerfile $BUILD_ARGS -t citus-smoke:alpine . + + - name: Assert image architecture is arm64 + run: | + arch="$(docker run --rm citus-smoke:alpine uname -m)" + echo "Image arch: $arch" + test "$arch" = "aarch64" + + - name: Start container + run: docker run -d --name citus-smoke -e POSTGRES_HOST_AUTH_METHOD=trust citus-smoke:alpine + + - name: Wait for healthy + run: | + for i in $(seq 1 30); do + status="$(docker inspect --format '{{.State.Health.Status}}' citus-smoke)" + echo "health: $status" + [ "$status" = "healthy" ] && exit 0 + sleep 4 + done + echo "Container did not become healthy"; docker logs citus-smoke; exit 1 + + - name: Citus smoke SQL + run: | + docker exec citus-smoke psql -U postgres -v ON_ERROR_STOP=1 -c "SELECT citus_version();" + docker exec citus-smoke psql -U postgres -v ON_ERROR_STOP=1 -c "SELECT extname FROM pg_extension WHERE extname='citus';" + + - name: Cleanup + if: always() + run: docker rm -f citus-smoke || true diff --git a/.github/workflows/publish_docker_images_cron.yml b/.github/workflows/publish_docker_images_cron.yml index c04523d..55275a5 100644 --- a/.github/workflows/publish_docker_images_cron.yml +++ b/.github/workflows/publish_docker_images_cron.yml @@ -26,8 +26,14 @@ jobs: - name: Checkout repository uses: actions/checkout@v6 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Clone tools branch - run: git clone -b v0.8.36 --depth=1 https://github.com/citusdata/tools.git tools + run: git clone -b v0.8.38 --depth=1 https://github.com/citusdata/tools.git tools - name: Install package dependencies run: sudo apt-get update && sudo apt install libcurl4-openssl-dev libssl-dev python3-testresources @@ -39,6 +45,8 @@ jobs: run: docker login -u "${DOCKERHUB_USER_NAME}" -p "${DOCKERHUB_PASSWORD}" - name: Build and publish docker images + env: + DOCKER_BUILD_MULTI_ARCH: ${{ github.ref == 'refs/heads/master' && '1' || '0' }} run: | python -m tools.packaging_automation.publish_docker \ --pipeline_trigger_type "${GITHUB_EVENT_NAME}" \ diff --git a/.github/workflows/publish_docker_images_on_manual.yml b/.github/workflows/publish_docker_images_on_manual.yml index 1ba8cb3..3fcac1d 100644 --- a/.github/workflows/publish_docker_images_on_manual.yml +++ b/.github/workflows/publish_docker_images_on_manual.yml @@ -25,8 +25,14 @@ jobs: - name: Checkout repository uses: actions/checkout@v6 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Clone tools branch - run: git clone -b v0.8.36 --depth=1 https://github.com/citusdata/tools.git tools + run: git clone -b v0.8.38 --depth=1 https://github.com/citusdata/tools.git tools - name: Install package dependencies run: sudo apt-get update && sudo apt install libcurl4-openssl-dev libssl-dev python3-testresources @@ -38,6 +44,8 @@ jobs: run: docker login -u "${DOCKERHUB_USER_NAME}" -p "${DOCKERHUB_PASSWORD}" - name: Build and publish docker images + env: + DOCKER_BUILD_MULTI_ARCH: "1" run: | python -m tools.packaging_automation.publish_docker \ --pipeline_trigger_type "${GITHUB_EVENT_NAME}" \ diff --git a/.github/workflows/publish_docker_images_on_push.yml b/.github/workflows/publish_docker_images_on_push.yml index 92687e3..ea79e7f 100644 --- a/.github/workflows/publish_docker_images_on_push.yml +++ b/.github/workflows/publish_docker_images_on_push.yml @@ -24,8 +24,14 @@ jobs: - name: Checkout repository uses: actions/checkout@v6 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Clone tools branch - run: git clone -b v0.8.36 --depth=1 https://github.com/citusdata/tools.git tools + run: git clone -b v0.8.38 --depth=1 https://github.com/citusdata/tools.git tools - name: Install package dependencies run: sudo apt-get update && sudo apt install libcurl4-openssl-dev libssl-dev python3-testresources @@ -37,6 +43,8 @@ jobs: run: docker login -u "${DOCKERHUB_USER_NAME}" -p "${DOCKERHUB_PASSWORD}" - name: Build and publish docker images + env: + DOCKER_BUILD_MULTI_ARCH: ${{ github.ref == 'refs/heads/master' && '1' || '0' }} run: | python -m tools.packaging_automation.publish_docker \ --github_ref "${GITHUB_REF}" \ diff --git a/.github/workflows/publish_docker_images_on_tag.yml b/.github/workflows/publish_docker_images_on_tag.yml index c1f77bb..f2d1a69 100644 --- a/.github/workflows/publish_docker_images_on_tag.yml +++ b/.github/workflows/publish_docker_images_on_tag.yml @@ -27,8 +27,14 @@ jobs: fetch-depth: 0 ref: master + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Clone tools branch - run: git clone -b v0.8.36 --depth=1 https://github.com/citusdata/tools.git tools + run: git clone -b v0.8.38 --depth=1 https://github.com/citusdata/tools.git tools - name: Install package dependencies run: sudo apt-get update && sudo apt install libcurl4-openssl-dev libssl-dev python3-testresources @@ -40,6 +46,8 @@ jobs: run: docker login -u "${DOCKERHUB_USER_NAME}" -p "${DOCKERHUB_PASSWORD}" - name: Build and publish docker images + env: + DOCKER_BUILD_MULTI_ARCH: "1" run: | python -m tools.packaging_automation.publish_docker \ --github_ref "${GITHUB_REF}" \