Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .bun-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.4.5
11 changes: 0 additions & 11 deletions .env.example

This file was deleted.

57 changes: 57 additions & 0 deletions .github/workflows/macos-signed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Signed macOS builds

on:
workflow_dispatch:

permissions:
contents: read

jobs:
sign:
# Never expose release credentials to pull-request or unmerged branch code.
if: github.ref == 'refs/heads/main'
name: Signed ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
include:
- { os: macos-26, platform: darwin-arm64 }
- { os: macos-15-intel, platform: darwin-x64 }
runs-on: ${{ matrix.os }}
timeout-minutes: 35
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version-file: .bun-version
- run: bun install --frozen-lockfile
- run: bun run typecheck
- run: bun run build:standalone --target=bun-${{ matrix.platform }}
- name: Import signing credentials
env:
MACOS_CERTIFICATE_P12: ${{ secrets.MACOS_CERTIFICATE_P12 }}
MACOS_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
APPLE_NOTARY_KEY_P8: ${{ secrets.APPLE_NOTARY_KEY_P8 }}
run: python3 scripts/macos/prepare-signing.py
- name: Sign and require Apple notarization
env:
OPENHACK_SIGNING_IDENTITY: ${{ secrets.MACOS_SIGNING_IDENTITY }}
OPENHACK_NOTARY_KEY_ID: ${{ secrets.APPLE_NOTARY_KEY_ID }}
OPENHACK_NOTARY_ISSUER: ${{ secrets.APPLE_NOTARY_ISSUER }}
run: bash scripts/macos/sign-and-notarize.sh dist/standalone/${{ matrix.platform }}/openhack
- name: Test the signed executable on its native architecture
run: bun run test:standalone --binary=dist/standalone/${{ matrix.platform }}/openhack
- name: Package accepted executable and final checksums
run: bun run package:standalone bun-${{ matrix.platform }}
- uses: actions/upload-artifact@v4
with:
name: openhack-signed-${{ matrix.platform }}
path: dist/releases/*
if-no-files-found: error
- name: Remove signing credentials
if: always()
run: |
if [ -f "$RUNNER_TEMP/openhack-signing/signing.keychain-db" ]; then
security delete-keychain "$RUNNER_TEMP/openhack-signing/signing.keychain-db"
fi
rm -rf "$RUNNER_TEMP/openhack-signing"
45 changes: 45 additions & 0 deletions .github/workflows/standalone.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Standalone builds

on:
workflow_dispatch:
push:
branches: [main, v2]
pull_request:
branches: [main, v2]

permissions:
contents: read

jobs:
standalone:
name: ${{ matrix.target }}
strategy:
fail-fast: false
matrix:
include:
- { os: macos-26, target: bun-darwin-arm64, platform: darwin-arm64, binary: openhack }
- { os: macos-15-intel, target: bun-darwin-x64, platform: darwin-x64, binary: openhack }
- { os: ubuntu-24.04-arm, target: bun-linux-arm64, platform: linux-arm64, binary: openhack }
- { os: ubuntu-24.04, target: bun-linux-x64, platform: linux-x64, binary: openhack }
- { os: windows-11-arm, target: bun-windows-arm64, platform: windows-arm64, binary: openhack.exe }
- { os: windows-2022, target: bun-windows-x64, platform: windows-x64, binary: openhack.exe }
runs-on: ${{ matrix.os }}
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version-file: .bun-version
- run: bun install --frozen-lockfile
- run: bun run typecheck
- name: Build with embedded runtime and dashboard
run: bun run build:standalone --target=${{ matrix.target }}
- name: Test executable with no runtime on PATH
run: bun run test:standalone --binary=dist/standalone/${{ matrix.platform }}/${{ matrix.binary }}
- name: Package tested binary and checksums
run: bun run package:standalone ${{ matrix.target }}
- uses: actions/upload-artifact@v4
with:
name: openhack-${{ matrix.platform }}
path: dist/releases/*
if-no-files-found: error
37 changes: 20 additions & 17 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,31 @@ name: Tests

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

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest
check:
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12", "3.13"]

os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 15
steps:
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v4

- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}

- uses: oven-sh/setup-bun@v2
with:
bun-version-file: .bun-version
- name: Install dependencies
run: uv sync --dev

- name: Run tests
run: uv run python -m pytest tests/ -v
run: bun install --frozen-lockfile
- name: Check types, tests, and production build
run: bun run check
- name: Check standalone package
run: bun run test:package
- name: Audit dependencies
run: bun audit
38 changes: 5 additions & 33 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,36 +1,8 @@
# Python
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
venv/
env/
ENV/
.venv/
*.egg-info/
node_modules/
dist/
build/
.pytest_cache/
.coverage
htmlcov/
.mypy_cache/
.dmypy.json
dmypy.json

# Env files
.env*
.env
.env.*
!.env.example

# OS
.openhack/
.DS_Store

# IDEs
.vscode/
.idea/
*.swp
*.swo
*~

# CodeQL databases
.codeql-dbs/
.wrangler/
12 changes: 0 additions & 12 deletions .harness/janitor.sh

This file was deleted.

63 changes: 0 additions & 63 deletions .harness/patch_df.py

This file was deleted.

62 changes: 0 additions & 62 deletions .harness/run_bestof.sh

This file was deleted.

Loading
Loading