Skip to content

Package Build Dry Run #59

Package Build Dry Run

Package Build Dry Run #59

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_ubuntu_noble_x86_64: ${{ steps.scm.outputs.if_ubuntu_noble_x86_64 }}
if_ubuntu_noble_aarch64: ${{ steps.scm.outputs.if_ubuntu_noble_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=noble.nightly.json
if [ ! -e "/tmp/$idx_file" ]; then
curl --fail -s https://packages.edgedb.com/apt/.jsonindexes/$idx_file > /tmp/$idx_file
fi
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
echo if_ubuntu_noble_x86_64="$val" >> $GITHUB_OUTPUT
val=true
idx_file=noble.nightly.json
if [ ! -e "/tmp/$idx_file" ]; then
curl --fail -s https://packages.edgedb.com/apt/.jsonindexes/$idx_file > /tmp/$idx_file
fi
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
echo if_ubuntu_noble_aarch64="$val" >> $GITHUB_OUTPUT
build-ubuntu-noble-x86_64:
runs-on: ['package-builder', 'self-hosted', 'linux', 'x64']
needs: prep
if: needs.prep.outputs.if_ubuntu_noble_x86_64 == 'true'
steps:
- name: Build
uses: edgedb/edgedb-pkg/integration/linux/build/ubuntu-noble@master
env:
SRC_REF: "${{ needs.prep.outputs.branch }}"
PKG_REVISION: "<current-date>"
PKG_SUBDIST: "nightly"
PKG_PLATFORM: "ubuntu"
PKG_PLATFORM_VERSION: "noble"
EXTRA_OPTIMIZATIONS: "true"
METAPKG_GIT_CACHE: disabled
- uses: actions/upload-artifact@v4
with:
name: builds-ubuntu-noble-x86_64
path: artifacts/ubuntu-noble
build-ubuntu-noble-aarch64:
runs-on: ['package-builder', 'self-hosted', 'linux', 'arm64']
needs: prep
if: needs.prep.outputs.if_ubuntu_noble_aarch64 == 'true'
steps:
- name: Build
uses: edgedb/edgedb-pkg/integration/linux/build/ubuntu-noble@master
env:
SRC_REF: "${{ needs.prep.outputs.branch }}"
PKG_REVISION: "<current-date>"
PKG_SUBDIST: "nightly"
PKG_PLATFORM: "ubuntu"
PKG_PLATFORM_VERSION: "noble"
EXTRA_OPTIMIZATIONS: "true"
METAPKG_GIT_CACHE: disabled
- uses: actions/upload-artifact@v4
with:
name: builds-ubuntu-noble-aarch64
path: artifacts/ubuntu-noble
test-ubuntu-noble-x86_64:
needs: [build-ubuntu-noble-x86_64]
runs-on: ['package-builder', 'self-hosted', 'linux', 'x64']
steps:
- uses: actions/download-artifact@v4
with:
name: builds-ubuntu-noble-x86_64
path: artifacts/ubuntu-noble
- name: Test
uses: edgedb/edgedb-pkg/integration/linux/test/ubuntu-noble@master
env:
PKG_SUBDIST: "nightly"
PKG_PLATFORM: "ubuntu"
PKG_PLATFORM_VERSION: "noble"
PKG_PLATFORM_LIBC: ""
# edb test with -j higher than 1 seems to result in workflow
# jobs getting killed arbitrarily by Github.
PKG_TEST_JOBS: 0
test-ubuntu-noble-aarch64:
needs: [build-ubuntu-noble-aarch64]
runs-on: ['package-builder', 'self-hosted', 'linux', 'arm64']
steps:
- uses: actions/download-artifact@v4
with:
name: builds-ubuntu-noble-aarch64
path: artifacts/ubuntu-noble
- name: Test
uses: edgedb/edgedb-pkg/integration/linux/test/ubuntu-noble@master
env:
PKG_SUBDIST: "nightly"
PKG_PLATFORM: "ubuntu"
PKG_PLATFORM_VERSION: "noble"
PKG_PLATFORM_LIBC: ""
# edb test with -j higher than 1 seems to result in workflow
# jobs getting killed arbitrarily by Github.
PKG_TEST_JOBS: 0
workflow-notifications:
if: failure() && github.event_name != 'pull_request'
name: Notify in Slack on failures
needs:
- prep
- build-ubuntu-noble-x86_64
- test-ubuntu-noble-x86_64
- build-ubuntu-noble-aarch64
- test-ubuntu-noble-aarch64
runs-on: ubuntu-latest
permissions:
actions: 'read'
steps:
- name: Slack Workflow Notification
uses: Gamesight/slack-workflow-status@26a36836c887f260477432e4314ec3490a84f309
with:
repo_token: ${{secrets.GITHUB_TOKEN}}
slack_webhook_url: ${{secrets.ACTIONS_SLACK_WEBHOOK_URL}}
name: 'Workflow notifications'
icon_emoji: ':hammer:'
include_jobs: 'on-failure'