Create linux.yml

This commit is contained in:
Twig6943 2026-03-06 04:25:20 +03:00 committed by GitHub
parent 0d95980dca
commit 831229e178
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

49
.github/workflows/linux.yml vendored Normal file
View file

@ -0,0 +1,49 @@
name: Build DLL (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
- 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 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
CC=cl CXX=cl cmake . -DCMAKE_BUILD_TYPE=Release -DCMAKE_SYSTEM_NAME=Windows
make
EOF
- name: Upload artifact/s
uses: actions/upload-artifact@v4
with:
name: DLL
path: |
DLL/dinput8.dll