test: re-add build-linux for testing

This commit is contained in:
Robbie Morgan 2026-03-12 15:04:46 +00:00 committed by GitHub
parent d65d5467fe
commit ab28d0468f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

55
.github/workflows/build-linux.yml vendored Normal file
View file

@ -0,0 +1,55 @@
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 ninja 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@v4
- 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 . -GNinja -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -DWINDOWS_SDK_PATH=$(pwd)/my_msvc -DCMAKE_TOOLCHAIN_FILE=../cmake/LinuxCrosscompile.cmake
ninja
EOF
- name: Upload Release + Debug Artifacts
uses: actions/upload-artifact@v4
with:
name: MinecraftClient-${{ matrix.configuration }}
path: build