@@ -14,63 +14,69 @@ permissions:
14
14
jobs :
15
15
build :
16
16
strategy :
17
+ fail-fast : false
17
18
matrix :
18
- os : [ ubuntu-latest, ubuntu-20.04, windows-latest, macOS-11 ]
19
- arch : [ x64 ]
20
- include :
21
- - os : windows-latest
22
- arch : x86
19
+ os : [ ubuntu-latest, ubuntu-24.04-arm, windows-latest, windows-11-arm, macos-latest ]
23
20
runs-on : ${{ matrix.os }}
24
21
25
22
permissions :
26
23
contents : write # svenstaro/upload-release-action
27
24
28
25
steps :
29
- - uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
30
- - uses : actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1
26
+ - uses : actions/checkout@v4
27
+ with :
28
+ submodules : ' recursive'
29
+ - uses : actions/setup-python@v5
31
30
with :
32
31
python-version : ' 3.x'
33
- architecture : ${{matrix.arch}}
32
+ # architecture: ${{runner.arch}}
33
+
34
+ - name : Config for Windows (x64)
35
+ if : runner.os == 'Windows' && runner.arch == 'X64'
36
+ run : |
37
+ cmake -A x64 -B ${{github.workspace}}/build -DSPM_BUILD_TEST=ON -DBUILD_SHARED_LIBS=OFF -DSPM_ENABLE_SHARED=OFF -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/build/root
34
38
35
- - name : Config for Windows
36
- if : runner.os == 'Windows'
39
+ - name : Config for Windows (x64)
40
+ if : runner.os == 'Windows' && runner.arch == 'ARM64'
37
41
run : |
38
- if ("${{matrix.arch}}" -eq "x64") {
39
- $msbuildPlatform = "x64"
40
- } else {
41
- $msbuildPlatform = "Win32"
42
- }
43
- cmake -A $msbuildPlatform -B ${{github.workspace}}/build -DSPM_BUILD_TEST=ON -DSPM_ENABLE_SHARED=OFF -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/build/root
42
+ cmake -A arm64 -B ${{github.workspace}}/build -DSPM_BUILD_TEST=ON -DBUILD_SHARED_LIBS=OFF -DSPM_ENABLE_SHARED=OFF -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/build/root
44
43
45
44
- name : Config for Unix
46
45
if : runner.os != 'Windows'
47
- run : cmake -B ${{github.workspace}}/build -DSPM_BUILD_TEST=ON -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/build/root
48
- env :
49
- CMAKE_OSX_ARCHITECTURES : arm64;x86_64
46
+ run : cmake -B ${{github.workspace}}/build -DSPM_BUILD_TEST=ON -DBUILD_SHARED_LIBS=OFF -DSPM_ENABLE_SHARED=OFF -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/build/root
50
47
51
48
- name : Build
52
49
run : cmake --build ${{github.workspace}}/build --config Release --target install --parallel 8
53
50
54
51
- name : Test
55
52
working-directory : ${{github.workspace}}/build
56
53
run : ctest -C Release --output-on-failure
54
+ env :
55
+ TEST_SRCDIR : ${{github.workspace}}/data
57
56
58
57
- name : Package
59
58
working-directory : ${{github.workspace}}/build
60
59
run : cpack
61
60
62
61
- name : Build Python wrapper
62
+ # Current the `wheel` pip package is not avaiable for windows arm, so skip.
63
+ if : runner.os != 'Windows' || runner.arch != 'ARM64'
63
64
working-directory : ${{github.workspace}}/python
64
65
run : |
65
66
python -m pip install --require-hashes --no-dependencies -r ../.github/workflows/requirements/base.txt
66
67
python setup.py build
67
68
python setup.py bdist_wheel
69
+ ls dist/*.whl
70
+ pip install $(ls dist/*.whl)
71
+ pushd test
68
72
python -m pytest
73
+ env :
74
+ GITHUB_REF_NAME : " ${{github.ref_name}}"
69
75
70
76
- name : Upload artifcacts
71
- uses : actions/upload-artifact@v3
77
+ uses : actions/upload-artifact@v4
72
78
with :
73
- name : artifcacts
79
+ name : " build-python-wrapper-artifacts-${{runner.os}}-${{runner.arch}} "
74
80
path : ./build/*.7z
75
81
76
82
- name : Upload Release Assets
0 commit comments