diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 73f8d34..85e8c76 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,16 +9,37 @@ jobs: runs-on: ubuntu-latest container: centos:7 steps: - - uses: actions/checkout@v2 - name: Install dependenicies run: | - yum -y install file gcc gcc-c++ make zlib-devel - - name: Build + 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: | - make - strip out-shared/libleveldb.so.1.20 - file out-shared/libleveldb.so.1.20 - ldd out-shared/libleveldb.so.1.20 + 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 @@ -26,9 +47,10 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ github.event.release.upload_url }} - asset_path: out-shared/libleveldb.so + asset_path: libleveldb.so asset_name: libleveldb.so asset_content_type: so + macos: runs-on: macos-10.15 steps: diff --git a/.github/workflows/build2.yml b/.github/workflows/build2.yml deleted file mode 100644 index 7fb501d..0000000 --- a/.github/workflows/build2.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: Build -on: push -jobs: - linux-cmake: - 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 - uses: actions/upload-artifact@v2 - with: - path: libleveldb.so - name: libleveldb-static.so