Skip to content

Commit 66b64de

Browse files
authored
Merge pull request #36 from CppCXY/master
修改git action脚本
2 parents 2f5ea67 + c5709aa commit 66b64de

Some content is hidden

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

60 files changed

+111
-226
lines changed

.github/workflows/build.yml

Lines changed: 39 additions & 115 deletions
Original file line numberDiff line numberDiff line change
@@ -5,160 +5,84 @@ on: [push]
55
jobs:
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
2020
uses: actions/[email protected]
2121
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
3333
uses: actions/[email protected]
3434
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-
uses: actions/[email protected]
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-
uses: actions/[email protected]
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-
uses: actions/[email protected]
112-
with:
113-
upload_url: ${{ steps.create_release.outputs.upload_url }}
114-
asset_path: [email protected]
115-
asset_name: [email protected]
116-
asset_content_type: application/tar+gzip
117-
118-
- name: Download Windows-x64
119-
uses: actions/[email protected]
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-
uses: actions/[email protected]
132-
with:
133-
upload_url: ${{ steps.create_release.outputs.upload_url }}
134-
asset_path: [email protected]
135-
asset_name: [email protected]
136-
asset_content_type: application/tar+gzip
137-
138-
- name: Download so
139-
uses: actions/[email protected]
140-
with:
141-
name: emmy_core.so
142-
path: artifact
143-
144-
- name: Upload so
145-
uses: actions/[email protected]
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-
uses: actions/[email protected]
154-
with:
155-
name: emmy_core.dylib
156-
path: artifact
157-
158-
- name: Upload dylib
159-
uses: actions/[email protected]
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 }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
.vscode
22
build
33
.vs
4+
out

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ if (MSVC)
1515
foreach(CompilerFlag ${CompilerFlags})
1616
string(REPLACE "/MD" "/MT" ${CompilerFlag} "${${CompilerFlag}}")
1717
endforeach()
18+
1819
# add_definitions(-DUNICODE -D_UNICODE)
1920
elseif(CMAKE_SYSTEM_NAME MATCHES "Linux")
2021
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")

emmy_debugger/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@ target_sources(emmy_debugger PUBLIC
5757

5858
target_compile_definitions(emmy_debugger PUBLIC -DRAPIDJSON_HAS_STDSTRING)
5959

60+
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
61+
target_compile_options(emmy_debugger PUBLIC /utf-8)
62+
endif ()
63+
64+
6065
if(NOT WIN32)
6166
target_compile_options(emmy_debugger PUBLIC -fPIC)
6267
endif()

emmy_debugger/src/api/lua_api.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*
1+
/*
22
* Copyright (c) 2019. tangzx([email protected])
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");

emmy_debugger/src/api/lua_api_loader.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*
1+
/*
22
* Copyright (c) 2019. tangzx([email protected])
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");

emmy_debugger/src/api/lua_state.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "emmy_debugger/api/lua_state.h"
1+
#include "emmy_debugger/api/lua_state.h"
22
#include "emmy_debugger/lua_version.h"
33

44
#ifdef EMMY_USE_LUA_SOURCE

emmy_debugger/src/api/lua_state/lua_state_51.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "emmy_debugger/api/lua_state.h"
1+
#include "emmy_debugger/api/lua_state.h"
22
#ifdef EMMY_USE_LUA_SOURCE
33
#include "lstate.h"
44
#else

emmy_debugger/src/api/lua_state/lua_state_52.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "emmy_debugger/api/lua_state.h"
1+
#include "emmy_debugger/api/lua_state.h"
22

33
#ifdef EMMY_USE_LUA_SOURCE
44
#include "lstate.h"

emmy_debugger/src/api/lua_state/lua_state_53.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "emmy_debugger/api/lua_state.h"
1+
#include "emmy_debugger/api/lua_state.h"
22
#ifdef EMMY_USE_LUA_SOURCE
33
#include "lstate.h"
44
#else

0 commit comments

Comments
 (0)