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.yml
gentlegiantJGC 8a0ef86d18 Renamed the file names
The old names were inconsistent and a bit confusing.
This should make the naming more standard and use the same convention as the python build tools
2021-08-26 14:12:25 +01:00

72 lines
1.9 KiB
YAML

name: Build
on:
release:
types: [published]
jobs:
linux:
runs-on: ubuntu-latest
container: centos:7
steps:
- name: Install dependenicies
run: |
yum -y install file gcc gcc-c++ make unzip
- name: Install CMake
uses: lukka/get-cmake@latest
- name: Checkout zlib
uses: actions/checkout@v2
with:
repository: madler/zlib
path: zlib
- name: Build zlib
run: |
cd zlib
cmake -GNinja -DCMAKE_POSITION_INDEPENDENT_CODE=ON
cmake --build . --config Release
cd ..
- name: Checkout leveldb
uses: actions/checkout@v2
with:
path: leveldb-mcpe
- name: Build leveldb
run: |
cmake -DZLIB_INCLUDE_DIR="zlib" -DZLIB_LIBRARY="/__w/leveldb-mcpe/leveldb-mcpe/zlib/libz.a" -GNinja leveldb-mcpe
cmake --build . --config Release
strip libleveldb.so
file libleveldb.so
ldd libleveldb.so
- 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: libleveldb.so
asset_name: leveldb_mcpe_linux_x86_64.so
asset_content_type: so
macos:
runs-on: macos-10.15
steps:
- uses: actions/checkout@v2
- name: Build
run: |
export MACOSX_DEPLOYMENT_TARGET=10.9
make
- 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: out-shared/libleveldb.dylib
asset_name: leveldb_mcpe_macosx_10_9_x86_64.dylib
asset_content_type: dylib