mirror of
https://github.com/Vita3K/unicorn.git
synced 2024-11-26 23:00:37 +00:00
Add CI
This commit is contained in:
parent
ac3e4e764f
commit
4b52942ba9
56
.github/workflows/build.yml
vendored
Normal file
56
.github/workflows/build.yml
vendored
Normal file
@ -0,0 +1,56 @@
|
||||
name: C/C++ CI
|
||||
|
||||
on: [push]
|
||||
jobs:
|
||||
build:
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Build
|
||||
run: c:\msys64\usr\bin\env MSYSTEM=MINGW64 c:\msys64\usr\bin\bash -lc "UNICORN_DEBUG=no UNICORN_ARCHS=arm ./make.sh cross-win64"
|
||||
env:
|
||||
HOME: ${{ runner.workspace }}/unicorn
|
||||
CI: ON
|
||||
- name: Copy files
|
||||
run: |
|
||||
mkdir unicorn
|
||||
mkdir unicorn\lib
|
||||
Xcopy /E /I include unicorn\include
|
||||
copy unicorn.lib unicorn\lib\unicorn.lib
|
||||
copy unicorn.dll unicorn\lib\unicorn.dll
|
||||
copy c:\msys64\mingw64\bin\libgcc_s_seh-1.dll unicorn\lib\libgcc_s_seh-1.dll
|
||||
copy c:\msys64\mingw64\bin\libwinpthread-1.dll unicorn\lib\libwinpthread-1.dll
|
||||
env:
|
||||
HOME: ${{ runner.workspace }}/unicorn
|
||||
CI: ON
|
||||
- name: Zip Folder
|
||||
run: 7z a vita3k-unicorn.zip unicorn
|
||||
env:
|
||||
HOME: ${{ runner.workspace }}/unicorn
|
||||
- uses: benjlevesque/short-sha@v1.1
|
||||
id: short-sha
|
||||
with:
|
||||
length: 8
|
||||
- name: Create Release
|
||||
id: create_release
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
|
||||
with:
|
||||
tag_name: ${{ steps.short-sha.outputs.sha }}
|
||||
release_name: Unicorn ${{ steps.short-sha.outputs.sha }}
|
||||
body: |
|
||||
Automated build for windows
|
||||
draft: false
|
||||
prerelease: false
|
||||
- name: Upload Release Asset
|
||||
id: upload-release-asset
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
|
||||
asset_path: ./vita3k-unicorn.zip
|
||||
asset_name: vita3k-unicorn.zip
|
||||
asset_content_type: application/zip
|
2
Makefile
2
Makefile
@ -141,8 +141,10 @@ MACOS_UNIVERSAL ?= no
|
||||
|
||||
ifeq ($(UNICORN_DEBUG),yes)
|
||||
CFLAGS += -g
|
||||
UNICORN_CFLAGS += -g
|
||||
else
|
||||
CFLAGS += -O3
|
||||
UNICORN_CFLAGS += -O3
|
||||
UNICORN_QEMU_FLAGS += --disable-debug-info
|
||||
endif
|
||||
|
||||
|
1
make.sh
1
make.sh
@ -128,6 +128,7 @@ case "$1" in
|
||||
"macos-universal-no" ) MACOS_UNIVERSAL=no ${MAKE};;
|
||||
"cross-win32" ) build_cross i686-w64-mingw32;;
|
||||
"cross-win64" ) build_cross x86_64-w64-mingw32;;
|
||||
"build_cross" ) build_cross $2;;
|
||||
"cross-android_arm" ) CROSS=arm-linux-androideabi ${MAKE};;
|
||||
"cross-android_arm64" ) CROSS=aarch64-linux-android ${MAKE};;
|
||||
"linux32" ) build_linux32;;
|
||||
|
@ -32,12 +32,18 @@ HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\15.0
|
||||
)
|
||||
:break
|
||||
|
||||
if "%appdir%"=="" (
|
||||
echo Could not find an installed visual studio version. Abandoning windows static lib export operation.
|
||||
) else (
|
||||
:: Add the Visual Studio binaries to our path and run the linker
|
||||
call "%appdir%..\..\VC\vcvarsall.bat" %1
|
||||
|
||||
if not "%CI%" == "" (
|
||||
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" %1
|
||||
call lib /machine:%1 /def:unicorn.def
|
||||
) else (
|
||||
if "%appdir%"=="" (
|
||||
cho Could not find an installed visual studio version. Abandoning windows static lib export operation.
|
||||
) else (
|
||||
:: Add the Visual Studio binaries to our path and run the linker
|
||||
call "%appdir%..\..\VC\vcvarsall.bat" %1
|
||||
call lib /machine:%1 /def:unicorn.def
|
||||
)
|
||||
)
|
||||
|
||||
exit /b 0
|
||||
|
Loading…
Reference in New Issue
Block a user