Skip to content

Commit

Permalink
add initial project scaffolding
Browse files Browse the repository at this point in the history
  • Loading branch information
thatstoasty committed Sep 15, 2024
1 parent d925e75 commit 4f036b4
Show file tree
Hide file tree
Showing 7 changed files with 963 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# GitHub syntax highlighting
pixi.lock linguist-language=YAML linguist-generated=true
51 changes: 51 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Build all packages

on:
push:
branches:
- main

# on: ["push"]

jobs:
build:
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: Install magic
run: |
curl -ssL https://magic.modular.com | bash
- 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: |
source $HOME/.bash_profile
# 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/latest/download/${RATTLER_BINARY} -o rattler-build
chmod +x rattler-build
# Build and push
magic run build --target-platform=$TARGET_PLATFORM
magic run publish
39 changes: 39 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Run Tests

on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]

permissions:
contents: read
pull-requests: read

jobs:
test:
name: with ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-14"]

runs-on: ${{ matrix.os }}
timeout-minutes: 5

defaults:
run:
shell: bash

steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Install magic
run: |
curl -ssL https://magic.modular.com | bash
- name: Run tests
run: |
source $HOME/.bash_profile
magic run tests
magic run benchmarks
magic run examples
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -160,3 +160,8 @@ cython_debug/
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
# pixi environments
.pixi
*.egg-info
# magic environments
.magic
Loading

0 comments on commit 4f036b4

Please sign in to comment.