@@ -17,7 +17,110 @@ concurrency:
17
17
cancel-in-progress : true
18
18
19
19
jobs :
20
- build :
20
+ build-vs :
21
+ strategy :
22
+ fail-fast : false
23
+ matrix :
24
+ architecture : [x86, x64]
25
+ configuration : [Debug, Release]
26
+ variant : [dev, standard]
27
+ visualstudio : ['2019', '2022']
28
+ exclude :
29
+ - variant : standard
30
+ configuration : Debug
31
+ runs-on : windows-${{ matrix.visualstudio }}
32
+ steps :
33
+ - uses : microsoft/setup-msbuild@v1
34
+ with :
35
+ msbuild-architecture : ${{ matrix.architecture }}
36
+ - uses : actions/checkout@v3
37
+ - name : Build mpy-cross.exe
38
+ run : msbuild mpy-cross\mpy-cross.vcxproj -maxcpucount -property:Configuration=${{ matrix.configuration }}
39
+ - name : Build micropython.exe
40
+ run : msbuild ports\windows\micropython.vcxproj -maxcpucount -property:Configuration=${{ matrix.configuration }} -property:PyVariant=${{ matrix.variant }}
41
+ - name : Get micropython.exe path
42
+ id : get_path
43
+ run : |
44
+ $exePath="micropython=$((msbuild ports\windows\micropython.vcxproj -nologo -v:m -t:ShowTargetPath -property:Configuration=${{ matrix.configuration }} -property:PyVariant=${{ matrix.variant }}).Trim())"
45
+ echo $exePath
46
+ echo $exePath | Set-Content $env:GITHUB_OUTPUT
47
+ - name : Run tests
48
+ id : test
49
+ env :
50
+ MICROPY_MICROPYTHON : ${{ steps.get_path.outputs.micropython }}
51
+ working-directory : tests
52
+ run : python run-tests.py
53
+ - name : Print failures
54
+ if : failure() && steps.test.conclusion == 'failure'
55
+ working-directory : tests
56
+ run : python run-tests.py --print-failures
57
+ - name : Run mpy tests
58
+ id : test_mpy
59
+ env :
60
+ MICROPY_MICROPYTHON : ${{ steps.get_path.outputs.micropython }}
61
+ working-directory : tests
62
+ run : python run-tests.py --via-mpy -d basics float micropython
63
+ - name : Print mpy failures
64
+ if : failure() && steps.test_mpy.conclusion == 'failure'
65
+ working-directory : tests
66
+ run : python run-tests.py --print-failures
67
+
68
+ build-mingw :
69
+ strategy :
70
+ fail-fast : false
71
+ matrix :
72
+ variant : [dev, standard]
73
+ sys : [mingw32, mingw64]
74
+ include :
75
+ - sys : mingw32
76
+ env : i686
77
+ - sys : mingw64
78
+ env : x86_64
79
+ runs-on : windows-2022
80
+ env :
81
+ CHERE_INVOKING : enabled_from_arguments
82
+ defaults :
83
+ run :
84
+ shell : msys2 {0}
85
+ steps :
86
+ - name : Get Python path
87
+ id : python_path
88
+ shell : python
89
+ run : |
90
+ import os
91
+ import sys
92
+ output = f"python={os.fspath(sys.executable)}"
93
+ print(output)
94
+ with open(os.environ["GITHUB_OUTPUT"], "w") as f:
95
+ f.write(output)
96
+ - uses : msys2/setup-msys2@v2
97
+ with :
98
+ msystem : ${{ matrix.sys }}
99
+ update : true
100
+ install : >-
101
+ make
102
+ mingw-w64-${{ matrix.env }}-gcc
103
+ pkg-config
104
+ python3
105
+ git
106
+ diffutils
107
+ - uses : actions/checkout@v3
108
+ - name : Build mpy-cross.exe
109
+ run : make -C mpy-cross -j2
110
+ - name : Update submodules
111
+ run : make -C ports/windows VARIANT=${{ matrix.variant }} submodules
112
+ - name : Build micropython.exe
113
+ run : make -C ports/windows -j2 VARIANT=${{ matrix.variant }}
114
+ - name : Run tests
115
+ id : test
116
+ # msys python breaks tests so we need to use "real" windows python
117
+ run : MICROPY_CPYTHON3=$(cygpath "${{ steps.python_path.outputs.python }}") make -C ports/windows test_full VARIANT=${{ matrix.variant }}
118
+ - name : Print failures
119
+ if : failure() && steps.test.conclusion == 'failure'
120
+ working-directory : tests
121
+ run : python run-tests.py --print-failures
122
+
123
+ cross-build-on-linux :
21
124
runs-on : ubuntu-latest
22
125
steps :
23
126
- uses : actions/checkout@v3
0 commit comments