Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 80 additions & 0 deletions .github/workflows/pyapp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Build PyApp fowl

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
pyapp:
strategy:
matrix:
include:
- os: macos-latest
python-version: "3.13"

# counter-intuitively, we want the *oldest* linux runner so that we
# get the oldest GLIBC version for wider compatibility (since we can't
# actually statically-link rust)

- os: ubuntu-22.04
python-version: "3.13"

- os: windows-latest
python-version: "3.13"
runs-on: ${{ matrix.os }}
# fixme: figure out version automatically? can we "run-on" tags only?
env:
PYAPP_EXEC_SPEC: fowl.cli:fowl
PYAPP_PROJECT_NAME: fowl
PYAPP_PROJECT_PATH: ../dist/fowl-25.10.0.tar.gz
steps:
- name: Check out source code
uses: actions/checkout@v2
with:
# Get enough history for the tags we get next to be meaningful. 0
# means all history.
fetch-depth: "0"
# Checkout head of the branch of the PR, or the exact revision
# specified for non-PR builds.
ref: "${{ github.event.pull_request.head.sha || github.sha }}"

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --editable .[dev]

- name: Build Fowl sdist
run: |
python -m hatchling build

- name: Install PyApp
run: |
curl https://github.com/ofek/pyapp/releases/latest/download/source.tar.gz -Lo pyapp-source.tar.gz
tar -xzf pyapp-source.tar.gz
mv pyapp-v* pyapp-latest
cd pyapp-latest

- name: Build fowl via PyApp
run: |
cd pyapp-latest && cargo build --release

- name: Upload the Artifact (unix)
if: ${{ !contains(matrix.os, 'windows') }}
uses: actions/upload-artifact@v4
with:
name: fowl-${{ matrix.os }}
path: pyapp-latest/target/release/pyapp

- name: Upload the Artifact (exe)
if: ${{ contains(matrix.os, 'windows') }}
uses: actions/upload-artifact@v4
with:
name: fowl-${{ matrix.os }}
path: pyapp-latest/target/release/pyapp.exe
Loading