Skip to content

Commit 34c184a

Browse files
authored
Merge pull request #15 from python-project-templates/tkp/ci
Add ci for mac and windows
2 parents 2e5342b + f94c131 commit 34c184a

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

.github/workflows/build.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929

3030
strategy:
3131
matrix:
32-
os: [ubuntu-latest]
32+
os: [ubuntu-latest, macos-latest, windows-latest]
3333
python-version: ["3.11"]
3434

3535
steps:
@@ -39,6 +39,8 @@ jobs:
3939
with:
4040
version: ${{ matrix.python-version }}
4141

42+
- uses: actions-ext/rust/setup@main
43+
4244
- name: Install dependencies
4345
run: make develop
4446

@@ -59,17 +61,19 @@ jobs:
5961
with:
6062
name: test-results-${{ matrix.os }}-${{ matrix.python-version }}
6163
path: junit.xml
62-
if: ${{ always() }}
64+
if: ${{ matrix.os == 'ubuntu-latest' }}
6365

6466
- name: Publish Unit Test Results
6567
uses: EnricoMi/publish-unit-test-result-action@v2
6668
with:
6769
files: '**/junit.xml'
70+
if: ${{ matrix.os == 'ubuntu-latest' }}
6871

6972
- name: Upload coverage
7073
uses: codecov/codecov-action@v5
7174
with:
7275
token: ${{ secrets.CODECOV_TOKEN }}
76+
if: ${{ matrix.os == 'ubuntu-latest' }}
7377

7478
- name: Make dist
7579
run: make dist
@@ -78,3 +82,4 @@ jobs:
7882
with:
7983
name: dist-${{matrix.os}}
8084
path: dist
85+
if: ${{ matrix.os == 'ubuntu-latest' }}

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ Hatch plugin for Rust builds
99

1010
## Overview
1111

12+
A simple, extensible Rust build plugin for [hatch](https://hatch.pypa.io/latest/).
13+
14+
```toml
15+
[tool.hatch.build.hooks.hatch-rs]
16+
verbose = true
17+
path = "."
18+
module = "project"
19+
```
1220

1321
> [!NOTE]
1422
> This library was generated using [copier](https://copier.readthedocs.io/en/stable/) from the [Base Python Project Template repository](https://github.com/python-project-templates/base).

hatch_rs/structs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def generate(self):
6666

6767
if not self.target:
6868
if platform == "win32":
69-
if machine == "x86_64":
69+
if machine in ("x86_64", "AMD64"):
7070
self.target = "x86_64-pc-windows-msvc"
7171
elif machine == "i686":
7272
self.target = "i686-pc-windows-msvc"

0 commit comments

Comments
 (0)