Package Build Dry Run #83
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Package Build Dry Run | |
on: | |
workflow_dispatch: | |
inputs: {} | |
jobs: | |
prep: | |
runs-on: ubuntu-latest | |
outputs: | |
branch: ${{ steps.whichver.outputs.branch }} | |
if_linuxmusl_x86_64: ${{ steps.scm.outputs.if_linuxmusl_x86_64 }} | |
if_linuxmusl_aarch64: ${{ steps.scm.outputs.if_linuxmusl_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 | |
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 | |
build-linuxmusl-x86_64: | |
runs-on: ['package-builder', 'self-hosted', 'linux', 'x64'] | |
needs: prep | |
if: needs.prep.outputs.if_linuxmusl_x86_64 == 'true' | |
steps: | |
- name: Build | |
uses: fantix/edgedb-pkg/integration/linux/build/linuxmusl-x86_64@master | |
env: | |
SRC_REF: "${{ needs.prep.outputs.branch }}" | |
PKG_REVISION: "<current-date>" | |
PKG_SUBDIST: "nightly" | |
PKG_PLATFORM: "linux" | |
PKG_PLATFORM_VERSION: "x86_64" | |
EXTRA_OPTIMIZATIONS: "true" | |
BUILD_GENERIC: true | |
PKG_PLATFORM_LIBC: "musl" | |
METAPKG_GIT_CACHE: disabled | |
- uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0 | |
with: | |
name: builds-linuxmusl-x86_64 | |
path: artifacts/linuxmusl-x86_64 | |
build-linuxmusl-aarch64: | |
runs-on: ['package-builder', 'self-hosted', 'linux', 'arm64'] | |
needs: prep | |
if: needs.prep.outputs.if_linuxmusl_aarch64 == 'true' | |
steps: | |
- name: Build | |
uses: fantix/edgedb-pkg/integration/linux/build/linuxmusl-aarch64@master | |
env: | |
SRC_REF: "${{ needs.prep.outputs.branch }}" | |
PKG_REVISION: "<current-date>" | |
PKG_SUBDIST: "nightly" | |
PKG_PLATFORM: "linux" | |
PKG_PLATFORM_VERSION: "aarch64" | |
EXTRA_OPTIMIZATIONS: "true" | |
BUILD_GENERIC: true | |
PKG_PLATFORM_LIBC: "musl" | |
METAPKG_GIT_CACHE: disabled | |
- uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0 | |
with: | |
name: builds-linuxmusl-aarch64 | |
path: artifacts/linuxmusl-aarch64 | |
test-linuxmusl-x86_64: | |
needs: [build-linuxmusl-x86_64] | |
runs-on: ['package-builder', 'self-hosted', 'linux', 'x64'] | |
steps: | |
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
with: | |
name: builds-linuxmusl-x86_64 | |
path: artifacts/linuxmusl-x86_64 | |
- name: Test | |
uses: fantix/edgedb-pkg/integration/linux/test/linuxmusl-x86_64@master | |
env: | |
PKG_SUBDIST: "nightly" | |
PKG_PLATFORM: "linux" | |
PKG_PLATFORM_VERSION: "x86_64" | |
PKG_PLATFORM_LIBC: "musl" | |
# edb test with -j higher than 1 seems to result in workflow | |
# jobs getting killed arbitrarily by Github. | |
PKG_TEST_JOBS: 0 | |
test-linuxmusl-aarch64: | |
needs: [build-linuxmusl-aarch64] | |
runs-on: ['package-builder', 'self-hosted', 'linux', 'arm64'] | |
steps: | |
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
with: | |
name: builds-linuxmusl-aarch64 | |
path: artifacts/linuxmusl-aarch64 | |
- name: Test | |
uses: fantix/edgedb-pkg/integration/linux/test/linuxmusl-aarch64@master | |
env: | |
PKG_SUBDIST: "nightly" | |
PKG_PLATFORM: "linux" | |
PKG_PLATFORM_VERSION: "aarch64" | |
PKG_PLATFORM_LIBC: "musl" | |
# 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-linuxmusl-x86_64 | |
- test-linuxmusl-x86_64 | |
- build-linuxmusl-aarch64 | |
- test-linuxmusl-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' |