1
0
mirror of https://github.com/Amulet-Team/leveldb-mcpe.git synced 2024-11-21 21:16:19 +00:00
leveldb-amulet/.github/workflows/build_windows.yml
gentlegiantJGC 45aa1a8d7c
Bumped visual studio to the new version (#8)
The old version no longer works
2022-08-23 10:50:26 +01:00

91 lines
2.4 KiB
YAML

name: Build
on:
release:
types: [published]
jobs:
deploy-win32:
runs-on: windows-latest
steps:
- name: Checkout zlib
uses: actions/checkout@v2
with:
repository: madler/zlib
path: zlib
- name: Build zlib
shell: cmd
run: |
cd zlib
cmake -G "Visual Studio 17 2022" -A Win32 -T v143
cmake --build . --config Release
cd ..
- name: Checkout leveldb
uses: actions/checkout@v2
with:
path: leveldb-mcpe
- name: Build leveldb
shell: cmd
run: |
mkdir build_leveldb
cd build_leveldb
cmake -DZLIB_INCLUDE_DIR="..\zlib" -DZLIB_LIBRARY="..\zlib\Release\zlibstatic.lib" -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=TRUE -G "Visual Studio 17 2022" -A Win32 -T v143 ..\leveldb-mcpe
cmake --build . --config Release
cd ..
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./build_leveldb/Release/leveldb.dll
asset_name: leveldb_mcpe_win32.dll
asset_content_type: dll
deploy-win64:
runs-on: windows-latest
steps:
- name: Checkout zlib
uses: actions/checkout@v2
with:
repository: madler/zlib
path: zlib
- name: Build zlib
shell: cmd
run: |
cd zlib
cmake -G "Visual Studio 17 2022" -A x64 -T v143
cmake --build . --config Release
cd ..
- name: Checkout leveldb
uses: actions/checkout@v2
with:
path: leveldb-mcpe
- name: Build leveldb
shell: cmd
run: |
mkdir build_leveldb
cd build_leveldb
cmake -DZLIB_INCLUDE_DIR="..\zlib" -DZLIB_LIBRARY="..\zlib\Release\zlibstatic.lib" -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=TRUE -G "Visual Studio 17 2022" -A x64 -T v143 ..\leveldb-mcpe
cmake --build . --config Release
cd ..
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./build_leveldb/Release/leveldb.dll
asset_name: leveldb_mcpe_win_amd64.dll
asset_content_type: dll