@@ -28,23 +28,52 @@ jobs:
2828 git push
2929 exit(0) # exiting with '1' for some reason, so force proper exit
3030
31- rust :
32- name : build pyd file
31+ rust-64 :
32+ name : Build 64 bit version and test it (don't both repeating for 32 bit version)
33+ runs-on : ubuntu-latest
34+ steps :
35+ - name : Checkout code
36+ uses : actions/checkout@v3
37+ - name : Set up Python
38+ uses : actions/setup-python@v5
39+ with :
40+ python-version : 3.11
41+ architecture : ' x86'
42+ - name : Build Rust Library
43+ run : cargo build --target x86_64-pc-windows-msvc --release
44+ - name : Setup Example dir
45+ run : |
46+ cp target/x86_64-pc-windows-msvc/release/libmathcat_py.dll Example/libmathcat_py.pyd
47+ # build the test after zipping up "Rules" because the test will unzip the files needed for the test
48+ - name : test build
49+ run : |
50+ cp target/x86_64-pc-windows-msvc/release/libmathcat_py.dll Examples/libmathcat_py.pyd
51+ cd Example
52+ python test
53+ - name : Upload addons dir
54+ uses : actions/upload-artifact@v4
55+ with :
56+ name : upload 64 bit pyd
57+ path : Example
58+ retention-days : 1
59+
60+ rust-32 :
61+ name : build 64-bit pyd file
3362 needs : l10n
3463 runs-on : windows-latest # needs to run on windows because no 32-bit python on linux
3564 steps :
3665 - name : Checkout code
3766 uses : actions/checkout@v3
3867 - name : Set up Python
39- uses : actions/setup-python@v4
68+ uses : actions/setup-python@v5
4069 with :
4170 python-version : 3.11
4271 architecture : ' x86'
43- - name : Set up Rust
72+ - name : Build Rust Library
4473 run : cargo build --target i686-pc-windows-msvc --release
4574 - name : Set up addons dir
4675 run : |
47- cp target/i686-pc-windows-msvc/release/libmathcat_py.dll addon/globalPlugins/MathCAT/libmathcat .pyd
76+ cp target/i686-pc-windows-msvc/release/libmathcat_py.dll addon/globalPlugins/MathCAT/libmathcat_py .pyd
4877 sed 's/^import wx\.xrc/# import wx.xrc/' --in-place "addon/globalPlugins/MathCAT/MathCATgui.py" # fix wx file
4978 - name : Upload addons dir to use with scons
5079 uses : actions/upload-artifact@v4
5685 pre-release :
5786 name : Pre Release
5887 continue-on-error : false
59- needs : rust
88+ needs : [ rust-64, rust-32]
6089 runs-on : ubuntu-latest
6190 steps :
6291 - name : Checkout code
82111 scons
83112 - name : copy standalone library so it has a meaningful name
84113 run : |
85- cp addon/globalPlugins/MathCAT/libmathcat.pyd libmathcat-32-3.11.pyd
114+ cp addon/globalPlugins/MathCAT/libmathcat_py.pyd libmathcat_py-32-3.11.pyd
115+ cp Example/libmathcat_py.pyd libmathcat_py-64-3.11.pyd
86116 - name : Automatic release
87117 uses : marvinpinto/action-automatic-releases@latest
88118 with :
92122 title : Development Build
93123 files : |
94124 *.nvda-addon
95- libmathcat-32-3.11.pyd
125+ libmathcat_py-32-3.11.pyd
126+ libmathcat_py-64-3.11.pyd
0 commit comments