Merge branch 'master' of github.com:EmmyLua/EmmyLuaDebugger #123
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Emmy Debugger Core | |
on: [push] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- { os: windows-latest, target: windows, platform: win32-x64} | |
- { os: windows-latest, target: windows, platform: win32-x86, cmake_arch: "-A Win32"} | |
- { os: ubuntu-latest, target: linux, platform: linux-x64} | |
- { os: macos-latest, target: darwin, platform: darwin-x64} | |
- { os: macos-latest, target: darwin, platform: darwin-arm64} | |
steps: | |
- name: Env | |
# set TAG=DEV if not a tag | |
run: | | |
if [[ ${{ github.ref }} = refs/tags/* ]]; then | |
export TAG=$(echo ${{ github.ref }} | sed -e "s/refs\/tags\///g") | |
else | |
export TAG=DEV | |
fi | |
echo "TAG=$TAG" >> $GITHUB_ENV | |
shell: bash | |
- name: Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16.x | |
- uses: actions/checkout@v3 | |
- name: Build-windows | |
if: startsWith(matrix.os, 'windows') | |
run: | | |
mkdir build | |
cd build | |
cmake .. ${{ matrix.cmake_arch }} -G "Visual Studio 17 2022" -DCMAKE_USER_MAKE_RULES_OVERRIDE="${{ github.workspace }}/cmake/flags_override.cmake" -DEMMY_CORE_VERSION=${{env.TAG}} | |
cmake --build . --config Release | |
cmake --install . --config Release --prefix ${{ github.workspace }}/artifact/ | |
- name: Build-linux | |
if: startsWith(matrix.os, 'ubuntu') | |
run: | | |
mkdir build | |
cd build | |
cmake .. -DCMAKE_BUILD_TYPE=Release -DEMMY_CORE_VERSION=${{env.TAG}} | |
cmake --build . --config Release | |
cmake --install . --config Release --prefix ${{ github.workspace }}/artifact/ | |
- name: Build-macosx | |
if: startsWith(matrix.os, 'macos') | |
run: | | |
mkdir build | |
cd build | |
if [[ "${{ matrix.platform }}" = darwin-arm64 ]]; then | |
cmake .. -DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_BUILD_TYPE=Release -DEMMY_CORE_VERSION=${{env.TAG}} | |
else | |
cmake .. -DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_BUILD_TYPE=Release -DEMMY_CORE_VERSION=${{env.TAG}} | |
fi | |
cmake --build . --config Release | |
cmake --install . --config Release --prefix ${{ github.workspace }}/artifact/ | |
- name: Upload | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ matrix.platform }} | |
path: ${{ github.workspace }}/artifact/bin | |
upload-release: | |
name: Upload Release | |
if: startsWith(github.ref, 'refs/tags/') | |
needs: [build] | |
runs-on: [ubuntu-latest] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- name: Download | |
uses: actions/[email protected] | |
- name: Display structure of downloaded files | |
run: ls -R | |
- name: zip win32-x64 | |
uses: TheDoctor0/zip-release@master | |
with: | |
filename: win32-x64.zip | |
directory: win32-x64 | |
path: | | |
EasyHook.dll | |
emmy_core.dll | |
emmy_hook.dll | |
emmy_tool.exe | |
- name: zip win32-x86 | |
uses: TheDoctor0/zip-release@master | |
with: | |
filename: win32-x86.zip | |
directory: win32-x86 | |
path: | | |
EasyHook.dll | |
emmy_core.dll | |
emmy_hook.dll | |
emmy_tool.exe | |
- name: zip linux-x64 | |
uses: TheDoctor0/zip-release@master | |
with: | |
filename: linux-x64.zip | |
directory: linux-x64 | |
path: emmy_core.so | |
- name: zip darwin-x64 | |
uses: TheDoctor0/zip-release@master | |
with: | |
filename: darwin-x64.zip | |
directory: darwin-x64 | |
path: emmy_core.dylib | |
- name: zip darwin-arm64 | |
uses: TheDoctor0/zip-release@master | |
with: | |
filename: darwin-arm64.zip | |
directory: darwin-arm64 | |
path: emmy_core.dylib | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
name: EmmyLuaDebugger | |
draft: false | |
generate_release_notes: true | |
files: | | |
win32-x64/win32-x64.zip | |
win32-x86/win32-x86.zip | |
darwin-arm64/darwin-arm64.zip | |
darwin-x64/darwin-x64.zip | |
linux-x64/linux-x64.zip | |
token: ${{ secrets.RELEASE }} |