Skip to content

Commit d7bf7f6

Browse files
committed
add subprojects for each MPY version
These are migrated from the pybricks/python-mpy-cross project. It will be easier to manage all versions on a single branch in a single repository.
1 parent afac05a commit d7bf7f6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+2334
-68
lines changed

.github/dependabot.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
ignore:
8+
- dependency-name: "actions/*"
9+
update-types: ["version-update:semver-minor", "version-update:semver-patch"]

.github/workflows/publish-v5.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: Build and upload to PyPI (v5)
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'projects/mpy-cross-v5/**'
9+
- .github/workflows/publish-v5.yml
10+
tags:
11+
- mpy-cross-v5/*
12+
pull_request:
13+
branches:
14+
- main
15+
paths:
16+
- 'projects/mpy-cross-v5/**'
17+
- .github/workflows/publish-v5.yml
18+
19+
jobs:
20+
build_wheels:
21+
name: Build wheels on ${{ matrix.os }}
22+
runs-on: ${{ matrix.os }}
23+
strategy:
24+
matrix:
25+
os: [ubuntu-22.04, ubuntu-24.04-arm, windows-latest, windows-11-arm, macos-latest]
26+
fail-fast: false
27+
28+
steps:
29+
- uses: actions/checkout@v5
30+
with:
31+
submodules: true
32+
33+
- name: Build wheels
34+
uses: pypa/[email protected]
35+
env:
36+
CIBW_ARCHS_MACOS: x86_64 arm64
37+
CIBW_ARCHS_LINUX: auto
38+
CIBW_ARCHS_WINDOWS: auto
39+
with:
40+
package-dir: ./projects/mpy-cross-v5
41+
42+
- uses: actions/upload-artifact@v4
43+
with:
44+
name: artifact-${{ matrix.os }}
45+
path: ./wheelhouse/*.whl
46+
47+
build_sdist:
48+
name: Build source distribution
49+
runs-on: ubuntu-latest
50+
steps:
51+
- uses: actions/checkout@v5
52+
with:
53+
submodules: true
54+
55+
- name: Build sdist
56+
run: pipx run build --sdist projects/mpy-cross-v5
57+
58+
- uses: actions/upload-artifact@v4
59+
with:
60+
name: artifact-source
61+
path: projects/mpy-cross-v5/dist/*.tar.gz
62+
63+
upload_pypi:
64+
needs: [build_wheels, build_sdist]
65+
runs-on: ubuntu-latest
66+
permissions:
67+
# IMPORTANT: this permission is mandatory for trusted publishing
68+
id-token: write
69+
# upload to PyPI on every tag
70+
if: github.event_name == 'push' && github.ref_type == 'tag'
71+
steps:
72+
- uses: actions/download-artifact@v5
73+
with:
74+
pattern: artifact-*
75+
merge-multiple: true
76+
path: dist
77+
78+
- uses: pypa/[email protected]

.github/workflows/publish-v6.1.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: Build and upload to PyPI (v6.1)
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'projects/mpy-cross-v6.1/**'
9+
- .github/workflows/publish-v6.1.yml
10+
tags:
11+
- mpy-cross-v6.1/*
12+
pull_request:
13+
branches:
14+
- main
15+
paths:
16+
- 'projects/mpy-cross-v6.1/**'
17+
- .github/workflows/publish-v6.1.yml
18+
19+
jobs:
20+
build_wheels:
21+
name: Build wheels on ${{ matrix.os }}
22+
runs-on: ${{ matrix.os }}
23+
strategy:
24+
matrix:
25+
os: [ubuntu-22.04, ubuntu-24.04-arm, windows-latest, windows-11-arm, macos-latest]
26+
fail-fast: false
27+
28+
steps:
29+
- uses: actions/checkout@v5
30+
with:
31+
submodules: true
32+
33+
- name: Build wheels
34+
uses: pypa/[email protected]
35+
env:
36+
CIBW_ARCHS_MACOS: x86_64 arm64
37+
CIBW_ARCHS_LINUX: auto
38+
CIBW_ARCHS_WINDOWS: auto
39+
with:
40+
package-dir: ./projects/mpy-cross-v6.1
41+
42+
- uses: actions/upload-artifact@v4
43+
with:
44+
name: artifact-${{ matrix.os }}
45+
path: ./wheelhouse/*.whl
46+
47+
build_sdist:
48+
name: Build source distribution
49+
runs-on: ubuntu-latest
50+
steps:
51+
- uses: actions/checkout@v5
52+
with:
53+
submodules: true
54+
55+
- name: Build sdist
56+
run: pipx run build --sdist projects/mpy-cross-v6.1
57+
58+
- uses: actions/upload-artifact@v4
59+
with:
60+
name: artifact-source
61+
path: projects/mpy-cross-v6.1/dist/*.tar.gz
62+
63+
upload_pypi:
64+
needs: [build_wheels, build_sdist]
65+
runs-on: ubuntu-latest
66+
permissions:
67+
# IMPORTANT: this permission is mandatory for trusted publishing
68+
id-token: write
69+
# upload to PyPI on every tag
70+
if: github.event_name == 'push' && github.ref_type == 'tag'
71+
steps:
72+
- uses: actions/download-artifact@v5
73+
with:
74+
pattern: artifact-*
75+
merge-multiple: true
76+
path: dist
77+
78+
- uses: pypa/[email protected]

.github/workflows/publish-v6.2.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: Build and upload to PyPI (v6.2)
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'projects/mpy-cross-v6.2/**'
9+
- .github/workflows/publish-v6.2.yml
10+
tags:
11+
- mpy-cross-v6.2/*
12+
pull_request:
13+
branches:
14+
- main
15+
paths:
16+
- 'projects/mpy-cross-v6.2/**'
17+
- .github/workflows/publish-v6.2.yml
18+
19+
jobs:
20+
build_wheels:
21+
name: Build wheels on ${{ matrix.os }}
22+
runs-on: ${{ matrix.os }}
23+
strategy:
24+
matrix:
25+
os: [ubuntu-22.04, ubuntu-24.04-arm, windows-latest, windows-11-arm, macos-latest]
26+
fail-fast: false
27+
28+
steps:
29+
- uses: actions/checkout@v5
30+
with:
31+
submodules: true
32+
33+
- name: Build wheels
34+
uses: pypa/[email protected]
35+
env:
36+
CIBW_ARCHS_MACOS: x86_64 arm64
37+
CIBW_ARCHS_LINUX: auto
38+
CIBW_ARCHS_WINDOWS: auto
39+
with:
40+
package-dir: ./projects/mpy-cross-v6.2
41+
42+
- uses: actions/upload-artifact@v4
43+
with:
44+
name: artifact-${{ matrix.os }}
45+
path: ./wheelhouse/*.whl
46+
47+
build_sdist:
48+
name: Build source distribution
49+
runs-on: ubuntu-latest
50+
steps:
51+
- uses: actions/checkout@v5
52+
with:
53+
submodules: true
54+
55+
- name: Build sdist
56+
run: pipx run build --sdist projects/mpy-cross-v6.2
57+
58+
- uses: actions/upload-artifact@v4
59+
with:
60+
name: artifact-source
61+
path: projects/mpy-cross-v6.2/dist/*.tar.gz
62+
63+
upload_pypi:
64+
needs: [build_wheels, build_sdist]
65+
runs-on: ubuntu-latest
66+
permissions:
67+
# IMPORTANT: this permission is mandatory for trusted publishing
68+
id-token: write
69+
# upload to PyPI on every tag
70+
if: github.event_name == 'push' && github.ref_type == 'tag'
71+
steps:
72+
- uses: actions/download-artifact@v5
73+
with:
74+
pattern: artifact-*
75+
merge-multiple: true
76+
path: dist
77+
78+
- uses: pypa/[email protected]

.github/workflows/publish-v6.3.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: Build and upload to PyPI (v6.3)
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'projects/mpy-cross-v6.3/**'
9+
- .github/workflows/publish-v6.3.yml
10+
tags:
11+
- mpy-cross-v6.3/*
12+
pull_request:
13+
branches:
14+
- main
15+
paths:
16+
- 'projects/mpy-cross-v6.3/**'
17+
- .github/workflows/publish-v6.3.yml
18+
19+
jobs:
20+
build_wheels:
21+
name: Build wheels on ${{ matrix.os }}
22+
runs-on: ${{ matrix.os }}
23+
strategy:
24+
matrix:
25+
os: [ubuntu-22.04, ubuntu-24.04-arm, windows-latest, windows-11-arm, macos-latest]
26+
fail-fast: false
27+
28+
steps:
29+
- uses: actions/checkout@v5
30+
with:
31+
submodules: true
32+
33+
- name: Build wheels
34+
uses: pypa/[email protected]
35+
env:
36+
CIBW_ARCHS_MACOS: x86_64 arm64
37+
CIBW_ARCHS_LINUX: auto
38+
CIBW_ARCHS_WINDOWS: auto
39+
with:
40+
package-dir: ./projects/mpy-cross-v6.3
41+
42+
- uses: actions/upload-artifact@v4
43+
with:
44+
name: artifact-${{ matrix.os }}
45+
path: ./wheelhouse/*.whl
46+
47+
build_sdist:
48+
name: Build source distribution
49+
runs-on: ubuntu-latest
50+
steps:
51+
- uses: actions/checkout@v5
52+
with:
53+
submodules: true
54+
55+
- name: Build sdist
56+
run: pipx run build --sdist projects/mpy-cross-v6.3
57+
58+
- uses: actions/upload-artifact@v4
59+
with:
60+
name: artifact-source
61+
path: projects/mpy-cross-v6.3/dist/*.tar.gz
62+
63+
upload_pypi:
64+
needs: [build_wheels, build_sdist]
65+
runs-on: ubuntu-latest
66+
permissions:
67+
# IMPORTANT: this permission is mandatory for trusted publishing
68+
id-token: write
69+
# upload to PyPI on every tag
70+
if: github.event_name == 'push' && github.ref_type == 'tag'
71+
steps:
72+
- uses: actions/download-artifact@v5
73+
with:
74+
pattern: artifact-*
75+
merge-multiple: true
76+
path: dist
77+
78+
- uses: pypa/[email protected]

0 commit comments

Comments
 (0)