-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (42 loc) · 1.36 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: build
on:
push:
branches:
- main
paths:
- src/**
# on: ["push"]
jobs:
build:
strategy:
matrix:
include:
- { target: linux-64, os: ubuntu-latest }
# - { target: osx-arm64, os: macos-14 } # mac runner crashes on mojo test
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