-
Notifications
You must be signed in to change notification settings - Fork 2
101 lines (91 loc) · 2.66 KB
/
binaries.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
name: NIF binaries
on:
push:
branches:
- main
paths:
- "native/**"
- ".github/workflows/binaries.yml"
tags:
- "*"
pull_request:
paths:
- ".github/workflows/binaries.yml"
workflow_dispatch:
env:
PROJECT_NAME: "candlex"
PROJECT_DIR: "native/candlex"
PROJECT_VERSION: "0.1.2"
NIF_VERSION: "2.16"
jobs:
build_cpu:
name: cpu / ${{ matrix.target }} / ${{ matrix.os }}
runs-on: ${{ matrix.os }}
permissions:
contents: write
strategy:
fail-fast: false
matrix:
include:
- target: aarch64-apple-darwin
os: macos-12
- target: aarch64-unknown-linux-gnu
os: ubuntu-22.04
use-cross: true
- target: x86_64-apple-darwin
os: macos-12
- target: x86_64-unknown-linux-gnu
os: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- run: rustup target add ${{ matrix.target }}
- uses: philss/rustler-precompiled-action@main
id: precompile
with:
project-dir: ${{ env.PROJECT_DIR }}
project-name: ${{ env.PROJECT_NAME }}
project-version: ${{ env.PROJECT_VERSION }}
target: ${{ matrix.target }}
use-cross: ${{ matrix.use-cross }}
nif-version: ${{ env.NIF_VERSION }}
- uses: softprops/action-gh-release@v1
with:
draft: true
files: ${{ steps.precompile.outputs.file-path }}
if: startsWith(github.ref, 'refs/tags/')
build_cuda:
name: cuda / ${{ matrix.target }} / ${{ matrix.os }}
runs-on: ubuntu-22.04
permissions:
contents: write
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-22.04
container:
image: nvidia/cuda:12.2.2-devel-ubuntu22.04
steps:
- uses: actions/checkout@v4
- run: apt update && apt install -y curl
- uses: dtolnay/rust-toolchain@stable
- run: cargo --version
shell: bash
- run: rustup target add ${{ matrix.target }}
- uses: philss/rustler-precompiled-action@main
id: precompile
with:
project-dir: ${{ env.PROJECT_DIR }}
project-name: ${{ env.PROJECT_NAME }}
project-version: ${{ env.PROJECT_VERSION }}
target: ${{ matrix.target }}
use-cross: null
nif-version: ${{ env.NIF_VERSION }}
variant: cuda
cargo-args: "--features cuda"
- uses: softprops/action-gh-release@v1
with:
draft: true
files: ${{ steps.precompile.outputs.file-path }}
if: startsWith(github.ref, 'refs/tags/')