mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-08-20 09:57:09 +00:00
commit
fa1730696a
56
.github/workflows/build-linux.yml
vendored
Normal file
56
.github/workflows/build-linux.yml
vendored
Normal file
|
|
@ -0,0 +1,56 @@
|
||||||
|
name: Build Minecraft Legacy Console Edition (Linux)
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
container:
|
||||||
|
image: archlinux:latest
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
configuration: [Release, Debug]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Install base dependencies
|
||||||
|
run: |
|
||||||
|
pacman -Syu --noconfirm archlinux-keyring
|
||||||
|
pacman -Syu --noconfirm base-devel sudo git clang lld make cmake extra-cmake-modules python wine msitools ca-certificates libwbclient
|
||||||
|
|
||||||
|
- name: Create build user
|
||||||
|
run: |
|
||||||
|
useradd -m builder
|
||||||
|
echo "builder ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
|
||||||
|
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
|
- name: Fix permissions
|
||||||
|
run: chown -R builder:builder .
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
sudo -u builder sh <<'EOF'
|
||||||
|
set -e
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
export WINDOWS_SDK_PATH="$PWD/my_msvc"
|
||||||
|
export WINE=$(command -v wine64 || command -v wine || false)
|
||||||
|
$WINE wineboot
|
||||||
|
git clone https://github.com/mstorsjo/msvc-wine
|
||||||
|
./msvc-wine/vsdownload.py --accept-license --dest $(pwd)/my_msvc
|
||||||
|
./msvc-wine/install.sh $(pwd)/my_msvc
|
||||||
|
export PATH=$(pwd)/my_msvc/bin/x64:$PATH
|
||||||
|
cmake .. -B . -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -DWINDOWS_SDK_PATH=$(pwd)/my_msvc -DCMAKE_TOOLCHAIN_FILE=../cmake/LinuxCrosscompile.cmake
|
||||||
|
make -j$(nproc)
|
||||||
|
EOF
|
||||||
|
|
||||||
|
- name: Upload Release + Debug Artifacts
|
||||||
|
uses: actions/upload-artifact@v6
|
||||||
|
with:
|
||||||
|
name: MinecraftClient-${{ matrix.configuration }}
|
||||||
|
path: |
|
||||||
|
build/MinecraftClient.exe
|
||||||
Loading…
Reference in a new issue