-
Notifications
You must be signed in to change notification settings - Fork 145
150 lines (138 loc) · 4.71 KB
/
package.yml
File metadata and controls
150 lines (138 loc) · 4.71 KB
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
name: Package
concurrency:
group: package-${{ inputs.version }}
cancel-in-progress: true
on:
workflow_dispatch:
inputs:
version:
description: "Version to set (e.g., 0.1.0)"
required: true
type: string
workflow_call:
inputs:
version:
description: "Version to set (e.g., 0.1.0)"
required: true
type: string
jobs:
prepare-python:
runs-on: ${{ matrix.target.runs-on }}
timeout-minutes: 120
strategy:
fail-fast: false
matrix:
target:
- { os: macos, runs-on: "macos-latest", target: aarch64-apple-darwin }
- { os: macos, runs-on: "macos-15-intel", target: x86_64-apple-darwin }
- { os: ubuntu, runs-on: "ubuntu-latest", target: aarch64-unknown-linux-gnu }
- { os: ubuntu, runs-on: "ubuntu-latest", target: x86_64-unknown-linux-gnu }
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: ./.github/actions/setup-rust
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
targets: ${{ matrix.target.target }}
enable-sccache: "false"
- name: Install cargo-edit
uses: taiki-e/cache-cargo-install-action@66c9585ef5ca780ee69399975a5e911f47905995
with:
tool: cargo-edit
- name: Cargo Set Version
run: |
cargo set-version --workspace ${{ inputs.version }}
- name: Set up Python
uses: actions/setup-python@v6
# Latest macOS doesn't allow maturin to install stuff into the global Python interpreter
if: "${{ matrix.target.runs-on == 'macos-latest' }}"
with:
python-version: "3.11"
- name: Build wheel
uses: PyO3/maturin-action@v1
with:
command: build
maturin-version: 1.10.2
target: ${{ matrix.target.target }}
args: >
${{ (matrix.target.os == 'ubuntu' && '--zig') || '' }}
--compatibility manylinux2014
--release
--manifest-path vortex-python/Cargo.toml
--out dist
--interpreter python3.11
env:
MATURIN_PEP517_USE_BASE_PYTHON: "true"
# Keep this constant to avoid pyo3 invalidating itself
PYO3_ENVIRONMENT_SIGNATURE: "cpython3"
- name: Upload wheels
uses: actions/upload-artifact@v7
with:
name: "wheels-${{ matrix.target.target }}.zip"
path: dist/
retention-days: 7
prepare-java-macos:
runs-on: "macos-latest"
timeout-minutes: 30
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: actions/setup-java@v5
with:
distribution: "corretto"
java-version: "17"
- uses: ./.github/actions/setup-rust
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
enable-sccache: "false"
- run: cargo build --release --package vortex-jni
- uses: actions/upload-artifact@v7
with:
name: "libvortex_jni_aarch64-apple-darwin.zip"
path: "target/release/libvortex_jni.dylib"
retention-days: 7
if-no-files-found: error
prepare-java-linux:
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-unknown-linux-gnu
runner: runs-on=${{ github.run_id }}/runner=amd64-medium/image=ubuntu24-full-x64-pre-v2/tag=prepare-java-linux-amd64
- target: aarch64-unknown-linux-gnu
runner: runs-on=${{ github.run_id }}/runner=arm64-medium/image=ubuntu24-full-arm64-pre-v2/tag=prepare-java-linux-arm64
runs-on: ${{ matrix.runner }}
steps:
- uses: runs-on/action@v2
if: github.repository == 'vortex-data/vortex'
with:
sccache: s3
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: actions/setup-java@v5
with:
distribution: "corretto"
java-version: "17"
- uses: ./.github/actions/setup-prebuild
- uses: mlugg/setup-zig@v2.2.1
- name: Install cargo-zigbuild
uses: taiki-e/cache-cargo-install-action@66c9585ef5ca780ee69399975a5e911f47905995
with:
tool: cargo-zigbuild
- run: cargo zigbuild --release --target ${{ matrix.target }}.2.31 --package vortex-jni
- uses: actions/upload-artifact@v7
with:
name: "libvortex_jni_${{ matrix.target }}.zip"
path: "target/${{ matrix.target }}/release/libvortex_jni.so"
retention-days: 7
if-no-files-found: error
prepare-all:
needs: [prepare-python, prepare-java-macos, prepare-java-linux]
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- run: echo "All packages built successfully"