Skip to content

Commit ae4247a

Browse files
committed
Added targets to rustup in mac builds. Added draft of simple test to mac
1 parent b5c07bd commit ae4247a

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

.github/workflows/python_ci.yml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ jobs:
1414
matrix:
1515
profile:
1616
- "release"
17+
target:
18+
- "x86_64-unknown-linux-gnu"
19+
1720
steps:
1821
- uses: actions/checkout@v4
1922
- uses: actions-rust-lang/setup-rust-toolchain@v1
@@ -29,6 +32,8 @@ jobs:
2932
- name: "Build linux python wheel"
3033
run: maturin build --verbose ${{ matrix.profile == 'release' && '--release' || '' }} --locked
3134
working-directory: ./nobodywho/python
35+
- name: "Rename built files"
36+
run: cp .nobodywho/target/wheels/nobodywhopython* ./nobodywhopython-${{ matrix.target }}-${{ matrix.profile }}.whl
3237

3338
windows-build:
3439
runs-on: windows-latest
@@ -63,7 +68,7 @@ jobs:
6368
mv ./nobodywho/* C:/
6469
cd C:/
6570
cd python
66-
maturin build --verbose ${{ matrix.profile == 'release' && '--release' || '' }} --locked
71+
maturin build --verbose ${{ matrix.profile == 'release' && '--release' || '' }} --locked --target ${{ matrix.target }}
6772
6873
mac-os-build:
6974
runs-on: macos-14
@@ -83,10 +88,21 @@ jobs:
8388
- uses: actions/setup-python@v6
8489
with:
8590
python-version: '3.13'
91+
- run: rustup target add ${{ matrix.target }}
8692
- run: brew install maturin
8793
- name: "Build macos python wheel"
8894
run: maturin build --verbose ${{ matrix.profile == 'release' && '--release' || '' }} --locked --target ${{ matrix.target }}
8995
working-directory: ./nobodywho/python
96+
97+
- name: "Rename built files"
98+
run: cp .nobodywho/target/wheels/nobodywhopython* ./nobodywhopython-${{ matrix.target }}-${{ matrix.profile }}.whl
99+
100+
- name: "Upload build artifact"
101+
uses: actions/upload-artifact@v4
102+
with:
103+
name: nobodywhopython-${{ matrix.target }}-${{ matrix.profile }}.whl
104+
path: ./nobodywhopython-${{ matrix.target }}-${{ matrix.profile }}.whl
105+
90106

91107
mac-os-test-build:
92108
runs-on: macos-14
@@ -106,6 +122,14 @@ jobs:
106122
- uses: actions/setup-python@v6
107123
with:
108124
python-version: '3.13'
125+
126+
- name: "Download wheel"
127+
uses: actions/download-artifact@v4
128+
with:
129+
path: ./artifacts
130+
- run: pip install ./artifacts/nobodywhopython-${{ matrix.target }}-${{ matrix.profile }}.whl
131+
132+
109133

110134

111135

0 commit comments

Comments
 (0)