mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-08-20 09:57:09 +00:00
55 lines
1.6 KiB
YAML
55 lines
1.6 KiB
YAML
name: Build (Linux)
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
container:
|
|
image: archlinux:latest
|
|
|
|
steps:
|
|
- name: Install base dependencies
|
|
run: |
|
|
pacman -Syu --noconfirm archlinux-keyring
|
|
pacman -Syu --noconfirm base-devel sudo git cmake extra-cmake-modules python wine msitools ca-certificates libwbclient 7zip
|
|
|
|
- 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
|
|
export XDG_RUNTIME_DIR=/tmp/runtime-builder
|
|
mkdir -p $XDG_RUNTIME_DIR
|
|
chmod 700 $XDG_RUNTIME_DIR
|
|
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/opt/msvc
|
|
./msvc-wine/install.sh $(pwd)/my_msvc/opt/msvc
|
|
export PATH=$(pwd)/my_msvc/opt/msvc/bin/x64:$PATH
|
|
msbuild MinecraftConsoles.sln /p:Configuration=Release /p:Platform="Windows64"
|
|
ls -l
|
|
EOF
|
|
|
|
- name: Upload artifact/s
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: DLL
|
|
path: |
|
|
LCEWindows64.zip
|
|
./x64/Release/Minecraft.Client.exe
|
|
./x64/Release/Minecraft.Client.pdb
|