Skip to content

Commit 5c1e3a5

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 5c1e3a5

Some content is hidden

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

54 files changed

+2154
-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: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
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+
27+
steps:
28+
- uses: actions/checkout@v5
29+
with:
30+
submodules: true
31+
32+
- name: Build wheels
33+
uses: pypa/[email protected]
34+
env:
35+
CIBW_ARCHS_MACOS: x86_64 arm64
36+
CIBW_ARCHS_LINUX: auto
37+
CIBW_ARCHS_WINDOWS: auto
38+
with:
39+
package-dir: ./projects/mpy-cross-v5
40+
41+
- uses: actions/upload-artifact@v4
42+
with:
43+
name: artifact-${{ matrix.os }}
44+
path: ./wheelhouse/*.whl
45+
46+
build_sdist:
47+
name: Build source distribution
48+
runs-on: ubuntu-latest
49+
steps:
50+
- uses: actions/checkout@v5
51+
with:
52+
submodules: true
53+
54+
- name: Build sdist
55+
run: pipx run build --sdist projects/mpy-cross-v5
56+
57+
- uses: actions/upload-artifact@v4
58+
with:
59+
name: artifact-source
60+
path: projects/mpy-cross-v5/dist/*.tar.gz
61+
62+
upload_pypi:
63+
needs: [build_wheels, build_sdist]
64+
runs-on: ubuntu-latest
65+
permissions:
66+
# IMPORTANT: this permission is mandatory for trusted publishing
67+
id-token: write
68+
# upload to PyPI on every tag
69+
if: github.event_name == 'push' && github.ref_type == 'tag'
70+
steps:
71+
- uses: actions/download-artifact@v5
72+
with:
73+
pattern: artifact-*
74+
merge-multiple: true
75+
path: dist
76+
77+
- uses: pypa/[email protected]

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

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
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+
27+
steps:
28+
- uses: actions/checkout@v5
29+
with:
30+
submodules: true
31+
32+
- name: Build wheels
33+
uses: pypa/[email protected]
34+
env:
35+
CIBW_ARCHS_MACOS: x86_64 arm64
36+
CIBW_ARCHS_LINUX: auto
37+
CIBW_ARCHS_WINDOWS: auto
38+
with:
39+
package-dir: ./projects/mpy-cross-v6.1
40+
41+
- uses: actions/upload-artifact@v4
42+
with:
43+
name: artifact-${{ matrix.os }}
44+
path: ./wheelhouse/*.whl
45+
46+
build_sdist:
47+
name: Build source distribution
48+
runs-on: ubuntu-latest
49+
steps:
50+
- uses: actions/checkout@v5
51+
with:
52+
submodules: true
53+
54+
- name: Build sdist
55+
run: pipx run build --sdist projects/mpy-cross-v6.1
56+
57+
- uses: actions/upload-artifact@v4
58+
with:
59+
name: artifact-source
60+
path: projects/mpy-cross-v6.1/dist/*.tar.gz
61+
62+
upload_pypi:
63+
needs: [build_wheels, build_sdist]
64+
runs-on: ubuntu-latest
65+
permissions:
66+
# IMPORTANT: this permission is mandatory for trusted publishing
67+
id-token: write
68+
# upload to PyPI on every tag
69+
if: github.event_name == 'push' && github.ref_type == 'tag'
70+
steps:
71+
- uses: actions/download-artifact@v5
72+
with:
73+
pattern: artifact-*
74+
merge-multiple: true
75+
path: dist
76+
77+
- uses: pypa/[email protected]

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

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
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+
27+
steps:
28+
- uses: actions/checkout@v5
29+
with:
30+
submodules: true
31+
32+
- name: Build wheels
33+
uses: pypa/[email protected]
34+
env:
35+
CIBW_ARCHS_MACOS: x86_64 arm64
36+
CIBW_ARCHS_LINUX: auto
37+
CIBW_ARCHS_WINDOWS: auto
38+
with:
39+
package-dir: ./projects/mpy-cross-v6.2
40+
41+
- uses: actions/upload-artifact@v4
42+
with:
43+
name: artifact-${{ matrix.os }}
44+
path: ./wheelhouse/*.whl
45+
46+
build_sdist:
47+
name: Build source distribution
48+
runs-on: ubuntu-latest
49+
steps:
50+
- uses: actions/checkout@v5
51+
with:
52+
submodules: true
53+
54+
- name: Build sdist
55+
run: pipx run build --sdist projects/mpy-cross-v6.2
56+
57+
- uses: actions/upload-artifact@v4
58+
with:
59+
name: artifact-source
60+
path: projects/mpy-cross-v6.2/dist/*.tar.gz
61+
62+
upload_pypi:
63+
needs: [build_wheels, build_sdist]
64+
runs-on: ubuntu-latest
65+
permissions:
66+
# IMPORTANT: this permission is mandatory for trusted publishing
67+
id-token: write
68+
# upload to PyPI on every tag
69+
if: github.event_name == 'push' && github.ref_type == 'tag'
70+
steps:
71+
- uses: actions/download-artifact@v5
72+
with:
73+
pattern: artifact-*
74+
merge-multiple: true
75+
path: dist
76+
77+
- uses: pypa/[email protected]

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

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
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+
27+
steps:
28+
- uses: actions/checkout@v5
29+
with:
30+
submodules: true
31+
32+
- name: Build wheels
33+
uses: pypa/[email protected]
34+
env:
35+
CIBW_ARCHS_MACOS: x86_64 arm64
36+
CIBW_ARCHS_LINUX: auto
37+
CIBW_ARCHS_WINDOWS: auto
38+
with:
39+
package-dir: ./projects/mpy-cross-v6.3
40+
41+
- uses: actions/upload-artifact@v4
42+
with:
43+
name: artifact-${{ matrix.os }}
44+
path: ./wheelhouse/*.whl
45+
46+
build_sdist:
47+
name: Build source distribution
48+
runs-on: ubuntu-latest
49+
steps:
50+
- uses: actions/checkout@v5
51+
with:
52+
submodules: true
53+
54+
- name: Build sdist
55+
run: pipx run build --sdist projects/mpy-cross-v6.3
56+
57+
- uses: actions/upload-artifact@v4
58+
with:
59+
name: artifact-source
60+
path: projects/mpy-cross-v6.3/dist/*.tar.gz
61+
62+
upload_pypi:
63+
needs: [build_wheels, build_sdist]
64+
runs-on: ubuntu-latest
65+
permissions:
66+
# IMPORTANT: this permission is mandatory for trusted publishing
67+
id-token: write
68+
# upload to PyPI on every tag
69+
if: github.event_name == 'push' && github.ref_type == 'tag'
70+
steps:
71+
- uses: actions/download-artifact@v5
72+
with:
73+
pattern: artifact-*
74+
merge-multiple: true
75+
path: dist
76+
77+
- uses: pypa/[email protected]

.github/workflows/publish-v6.yml

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

0 commit comments

Comments
 (0)