build: reworked build and package to simplify process
build: reworked build and package to simplify process build: windows dll is now compiled by clang, msvc build added to extras package fix: clear all the implicit conversions in the code (also fixed some bugs) fix: crash on never xash3d-fwgs engine fix: fixed bad bot behaviors on aarch64 fix: crash on some maps due to missing previous node fix: finally removed memset(this) within bot creatin
This commit is contained in:
parent
ae4e12c48c
commit
53df621dfc
35 changed files with 1004 additions and 949 deletions
147
.github/workflows/build.yml
vendored
147
.github/workflows/build.yml
vendored
|
|
@ -12,117 +12,84 @@ on:
|
|||
types: [published]
|
||||
|
||||
jobs:
|
||||
unix:
|
||||
bot-build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: j4sdk/x86-buildtools:lunar
|
||||
options: --hostname github-actions
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- name: linux-x86
|
||||
bin: yapb.so
|
||||
opts: CXX=gcc-11 CXX_LD=gold meson setup build
|
||||
|
||||
- name: macos-x86
|
||||
bin: yapb.dylib
|
||||
opts: meson setup build --cross-file=x86-darwin
|
||||
|
||||
name: ${{ matrix.name }}
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
container: j4sdk/x86-buildtools:latest
|
||||
|
||||
arch: ['linux-x86', 'linux-x86-gcc', 'linux-aarch64', 'darwin-x86', 'windows-x86', 'windows-x86-gcc']
|
||||
fail-fast: false
|
||||
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: true
|
||||
|
||||
- name: Configure Build
|
||||
- name: Configure meson
|
||||
shell: bash
|
||||
run: |
|
||||
${{ matrix.opts }}
|
||||
|
||||
- name: Compile Source
|
||||
if [[ ${{matrix.arch}} == linux-x86 ]]; then
|
||||
CXX=clang CXX_LD=lld meson setup ${{matrix.arch}}
|
||||
elif [[ ${{matrix.arch}} == linux-x86-gcc ]]; then
|
||||
CXX=gcc CXX_LD=gold meson setup ${{matrix.arch}}
|
||||
else
|
||||
meson setup ${{matrix.arch}}/ --cross-file ${{matrix.arch}}
|
||||
fi
|
||||
- name: Build sources
|
||||
shell: bash
|
||||
run: |
|
||||
meson compile -v -C build
|
||||
|
||||
- name: Upload Artifacts
|
||||
meson compile -C ${{matrix.arch}}
|
||||
echo "artifcat=${{matrix.arch}}/`ls ${{matrix.arch}}/ | egrep '^yapb.(so|dylib|dll)$' | head -1`" >> $GITHUB_ENV
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ${{ matrix.bin }}
|
||||
path: build/${{ matrix.bin }}
|
||||
name: ${{matrix.arch}}
|
||||
path: ${{env.artifcat}}
|
||||
|
||||
bot-msvc:
|
||||
env:
|
||||
name: windows-x86-msvc
|
||||
|
||||
windows:
|
||||
name: windows-x86
|
||||
runs-on: windows-2022
|
||||
name: bot-build (windows-x86-msvc)
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: true
|
||||
|
||||
- name: Setup MSBuild
|
||||
- name: Setup msbuild
|
||||
uses: ilammy/msvc-dev-cmd@v1
|
||||
with:
|
||||
arch: amd64_x86
|
||||
|
||||
- name: Setup Meson
|
||||
- name: Install meson
|
||||
run: |
|
||||
python -m pip install --upgrade meson ninja
|
||||
|
||||
- name: Configure Build
|
||||
- name: Configure meson
|
||||
run: |
|
||||
meson setup build
|
||||
|
||||
- name: Compile Source
|
||||
meson setup ${{env.name}}
|
||||
- name: Build sources
|
||||
run: |
|
||||
meson compile -v -C build
|
||||
|
||||
- name: Upload Artifacts
|
||||
meson compile -C ${{env.name}}
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: yapb.dll
|
||||
path: build/yapb.dll
|
||||
name: ${{env.name}}
|
||||
path: ${{env.name}}/yapb.dll
|
||||
|
||||
linux-arm64:
|
||||
name: linux-arm64
|
||||
|
||||
runs-on: self-hosted
|
||||
continue-on-error: true
|
||||
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: true
|
||||
|
||||
- name: Configure Build
|
||||
run: |
|
||||
CXX=clang-12 CXX_LD=lld-12 meson setup build
|
||||
|
||||
- name: Compile Source
|
||||
run: |
|
||||
meson compile -v -C build
|
||||
|
||||
- name: Rename Binary
|
||||
run: |
|
||||
mv build/yapb.so build/yapb.arm64.so
|
||||
|
||||
- name: Upload Artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: yapb.arm64.so
|
||||
path: build/yapb.arm64.so
|
||||
|
||||
publish:
|
||||
bot-release:
|
||||
if: |
|
||||
github.event_name == 'release' &&
|
||||
github.event.action == 'published'
|
||||
|
||||
name: publish
|
||||
name: bot-release
|
||||
runs-on: ubuntu-latest
|
||||
needs: [unix, windows, linux-arm64]
|
||||
needs: [bot-build, bot-msvc]
|
||||
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
|
|
@ -130,38 +97,32 @@ jobs:
|
|||
with:
|
||||
fetch-depth: 0
|
||||
submodules: true
|
||||
|
||||
- name: Install Signing Tools
|
||||
- name: Install signing tools
|
||||
run: |
|
||||
sudo apt-get update && sudo apt-get upgrade -y
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y --no-install-recommends osslsigncode
|
||||
|
||||
- name: Get Artifacts
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
path: artifacts
|
||||
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.x'
|
||||
|
||||
- name: Setup Meson
|
||||
- name: Configure meson
|
||||
run: |
|
||||
python -m pip install --upgrade meson ninja urllib3
|
||||
|
||||
- name: Create Packages
|
||||
python -m pip install --upgrade meson ninja requests
|
||||
- name: Create packages
|
||||
run: |
|
||||
meson setup dist
|
||||
ninja -C dist package
|
||||
env:
|
||||
CS_CERTIFICATE: ${{ secrets.CS_CERTIFICATE }}
|
||||
CS_CERTIFICATE_PASSWORD: ${{ secrets.CS_CERTIFICATE_PASSWORD }}
|
||||
|
||||
- name: Publish Release
|
||||
CS_CERTIFICATE: ${{secrets.CS_CERTIFICATE}}
|
||||
CS_CERTIFICATE_PASSWORD: ${{secrets.CS_CERTIFICATE_PASSWORD}}
|
||||
- name: Publish release
|
||||
uses: softprops/action-gh-release@v1
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
with:
|
||||
files: pkg/*
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.API_TOKEN }}
|
||||
GITHUB_TOKEN: ${{secrets.API_TOKEN}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue