Skip to content

Package Build Dry Run #66

Package Build Dry Run

Package Build Dry Run #66

Workflow file for this run

name: Package Build Dry Run
on:
workflow_dispatch:
inputs: {}
jobs:
prep:
runs-on: ubuntu-latest
outputs:
branch: ${{ steps.whichver.outputs.branch }}
if_debian_buster_x86_64: ${{ steps.scm.outputs.if_debian_buster_x86_64 }}
if_debian_buster_aarch64: ${{ steps.scm.outputs.if_debian_buster_aarch64 }}
if_debian_bullseye_x86_64: ${{ steps.scm.outputs.if_debian_bullseye_x86_64 }}
if_debian_bullseye_aarch64: ${{ steps.scm.outputs.if_debian_bullseye_aarch64 }}
if_debian_bookworm_x86_64: ${{ steps.scm.outputs.if_debian_bookworm_x86_64 }}
if_debian_bookworm_aarch64: ${{ steps.scm.outputs.if_debian_bookworm_aarch64 }}
if_ubuntu_bionic_x86_64: ${{ steps.scm.outputs.if_ubuntu_bionic_x86_64 }}
if_ubuntu_bionic_aarch64: ${{ steps.scm.outputs.if_ubuntu_bionic_aarch64 }}
if_ubuntu_focal_x86_64: ${{ steps.scm.outputs.if_ubuntu_focal_x86_64 }}
if_ubuntu_focal_aarch64: ${{ steps.scm.outputs.if_ubuntu_focal_aarch64 }}
if_ubuntu_jammy_x86_64: ${{ steps.scm.outputs.if_ubuntu_jammy_x86_64 }}
if_ubuntu_jammy_aarch64: ${{ steps.scm.outputs.if_ubuntu_jammy_aarch64 }}
if_ubuntu_noble_x86_64: ${{ steps.scm.outputs.if_ubuntu_noble_x86_64 }}
if_ubuntu_noble_aarch64: ${{ steps.scm.outputs.if_ubuntu_noble_aarch64 }}
if_centos_8_x86_64: ${{ steps.scm.outputs.if_centos_8_x86_64 }}
if_centos_8_aarch64: ${{ steps.scm.outputs.if_centos_8_aarch64 }}
if_rockylinux_9_x86_64: ${{ steps.scm.outputs.if_rockylinux_9_x86_64 }}
if_rockylinux_9_aarch64: ${{ steps.scm.outputs.if_rockylinux_9_aarch64 }}
if_linux_x86_64: ${{ steps.scm.outputs.if_linux_x86_64 }}
if_linux_aarch64: ${{ steps.scm.outputs.if_linux_aarch64 }}
if_linuxmusl_x86_64: ${{ steps.scm.outputs.if_linuxmusl_x86_64 }}
if_linuxmusl_aarch64: ${{ steps.scm.outputs.if_linuxmusl_aarch64 }}
if_macos_x86_64: ${{ steps.scm.outputs.if_macos_x86_64 }}
if_macos_aarch64: ${{ steps.scm.outputs.if_macos_aarch64 }}
steps:
- uses: actions/checkout@v4
- name: Determine package version
shell: bash
run: |
branch=${GITHUB_REF#refs/heads/}
echo branch="${branch}" >> $GITHUB_OUTPUT
id: whichver
- name: Determine SCM revision
id: scm
shell: bash
run: |
rev=$(git rev-parse HEAD)
jq_filter='.packages[] | select(.basename == "edgedb-server") | select(.architecture == $ARCH) | .version_details.metadata.scm_revision | . as $rev | select(($rev != null) and ($REV | startswith($rev)))'
val=true
idx_file=buster.nightly.json
if [ ! -e "/tmp/$idx_file" ]; then
curl --fail -o /tmp/$idx_file -s https://packages.edgedb.com/apt/.jsonindexes/$idx_file || true
fi
if [ -e "/tmp/$idx_file" ]; then
out=$(cat /tmp/$idx_file | jq -r --arg REV "$rev" --arg ARCH "x86_64" "$jq_filter")
if [ -n "$out" ]; then
echo 'Skip rebuilding existing debian-buster-x86_64'
val=false
fi
fi
echo if_debian_buster_x86_64="$val" >> $GITHUB_OUTPUT
val=true
idx_file=buster.nightly.json
if [ ! -e "/tmp/$idx_file" ]; then
curl --fail -o /tmp/$idx_file -s https://packages.edgedb.com/apt/.jsonindexes/$idx_file || true
fi
if [ -e "/tmp/$idx_file" ]; then
out=$(cat /tmp/$idx_file | jq -r --arg REV "$rev" --arg ARCH "aarch64" "$jq_filter")
if [ -n "$out" ]; then
echo 'Skip rebuilding existing debian-buster-aarch64'
val=false
fi
fi
echo if_debian_buster_aarch64="$val" >> $GITHUB_OUTPUT
val=true
idx_file=bullseye.nightly.json
if [ ! -e "/tmp/$idx_file" ]; then
curl --fail -o /tmp/$idx_file -s https://packages.edgedb.com/apt/.jsonindexes/$idx_file || true
fi
if [ -e "/tmp/$idx_file" ]; then
out=$(cat /tmp/$idx_file | jq -r --arg REV "$rev" --arg ARCH "x86_64" "$jq_filter")
if [ -n "$out" ]; then
echo 'Skip rebuilding existing debian-bullseye-x86_64'
val=false
fi
fi
echo if_debian_bullseye_x86_64="$val" >> $GITHUB_OUTPUT
val=true
idx_file=bullseye.nightly.json
if [ ! -e "/tmp/$idx_file" ]; then
curl --fail -o /tmp/$idx_file -s https://packages.edgedb.com/apt/.jsonindexes/$idx_file || true
fi
if [ -e "/tmp/$idx_file" ]; then
out=$(cat /tmp/$idx_file | jq -r --arg REV "$rev" --arg ARCH "aarch64" "$jq_filter")
if [ -n "$out" ]; then
echo 'Skip rebuilding existing debian-bullseye-aarch64'
val=false
fi
fi
echo if_debian_bullseye_aarch64="$val" >> $GITHUB_OUTPUT
val=true
idx_file=bookworm.nightly.json
if [ ! -e "/tmp/$idx_file" ]; then
curl --fail -o /tmp/$idx_file -s https://packages.edgedb.com/apt/.jsonindexes/$idx_file || true
fi
if [ -e "/tmp/$idx_file" ]; then
out=$(cat /tmp/$idx_file | jq -r --arg REV "$rev" --arg ARCH "x86_64" "$jq_filter")
if [ -n "$out" ]; then
echo 'Skip rebuilding existing debian-bookworm-x86_64'
val=false
fi
fi
echo if_debian_bookworm_x86_64="$val" >> $GITHUB_OUTPUT
val=true
idx_file=bookworm.nightly.json
if [ ! -e "/tmp/$idx_file" ]; then
curl --fail -o /tmp/$idx_file -s https://packages.edgedb.com/apt/.jsonindexes/$idx_file || true
fi
if [ -e "/tmp/$idx_file" ]; then
out=$(cat /tmp/$idx_file | jq -r --arg REV "$rev" --arg ARCH "aarch64" "$jq_filter")
if [ -n "$out" ]; then
echo 'Skip rebuilding existing debian-bookworm-aarch64'
val=false
fi
fi
echo if_debian_bookworm_aarch64="$val" >> $GITHUB_OUTPUT
val=true
idx_file=bionic.nightly.json
if [ ! -e "/tmp/$idx_file" ]; then
curl --fail -o /tmp/$idx_file -s https://packages.edgedb.com/apt/.jsonindexes/$idx_file || true
fi
if [ -e "/tmp/$idx_file" ]; then
out=$(cat /tmp/$idx_file | jq -r --arg REV "$rev" --arg ARCH "x86_64" "$jq_filter")
if [ -n "$out" ]; then
echo 'Skip rebuilding existing ubuntu-bionic-x86_64'
val=false
fi
fi
echo if_ubuntu_bionic_x86_64="$val" >> $GITHUB_OUTPUT
val=true
idx_file=bionic.nightly.json
if [ ! -e "/tmp/$idx_file" ]; then
curl --fail -o /tmp/$idx_file -s https://packages.edgedb.com/apt/.jsonindexes/$idx_file || true
fi
if [ -e "/tmp/$idx_file" ]; then
out=$(cat /tmp/$idx_file | jq -r --arg REV "$rev" --arg ARCH "aarch64" "$jq_filter")
if [ -n "$out" ]; then
echo 'Skip rebuilding existing ubuntu-bionic-aarch64'
val=false
fi
fi
echo if_ubuntu_bionic_aarch64="$val" >> $GITHUB_OUTPUT
val=true
idx_file=focal.nightly.json
if [ ! -e "/tmp/$idx_file" ]; then
curl --fail -o /tmp/$idx_file -s https://packages.edgedb.com/apt/.jsonindexes/$idx_file || true
fi
if [ -e "/tmp/$idx_file" ]; then
out=$(cat /tmp/$idx_file | jq -r --arg REV "$rev" --arg ARCH "x86_64" "$jq_filter")
if [ -n "$out" ]; then
echo 'Skip rebuilding existing ubuntu-focal-x86_64'
val=false
fi
fi
echo if_ubuntu_focal_x86_64="$val" >> $GITHUB_OUTPUT
val=true
idx_file=focal.nightly.json
if [ ! -e "/tmp/$idx_file" ]; then
curl --fail -o /tmp/$idx_file -s https://packages.edgedb.com/apt/.jsonindexes/$idx_file || true
fi
if [ -e "/tmp/$idx_file" ]; then
out=$(cat /tmp/$idx_file | jq -r --arg REV "$rev" --arg ARCH "aarch64" "$jq_filter")
if [ -n "$out" ]; then
echo 'Skip rebuilding existing ubuntu-focal-aarch64'
val=false
fi
fi
echo if_ubuntu_focal_aarch64="$val" >> $GITHUB_OUTPUT
val=true
idx_file=jammy.nightly.json
if [ ! -e "/tmp/$idx_file" ]; then
curl --fail -o /tmp/$idx_file -s https://packages.edgedb.com/apt/.jsonindexes/$idx_file || true
fi
if [ -e "/tmp/$idx_file" ]; then
out=$(cat /tmp/$idx_file | jq -r --arg REV "$rev" --arg ARCH "x86_64" "$jq_filter")
if [ -n "$out" ]; then
echo 'Skip rebuilding existing ubuntu-jammy-x86_64'
val=false
fi
fi
echo if_ubuntu_jammy_x86_64="$val" >> $GITHUB_OUTPUT
val=true
idx_file=jammy.nightly.json
if [ ! -e "/tmp/$idx_file" ]; then
curl --fail -o /tmp/$idx_file -s https://packages.edgedb.com/apt/.jsonindexes/$idx_file || true
fi
if [ -e "/tmp/$idx_file" ]; then
out=$(cat /tmp/$idx_file | jq -r --arg REV "$rev" --arg ARCH "aarch64" "$jq_filter")
if [ -n "$out" ]; then
echo 'Skip rebuilding existing ubuntu-jammy-aarch64'
val=false
fi
fi
echo if_ubuntu_jammy_aarch64="$val" >> $GITHUB_OUTPUT
val=true
idx_file=noble.nightly.json
if [ ! -e "/tmp/$idx_file" ]; then
curl --fail -o /tmp/$idx_file -s https://packages.edgedb.com/apt/.jsonindexes/$idx_file || true
fi
if [ -e "/tmp/$idx_file" ]; then
out=$(cat /tmp/$idx_file | jq -r --arg REV "$rev" --arg ARCH "x86_64" "$jq_filter")
if [ -n "$out" ]; then
echo 'Skip rebuilding existing ubuntu-noble-x86_64'
val=false
fi
fi
echo if_ubuntu_noble_x86_64="$val" >> $GITHUB_OUTPUT
val=true
idx_file=noble.nightly.json
if [ ! -e "/tmp/$idx_file" ]; then
curl --fail -o /tmp/$idx_file -s https://packages.edgedb.com/apt/.jsonindexes/$idx_file || true
fi
if [ -e "/tmp/$idx_file" ]; then
out=$(cat /tmp/$idx_file | jq -r --arg REV "$rev" --arg ARCH "aarch64" "$jq_filter")
if [ -n "$out" ]; then
echo 'Skip rebuilding existing ubuntu-noble-aarch64'
val=false
fi
fi
echo if_ubuntu_noble_aarch64="$val" >> $GITHUB_OUTPUT
val=true
idx_file=el8.nightly.json
if [ ! -e "/tmp/$idx_file" ]; then
curl --fail -o /tmp/$idx_file -s https://packages.edgedb.com/rpm/.jsonindexes/$idx_file || true
fi
if [ -e "/tmp/$idx_file" ]; then
out=$(cat /tmp/$idx_file | jq -r --arg REV "$rev" --arg ARCH "x86_64" "$jq_filter")
if [ -n "$out" ]; then
echo 'Skip rebuilding existing centos-8-x86_64'
val=false
fi
fi
echo if_centos_8_x86_64="$val" >> $GITHUB_OUTPUT
val=true
idx_file=el8.nightly.json
if [ ! -e "/tmp/$idx_file" ]; then
curl --fail -o /tmp/$idx_file -s https://packages.edgedb.com/rpm/.jsonindexes/$idx_file || true
fi
if [ -e "/tmp/$idx_file" ]; then
out=$(cat /tmp/$idx_file | jq -r --arg REV "$rev" --arg ARCH "aarch64" "$jq_filter")
if [ -n "$out" ]; then
echo 'Skip rebuilding existing centos-8-aarch64'
val=false
fi
fi
echo if_centos_8_aarch64="$val" >> $GITHUB_OUTPUT
val=true
idx_file=el9.nightly.json
if [ ! -e "/tmp/$idx_file" ]; then
curl --fail -o /tmp/$idx_file -s https://packages.edgedb.com/rpm/.jsonindexes/$idx_file || true
fi
if [ -e "/tmp/$idx_file" ]; then
out=$(cat /tmp/$idx_file | jq -r --arg REV "$rev" --arg ARCH "x86_64" "$jq_filter")
if [ -n "$out" ]; then
echo 'Skip rebuilding existing rockylinux-9-x86_64'
val=false
fi
fi
echo if_rockylinux_9_x86_64="$val" >> $GITHUB_OUTPUT
val=true
idx_file=el9.nightly.json
if [ ! -e "/tmp/$idx_file" ]; then
curl --fail -o /tmp/$idx_file -s https://packages.edgedb.com/rpm/.jsonindexes/$idx_file || true
fi
if [ -e "/tmp/$idx_file" ]; then
out=$(cat /tmp/$idx_file | jq -r --arg REV "$rev" --arg ARCH "aarch64" "$jq_filter")
if [ -n "$out" ]; then
echo 'Skip rebuilding existing rockylinux-9-aarch64'
val=false
fi
fi
echo if_rockylinux_9_aarch64="$val" >> $GITHUB_OUTPUT
val=true
out=$(curl --fail -s https://packages.edgedb.com/archive/.jsonindexes/x86_64-unknown-linux-gnu.nightly.json | jq -r --arg REV "$rev" --arg ARCH "x86_64" "$jq_filter" || true)
if [ -n "$out" ]; then
echo 'Skip rebuilding existing linux-x86_64'
val=false
fi
echo if_linux_x86_64="$val" >> $GITHUB_OUTPUT
val=true
out=$(curl --fail -s https://packages.edgedb.com/archive/.jsonindexes/aarch64-unknown-linux-gnu.nightly.json | jq -r --arg REV "$rev" --arg ARCH "aarch64" "$jq_filter" || true)
if [ -n "$out" ]; then
echo 'Skip rebuilding existing linux-aarch64'
val=false
fi
echo if_linux_aarch64="$val" >> $GITHUB_OUTPUT
val=true
out=$(curl --fail -s https://packages.edgedb.com/archive/.jsonindexes/x86_64-unknown-linux-musl.nightly.json | jq -r --arg REV "$rev" --arg ARCH "x86_64" "$jq_filter" || true)
if [ -n "$out" ]; then
echo 'Skip rebuilding existing linuxmusl-x86_64'
val=false
fi
echo if_linuxmusl_x86_64="$val" >> $GITHUB_OUTPUT
val=true
out=$(curl --fail -s https://packages.edgedb.com/archive/.jsonindexes/aarch64-unknown-linux-musl.nightly.json | jq -r --arg REV "$rev" --arg ARCH "aarch64" "$jq_filter" || true)
if [ -n "$out" ]; then
echo 'Skip rebuilding existing linuxmusl-aarch64'
val=false
fi
echo if_linuxmusl_aarch64="$val" >> $GITHUB_OUTPUT
val=true
out=$(curl --fail -s https://packages.edgedb.com/archive/.jsonindexes/x86_64-apple-darwin.nightly.json | jq -r --arg REV "$rev" --arg ARCH "x86_64" "$jq_filter" || true)
if [ -n "$out" ]; then
echo 'Skip rebuilding existing macos-x86_64'
val=false
fi
echo if_macos_x86_64="$val" >> $GITHUB_OUTPUT
val=true
out=$(curl --fail -s https://packages.edgedb.com/archive/.jsonindexes/aarch64-apple-darwin.nightly.json | jq -r --arg REV "$rev" --arg ARCH "aarch64" "$jq_filter" || true)
if [ -n "$out" ]; then
echo 'Skip rebuilding existing macos-aarch64'
val=false
fi
echo if_macos_aarch64="$val" >> $GITHUB_OUTPUT
build-macos-x86_64:
runs-on: ['macos-13']
needs: prep
if: needs.prep.outputs.if_macos_x86_64 == 'true'
steps:
- uses: actions/checkout@v4
with:
repository: edgedb/edgedb-pkg
ref: master
path: edgedb-pkg
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@d0e72ca3bfdc51937a4f81431ccbed269ef9f2a2
if: true
with:
components: "cargo,rustc,rust-std"
toolchain: "stable"
targets: "x86_64-apple-darwin"
- name: Set up Python
uses: actions/setup-python@v5
if: true
with:
python-version: "3.x"
- name: Set up NodeJS
uses: actions/setup-node@v4
if: true
with:
node-version: '20'
- name: Install dependencies
if: true
run: |
env HOMEBREW_NO_AUTO_UPDATE=1 brew install libmagic
- name: Build
env:
SRC_REF: "${{ needs.prep.outputs.branch }}"
PKG_REVISION: "<current-date>"
PKG_SUBDIST: "nightly"
PKG_PLATFORM: "macos"
PKG_PLATFORM_VERSION: "x86_64"
PKG_PLATFORM_ARCH: "x86_64"
EXTRA_OPTIMIZATIONS: "true"
METAPKG_GIT_CACHE: disabled
BUILD_GENERIC: true
run: |
edgedb-pkg/integration/macos/build.sh
- uses: actions/upload-artifact@v4
with:
name: builds-macos-x86_64
path: artifacts/macos-x86_64
build-macos-aarch64:
runs-on: ['macos-14']
needs: prep
if: needs.prep.outputs.if_macos_aarch64 == 'true'
steps:
- uses: actions/checkout@v4
with:
repository: edgedb/edgedb-pkg
ref: master
path: edgedb-pkg
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@d0e72ca3bfdc51937a4f81431ccbed269ef9f2a2
if: true
with:
components: "cargo,rustc,rust-std"
toolchain: "stable"
targets: "aarch64-apple-darwin"
- name: Set up Python
uses: actions/setup-python@v5
if: true
with:
python-version: "3.x"
- name: Set up NodeJS
uses: actions/setup-node@v4
if: true
with:
node-version: '20'
- name: Install dependencies
if: true
run: |
env HOMEBREW_NO_AUTO_UPDATE=1 brew install libmagic
- name: Build
env:
SRC_REF: "${{ needs.prep.outputs.branch }}"
PKG_REVISION: "<current-date>"
PKG_SUBDIST: "nightly"
PKG_PLATFORM: "macos"
PKG_PLATFORM_VERSION: "aarch64"
PKG_PLATFORM_ARCH: "aarch64"
EXTRA_OPTIMIZATIONS: "true"
METAPKG_GIT_CACHE: disabled
BUILD_GENERIC: true
run: |
edgedb-pkg/integration/macos/build.sh
- uses: actions/upload-artifact@v4
with:
name: builds-macos-aarch64
path: artifacts/macos-aarch64
test-macos-x86_64:
needs: [build-macos-x86_64]
runs-on: ['macos-13']
steps:
- uses: actions/checkout@v4
with:
repository: edgedb/edgedb-pkg
ref: master
path: edgedb-pkg
- uses: actions/download-artifact@v4
with:
name: builds-macos-x86_64
path: artifacts/macos-x86_64
- name: Test
env:
PKG_SUBDIST: "nightly"
PKG_PLATFORM: "macos"
PKG_PLATFORM_VERSION: "x86_64"
# Run fewer tests on x86_64, since the test runner is very slow.
PKG_TEST_FILES: "test_dump*.py test_backend_*.py test_database.py test_server_*.py test_edgeql_ddl.py test_session.py"
run: |
# Bump shmmax and shmall to avoid test failures.
sudo sysctl -w kern.sysv.shmmax=12582912
sudo sysctl -w kern.sysv.shmall=12582912
edgedb-pkg/integration/macos/test.sh
test-macos-aarch64:
needs: [build-macos-aarch64]
runs-on: ['macos-14']
steps:
- uses: actions/checkout@v4
with:
repository: edgedb/edgedb-pkg
ref: master
path: edgedb-pkg
- uses: actions/download-artifact@v4
with:
name: builds-macos-aarch64
path: artifacts/macos-aarch64
- name: Test
env:
PKG_SUBDIST: "nightly"
PKG_PLATFORM: "macos"
PKG_PLATFORM_VERSION: "aarch64"
run: |
edgedb-pkg/integration/macos/test.sh