-
Notifications
You must be signed in to change notification settings - Fork 3
113 lines (106 loc) · 2.84 KB
/
release.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
102
103
104
105
106
107
108
109
110
111
112
113
name: Release
on: [push, pull_request, workflow_dispatch]
# on:
# create:
# tags:
# - v*
# workflow_dispatch:
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rye
uses: eifinger/setup-rye@v4
- name: Install Momba
run: |
rye sync
- name: Check
run: |
rye fmt --all --check
rye lint --all
rye run check-types
- name: Build
run: |
rye build -p momba
rye build -p momba_engine --sdist
- uses: actions/upload-artifact@v4
with:
name: packages
path: ./dist/*{.tar.gz,.whl}
build_engine_wheels_linux:
name: Build Linux Engine Wheel (${{ matrix.target }})
runs-on: ubuntu-latest
strategy:
matrix:
target: ["x86_64", "aarch64", "armv7"]
steps:
- uses: actions/checkout@v4
- name: Build Wheel
uses: messense/maturin-action@v1
with:
target: ${{ matrix.target }}
manylinux: auto
args: --release --out dist -m engine/Cargo.toml
- uses: actions/upload-artifact@v4
with:
name: packages
path: ./dist/*.whl
build_engine_wheels_windows:
name: Build Windows Engine Wheel (${{ matrix.target }})
runs-on: windows-latest
strategy:
matrix:
target: ["x86_64"]
steps:
- uses: actions/checkout@v4
- name: Build Wheel
uses: messense/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist -m engine/Cargo.toml
- uses: actions/upload-artifact@v4
with:
name: packages
path: ./dist/*.whl
build_engine_wheels_macos:
name: Build MacOS Engine Wheel (${{ matrix.target }})
runs-on: macos-latest
strategy:
matrix:
target: ["x86_64", "aarch64"]
steps:
- uses: actions/checkout@v4
- name: Build Wheel
uses: messense/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist -m engine/Cargo.toml
- uses: actions/upload-artifact@v4
with:
name: packages
path: ./dist/*.whl
publish:
name: Publish to PyPI
runs-on: ubuntu-latest
# environment: pypi
needs:
- build
- build_engine_wheels_linux
- build_engine_wheels_windows
- build_engine_wheels_macos
steps:
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
name: packages
path: dist
- name: Display Files
run: ls -l dist
# - name: Publish Package to PyPI
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# user: __token__
# verify_metadata: false
# password: ${{ secrets.PYPI_API_TOKEN }}