@@ -5,160 +5,84 @@ on: [push]
55jobs :
66 build-windows :
77 name : Build Windows
8- runs-on : windows-2016
8+ runs-on : windows-latest
99 steps :
1010 - uses : actions/checkout@v1
1111
1212 - name : Build x86
1313 run : |
1414 mkdir x86
1515 cd x86
16- cmake ../
16+ cmake .. -A Win32 -G "Visual Studio 17 2022"
1717 cmake --build . --config RelWithDebInfo --target install
1818
1919 - name : Upload x86
20202121 with :
22- name : x86
22+ name : win32- x86
2323 path : x86/install/bin
2424
2525 - name : Build x64
2626 run : |
2727 mkdir x64
2828 cd x64
29- cmake ../ -G "Visual Studio 15 2017 Win64 "
29+ cmake ../ -G "Visual Studio 17 2022 "
3030 cmake --build . --config RelWithDebInfo --target install
3131
3232 - name : Upload x64
33333434 with :
35- name : x64
35+ name : win32- x64
3636 path : x64/install/bin
3737
38- build-darwin :
39- name : Build Darwin
40- runs-on : macos-latest
38+ build-other :
39+ runs-on : ${{ matrix.os }}
40+ strategy :
41+ fail-fast : false
42+ matrix :
43+ include :
44+ - { os: ubuntu-latest, target: linux, platform: linux-x64}
45+ - { os: macos-latest, target: darwin, platform: darwin-x64}
46+ - { os: macos-latest, target: darwin, platform: darwin-arm64}
4147 steps :
4248 - uses : actions/checkout@v1
4349
4450 - name : Build
4551 run : |
4652 mkdir build
4753 cd build
48- cmake -DCMAKE_BUILD_TYPE=Release ../
49- make install
50-
54+ cmake ..
55+ cmake --build . --config Release
56+ cmake --install . --config Release --prefix ${{ github.workspace }}/artifact/
5157 - name : Upload
52- uses : actions/upload-artifact@v1.0.0
58+ uses : actions/upload-artifact@v2
5359 with :
54- name : emmy_core.dylib
55- path : build/install/bin/emmy_core.dylib
56-
57- build-linux :
58- name : Build Linux
59- runs-on : ubuntu-18.04
60- steps :
61- - uses : actions/checkout@v1
62-
63- - name : Install
64- run : |
65- sudo apt-get install libreadline-dev
66-
67- - name : Build
68- run : |
69- mkdir build
70- cd build
71- cmake -DCMAKE_BUILD_TYPE=Release ../
72- make install
73-
74- - name : Upload
75- 76- with :
77- name : emmy_core.so
78- path : build/install/bin/emmy_core.so
79-
60+ name : ${{ matrix.platform }}
61+ path : ${{ github.workspace }}/artifact/
62+
8063 upload-release :
8164 name : Upload Release
8265 if : startsWith(github.ref, 'refs/tags/')
83- needs : [build-windows, build-darwin, build-linux ]
66+ needs : [build-windows, build-other ]
8467 runs-on : [ubuntu-18.04]
8568 env :
8669 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
8770 steps :
88- - name : Create release
89- id : create_release
90- uses : actions/create-release@master
91- with :
92- tag_name : ${{ github.ref }}
93- release_name : ${{ github.ref }}
94- body : ${{ github.ref }}
95- draft : true
96- prerelease : true
97-
98- - name : Download Windows-x86
99- 100- with :
101- name : x86
102- path : artifact/x86
103-
104- - name : Zip x86
105- uses :
TheDoctor0/[email protected] 106- with :
107- 108- path : artifact/x86
109-
110- - name : Upload x86
111- 112- with :
113- upload_url : ${{ steps.create_release.outputs.upload_url }}
114- 115- 116- asset_content_type : application/tar+gzip
117-
118- - name : Download Windows-x64
119- 120- with :
121- name : x64
122- path : artifact/x64
123-
124- - name : Zip x64
125- uses :
TheDoctor0/[email protected] 126- with :
127- 128- path : artifact/x64
129-
130- - name : Upload x64
131- 132- with :
133- upload_url : ${{ steps.create_release.outputs.upload_url }}
134- 135- 136- asset_content_type : application/tar+gzip
137-
138- - name : Download so
139- 140- with :
141- name : emmy_core.so
142- path : artifact
143-
144- - name : Upload so
145- 146- with :
147- upload_url : ${{ steps.create_release.outputs.upload_url }}
148- asset_path : artifact/emmy_core.so
149- asset_name : emmy_core.so
150- asset_content_type : application/gzip
151-
152- - name : Download dylib
153- 154- with :
155- name : emmy_core.dylib
156- path : artifact
157-
158- - name : Upload dylib
159- 71+ - name : Download
72+ uses : actions/download-artifact@v2
73+ - name : Display structure of downloaded files
74+ run : ls -R
75+ - name : Release
76+ uses : softprops/action-gh-release@v1
77+ if : startsWith(github.ref, 'refs/tags/')
16078 with :
161- upload_url : ${{ steps.create_release.outputs.upload_url }}
162- asset_path : artifact/emmy_core.dylib
163- asset_name : emmy_core.dylib
164- asset_content_type : application/gzip
79+ name : EmmyLuaDebugger
80+ draft : false
81+ generate_release_notes : true
82+ files : |
83+ win32-x64.zip
84+ win32-x86.zip
85+ darwin-arm64.zip
86+ darwin-x64.zip
87+ linux-x64.zip
88+ token : ${{ secrets.RELEASE }}
0 commit comments