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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 20 additions & 18 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
name: Create package

on:
workflow_call:
workflow_call:

jobs:
package:
name: Package
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run the package command
run: |
curl -fsSL https://pixi.sh/install.sh | sh
export PATH="$HOME/.pixi/bin:$PATH"
pixi run mojo package lightbug_http -o lightbug_http.mojopkg

- name: Upload package as artifact
uses: actions/upload-artifact@v4
with:
name: lightbug_http-package
path: lightbug_http.mojopkg
package:
name: Package
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Pixi
uses: prefix-dev/setup-pixi@main
with:
pixi-version: latest
cache: true
- name: Run the package command
run: |
pixi run mojo package lightbug_http -o lightbug_http.mojopkg
- name: Upload package as artifact
uses: actions/upload-artifact@v4
with:
name: lightbug_http-package
path: lightbug_http.mojopkg
79 changes: 42 additions & 37 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,49 @@
name: Build and publish

on:
workflow_call:
secrets:
PREFIX_API_KEY:
required: true
workflow_call:
secrets:
PREFIX_API_KEY:
required: true

jobs:
publish:
name: Publish package
strategy:
matrix:
include:
- { target: linux-64, os: ubuntu-latest }
- { target: osx-arm64, os: macos-14 }
fail-fast: false
runs-on: ${{ matrix.os }}
timeout-minutes: 5
defaults:
run:
shell: bash
steps:
- name: Checkout repo
uses: actions/checkout@v4
publish:
name: Publish package
strategy:
matrix:
include:
- { target: linux-64, os: ubuntu-latest }
- { target: osx-arm64, os: macos-14 }
fail-fast: false
runs-on: ${{ matrix.os }}
timeout-minutes: 5
defaults:
run:
shell: bash
steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Build package for target platform
env:
TARGET_PLATFORM: ${{ matrix.target }}
PREFIX_API_KEY: ${{ secrets.PREFIX_API_KEY }}
CONDA_BLD_PATH: ${{ runner.workspace }}/.rattler
run: |
curl -fsSL https://pixi.sh/install.sh | sh
export PATH="$HOME/.pixi/bin:$PATH"

# Temporary method to fetch the rattler binary.
RATTLER_BINARY="rattler-build-aarch64-apple-darwin"
if [[ $TARGET_PLATFORM == "linux-64" ]]; then RATTLER_BINARY="rattler-build-x86_64-unknown-linux-musl"; fi
curl -SL --progress-bar https://github.com/prefix-dev/rattler-build/releases/download/v0.33.2/${RATTLER_BINARY} -o rattler-build
chmod +x rattler-build
- name: Set up Pixi
uses: prefix-dev/setup-pixi@main
with:
pixi-version: latest
cache: true

# Build and push
pixi run build --target-platform=$TARGET_PLATFORM
pixi run publish
- name: Build package for target platform
env:
TARGET_PLATFORM: ${{ matrix.target }}
PREFIX_API_KEY: ${{ secrets.PREFIX_API_KEY }}
CONDA_BLD_PATH: ${{ runner.workspace }}/.rattler
run: |
# Temporary method to fetch the rattler binary.
RATTLER_BINARY="rattler-build-aarch64-apple-darwin"
if [[ "$TARGET_PLATFORM" == "linux-64" ]]; then
RATTLER_BINARY="rattler-build-x86_64-unknown-linux-musl"
fi
curl -SL --progress-bar "https://github.com/prefix-dev/rattler-build/releases/download/v0.33.2/${RATTLER_BINARY}" -o rattler-build
chmod +x rattler-build

# Build and push
pixi run build --target-platform="$TARGET_PLATFORM"
pixi run publish
33 changes: 18 additions & 15 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
name: Run the testing suite

on:
workflow_call:
workflow_call:

jobs:
test:
name: Run tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run the test suite
run: |
curl -fsSL https://pixi.sh/install.sh | sh
export PATH="$HOME/.pixi/bin:$PATH"
pixi run test
pixi run integration_tests_py
pixi run integration_tests_external
pixi run integration_tests_udp
test:
name: Run tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Pixi
uses: prefix-dev/setup-pixi@main
with:
pixi-version: latest
cache: true
- name: Run the test suite
run: |
pixi run test
pixi run integration_tests_py
pixi run integration_tests_external
pixi run integration_tests_udp
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ install_id
.pixi
*.egg-info

# magic environments
.magic

# Rattler
output

Expand Down
Loading
Loading