Skip to content

Update Discord Link in Readme #240

Update Discord Link in Readme

Update Discord Link in Readme #240

name: Linux Build
on: [workflow_dispatch, pull_request, push]
jobs:
linux_build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, ubuntu-22.04]
runs-on: ${{ matrix.os }}
permissions:
packages: write
contents: write
steps:
- name: Set up Git
uses: actions/checkout@v4
- name: Install Uuid
run: |
if ! pkg-config --exists uuid; then
echo "libuuid is not installed. Installing it..."
sudo apt-get update
sudo apt-get install -y uuid-dev
else
echo "libuuid is already installed."
fi
- name: Ensure Correct VCPKG Baseline
uses: lukka/run-vcpkg@main
with:
vcpkgGitURL: "https://github.com/microsoft/vcpkg.git"
vcpkgGitCommitId: ${{ steps.vcpkg-step.outputs.vcpkgGitCommitId }}
- name: Setup Premake
run: |
git clone https://github.com/premake/premake-core
cd premake-core
make -f Bootstrap.mak linux
cd ..
./premake-core/bin/release/premake5 gmake2
- name: Install Vcpkg Libraries
run: |
vcpkg install
- name: Compile Release 64
run: |
make -j $(nproc) config=release_64
cp Black-Tek-Server BlackTek-Server-Release
- name: Compile Debug 64
run: |
make -j $(nproc) config=debug_64
cp Black-Tek-Server BlackTek-Server-Debug
rm Black-Tek-Server
- name: Cleanup Vcpkg_installed
uses: JesseTG/[email protected]
with:
path: ${{ github.workspace }}/vcpkg_installed
- name: Cleanup Intermediaries
uses: JesseTG/[email protected]
with:
path: ${{ github.workspace }}/build
- name: Cleanup More VCPKG stuff
uses: JesseTG/[email protected]
with:
path: ${{ github.workspace }}/vcpkg
- name: Cleanup Premake-Core
uses: JesseTG/[email protected]
with:
path: ${{ github.workspace }}/premake-core
- name: Prepare Compressed Assets
run: |
echo "Commit SHA: ${{ github.sha }}" > version.info
zip -r BlackTek-Server-${{ github.sha }}.zip ${{ github.workspace }}
zip -r BlackTek-Server.zip version.info
- name: Upload Assets for Edge Build
if: (github.event_name == 'push') && (matrix.os == 'ubuntu-24.04') && !startsWith(github.ref, 'refs/tags/') || (github.event_name == 'pull_request' && (matrix.os == 'ubuntu-24.04') && github.event.pull_request.merged == true)
uses: softprops/action-gh-release@v2
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
prerelease: true
tag_name: Linux-Edge-Build
name: BlackTek Server Edge Build
body: |
This is an automated Linux Edge build for commit ${{ github.sha }}
OS-BuildType: ${{ matrix.buildtype }}
Build date: ${{ github.event.head_commit.timestamp }}
files: BlackTek-Server-${{ github.sha }}.zip