Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: technowledgy/postgresql-buildfarm-alpine
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3342ab27b7066a723258675a3a579c8b0ca8d1f1
Choose a base ref
..
head repository: technowledgy/postgresql-buildfarm-alpine
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 222978287d7508e8d30b18de107ff3f6bb30b474
Choose a head ref
Showing with 146 additions and 105 deletions.
  1. +6 −2 .github/renovate.json
  2. +4 −4 .github/workflows/lint.yaml
  3. +21 −17 .github/workflows/run.yaml
  4. +13 −13 .github/workflows/test.yaml
  5. +35 −0 .github/workflows/update.yaml
  6. +2 −0 .shellcheckrc
  7. +16 −18 Dockerfile
  8. +8 −2 autoconf.conf
  9. +0 −38 client.patch
  10. +9 −6 meson.conf
  11. +6 −2 shared.conf
  12. +6 −3 test.sh
  13. +20 −0 update.sh
8 changes: 6 additions & 2 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -2,11 +2,15 @@
"extends": [
"config:best-practices",
"helpers:pinGitHubActionDigestsToSemver",
"regexManagers:dockerfileVersions"
"customManagers:dockerfileVersions"
],
"packageRules": [
{
"matchUpdateTypes": ["patch", "pin", "digest"],
"matchUpdateTypes": [
"patch",
"pin",
"digest"
],
"automerge": true
}
]
8 changes: 4 additions & 4 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -15,16 +15,16 @@ jobs:
actionlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: raven-actions/actionlint@789059c543ab20522fb3e7240794e13b0f69ad67 # v1.0.3
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: raven-actions/actionlint@01fce4f43a270a612932cb1c64d40505a029f821 # v2.0.0
with:
cache: false


hadolint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: hadolint/hadolint-action@54c9adbab1582c2ef04b2016b760714a4bfde3cf # v3.1.0
with:
dockerfile: Dockerfile
@@ -33,5 +33,5 @@ jobs:
shellcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: ludeeus/action-shellcheck@00cae500b08a931fb5698e11e79bfbd38e612a38 # 2.0.0
38 changes: 21 additions & 17 deletions .github/workflows/run.yaml
Original file line number Diff line number Diff line change
@@ -4,68 +4,72 @@ on:
schedule:
# The docs suggest not to schedule this on the full hour:
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule
- cron: '42 0,6,12,18 * * *'
- cron: '42 0,8,16 * * *'

jobs:
run:
runs-on: ubuntu-latest
strategy:
fail-fast: false
max-parallel: 1
matrix:
builder:
- autoconf
branch:
- REL_12_STABLE
- REL_13_STABLE
- REL_14_STABLE
- REL_15_STABLE
- REL_16_STABLE
- REL_17_STABLE
- HEAD
include:
- builder: meson
branch: REL_16_STABLE
- builder: meson
branch: REL_17_STABLE
- builder: meson
branch: HEAD
name: ${{ matrix.branch }} (${{ matrix.builder }})
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@2b51285047da1547ffb1b2203d8be4c0af6b1f20 # v3.2.0
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0
- name: Build Dockerfile
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.0
uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6.15.0
with:
context: .
load: true
push: false
tags: buildfarm-client:alpine
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: postgres/postgres
ref: ${{ matrix.branch != 'HEAD' && matrix.branch || '' }}
path: source
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
# TODO: Change to shallow-since once this is solved:
# https://github.com/actions/checkout/issues/947
fetch-depth: 100
- id: postgres
run: echo "commit=$(git -C source rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
- uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
with:
path: build
key: run-alpine-${{ matrix.builder }}-${{ matrix.branch }}
key: run-alpine-${{ matrix.builder }}-${{ matrix.branch }}-${{ steps.postgres.outputs.commit }}
restore-keys: run-alpine-${{ matrix.builder }}-${{ matrix.branch }}-
- name: Run buildfarm client
run: |
mkdir -p build
docker run --rm \
-e AUTOCONF_ANIMAL=${{ vars.AUTOCONF_ANIMAL }} \
-e AUTOCONF_SECRET=${{ secrets.AUTOCONF_SECRET }} \
-e MESON_ANIMAL=${{ vars.MESON_ANIMAL }} \
-e MESON_SECRET=${{ secrets.MESON_SECRET }} \
-e ANIMAL=${{ matrix.builder == 'autoconf' && vars.AUTOCONF_ANIMAL || vars.MESON_ANIMAL }} \
-e SECRET=${{ matrix.builder == 'autoconf' && secrets.AUTOCONF_SECRET || secrets.MESON_SECRET }} \
-v ./build:/mnt/build \
-v ./source:/mnt/source \
-u "$(id -u):$(id -g)" \
buildfarm-client:alpine \
--test \
--from-source /mnt/source \
--force \
--config ${{ matrix.builder }}.conf \
--skip-steps=recovery-check \
--skip-suites=recovery \
${{ matrix.branch }}
- uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
- uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
if: always()
with:
name: ${{ matrix.builder }}-${{ matrix.branch }}-logs
26 changes: 13 additions & 13 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -22,25 +22,28 @@ jobs:
- meson
name: Test ${{ matrix.builder }}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@2b51285047da1547ffb1b2203d8be4c0af6b1f20 # v3.2.0
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0
- name: Build Dockerfile
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.0
uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6.15.0
with:
context: .
load: true
push: false
tags: buildfarm-client:alpine
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: postgres/postgres
path: source
- uses: actions/cache/restore@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
- id: postgres
run: echo "commit=$(git -C source rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
- uses: actions/cache/restore@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
id: restore-cache
with:
path: build
key: test-alpine-${{ matrix.builder }}
key: test-alpine-${{ matrix.builder }}-${{ steps.postgres.outputs.commit }}
restore-keys: test-alpine-${{ matrix.builder }}-
- name: Test ${{ matrix.builder }}.conf
run: |
mkdir -p build
@@ -50,18 +53,15 @@ jobs:
-u "$(id -u):$(id -g)" \
buildfarm-client:alpine \
--test \
--from-source /mnt/source \
--config ${{ matrix.builder }}.conf \
--skip-steps=recovery-check \
--skip-suites=recovery
- uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
--config ${{ matrix.builder }}.conf
- uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
if: always()
with:
name: ${{ matrix.builder }}-logs
path: build/**/*.log
if-no-files-found: error
- uses: actions/cache/save@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
- uses: actions/cache/save@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
if: github.ref == 'refs/heads/main'
with:
path: build
key: ${{ steps.restore-cache.outputs.cache-primary-key }}
key: test-alpine-${{ matrix.builder }}-${{ steps.postgres.outputs.commit }}
35 changes: 35 additions & 0 deletions .github/workflows/update.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Update personality

on:
workflow_dispatch:

jobs:
update:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
builder:
- autoconf
- meson
name: Update personality (${{ matrix.builder }})
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0
- name: Build Dockerfile
uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6.15.0
with:
context: .
load: true
push: false
tags: buildfarm-client:alpine
- name: Update OS and Compiler versions
run: |
docker run --rm \
-e ANIMAL=${{ matrix.builder == 'autoconf' && vars.AUTOCONF_ANIMAL || vars.MESON_ANIMAL }} \
-e SECRET=${{ matrix.builder == 'autoconf' && secrets.AUTOCONF_SECRET || secrets.MESON_SECRET }} \
--entrypoint "" \
buildfarm-client:alpine \
./update.sh \
--config ${{ matrix.builder }}.conf
2 changes: 2 additions & 0 deletions .shellcheckrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# disable "not following /etc/os-release" warning
disable=SC1091
34 changes: 16 additions & 18 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM library/alpine:3.19.1@sha256:c5b1261d6d3e43071626931fc004f70149baeba2c8ec672bd4f27761f8e1ad6b
FROM library/alpine:3.21.3@sha256:a8560b36e8b8210634f77d9f7f9efd7ffa463e380b75e2e74aff4511df3ef88c

SHELL ["/bin/sh", "-eux", "-c"]

@@ -7,7 +7,8 @@ RUN apk add \
bison \
build-base \
ccache \
clang17 \
clang18 \
curl-dev \
flex \
gettext-tiny-dev \
git \
@@ -18,11 +19,13 @@ RUN apk add \
libxml2-dev \
libxslt-dev \
linux-headers \
llvm17-dev \
llvm18-dev \
lz4-dev \
meson \
ninja \
nss_wrapper \
openldap \
openldap-clients \
openldap-dev \
openssl \
openssl-dev \
@@ -34,28 +37,23 @@ RUN apk add \
perl-mozilla-ca \
python3-dev \
tcl-dev \
tini \
zlib-dev \
zstd-dev

# renovate: datasource=github-tags depName=buildfarm-client lookupName=PGBuildFarm/client-code versioning=redhat extractVersion=REL_(?<version>.*)
ARG BUILDFARM_CLIENT_VERSION=REL_17
ENV CLANG=/usr/lib/llvm18/bin/clang
ENV LLVM_CONFIG=/usr/lib/llvm18/bin/llvm-config

RUN git clone --depth 1 --branch ${BUILDFARM_CLIENT_VERSION} https://github.com/PGBuildFarm/client-code /usr/src
# renovate: datasource=github-tags depName=buildfarm-client lookupName=PGBuildFarm/client-code versioning=regex:^(?<major>\d+)(_(?<minor>\d+))?$ extractVersion=REL_(?<version>.*)
ARG BUILDFARM_CLIENT_VERSION=19_1

WORKDIR /usr/src
RUN git clone --depth 1 --branch REL_${BUILDFARM_CLIENT_VERSION} https://github.com/PGBuildFarm/client-code /usr/src

# TODO: Upstream this patch to PGBuildFarm/client-code
COPY client.patch .
RUN git apply client.patch
WORKDIR /usr/src

COPY docker-entrypoint.sh /
COPY *.conf /usr/src
COPY update.sh /usr/src

ENTRYPOINT ["/docker-entrypoint.sh"]
CMD [ \
"--test", \
"--config", \
"autoconf.conf", \
"--skip-steps=recovery-check", \
"--skip-suites=recovery" \
]
ENTRYPOINT ["/sbin/tini", "--", "/docker-entrypoint.sh"]
CMD ["--test", "--config", "autoconf.conf"]
10 changes: 8 additions & 2 deletions autoconf.conf
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
require 'shared.conf';

$PGBuild::conf{animal} = $ENV{AUTOCONF_ANIMAL} // 'autoconf';
$PGGBuild::conf{secret} = $ENV{AUTOCONF_SECRET} // $PGBuild::conf{secret};
$PGBuild::conf{animal} = $ENV{ANIMAL} // 'autoconf';
$PGBuild::conf{secret} = $ENV{SECRET} // $PGBuild::conf{secret};

$PGBuild::conf{make_jobs} = 2;

@PGBuild::conf{build_env}->{PG_TEST_EXTRA} = 'ssl kerberos ldap oauth';

push(@{$PGBuild::conf{config_opts}}, (
'--enable-tap-tests',
'--with-llvm',
'--with-ssl=openssl',
'--with-uuid=ossp'
));

if ($branch eq 'HEAD' || $branch ge 'REL_18') {
push(@{$PGBuild::conf{meson_opts}}, '--with-libcurl');
}

# TODO: Currently failing two tests:
# initdb/001_initdb
# icu / icu/010_database
38 changes: 0 additions & 38 deletions client.patch

This file was deleted.

Loading