Skip to content

Commit

Permalink
CFR: Publish self-contained application bundle to GH Workflow Artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
amotl committed Jul 6, 2024
1 parent fb5d96d commit 8b7b6b7
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 0 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/release-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Stage PyInstaller application packages through GitHub Actions (GHA) to GitHub Workflow Artifacts section.
# https://github.com/actions/upload-artifact#where-does-the-upload-go
name: Release Application to Artifacts

on:
pull_request: ~
push:
tags:
- '*.*.*'

jobs:

cfr:
name: "
Build & Publish CrateDB Flight Recorder (CFR)
for OS ${{ matrix.os }}
"

runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [
"macos-latest",
"ubuntu-latest",
"windows-latest",
]

steps:

- name: Acquire sources
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip'
cache-dependency-path: 'pyproject.toml'

- name: Set up project
run: |
# `setuptools 0.64.0` adds support for editable install hooks (PEP 660).
# https://github.com/pypa/setuptools/blob/main/CHANGES.rst#v6400
pip install "setuptools>=64" --upgrade
# Install dependencies needed to bundle the application.
pip install --use-pep517 --prefer-binary --editable='.[cfr,release-cfr]'
- name: Build application
run: poe build-cfr

- name: Upload artifact for {{ env.RUNNER_OS }}
uses: actions/upload-artifact@v4
with:
name: cratedb-cfr-{{ env.RUNNER_OS }}
path: dist/cratedb-cfr/cratedb-cfr

# TODO: Optionally upload to release assets, when invoked on "tag" event.
#if: startsWith(github.event.ref, 'refs/tags')
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- SQLAlchemy: Clean up and refactor SQLAlchemy polyfills
to `cratedb_toolkit.util.sqlalchemy`
- CFR: Build as a self-contained program using PyInstaller
- CFR: Publish self-contained application bundle to GitHub Workflow Artifacts

## 2024/06/18 v0.0.14
- Add `ctk cfr` and `ctk wtf` diagnostics programs
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ release = [
"twine<6",
]
release-cfr = [
"poethepoet<0.28",
"pyinstaller<7",
]
service = [
Expand Down

0 comments on commit 8b7b6b7

Please sign in to comment.