mirror of https://github.com/ppy/SDL3-CS.git
Update build.yml
This commit is contained in:
parent
f6677bde9f
commit
2dd2ef0ef6
|
|
@ -19,59 +19,13 @@ jobs:
|
||||||
- { name: win-x86, os: windows-latest, flags: -A Win32 }
|
- { name: win-x86, os: windows-latest, flags: -A Win32 }
|
||||||
- { name: win-arm64, os: windows-latest, flags: -A ARM64 }
|
- { name: win-arm64, os: windows-latest, flags: -A ARM64 }
|
||||||
- { name: linux-x64, os: ubuntu-20.04, flags: -GNinja, target_apt_arch: ":amd64"}
|
- { name: linux-x64, os: ubuntu-20.04, flags: -GNinja, target_apt_arch: ":amd64"}
|
||||||
- { name: linux-x86, os: ubuntu-20.04, flags: -GNinja, cmake_configure_env: CFLAGS=-m32 CXXFLAGS=-m32, target_apt_arch: ":i386" }
|
- { name: linux-x86, os: ubuntu-20.04, flags: -GNinja, target_apt_arch: ":i386" }
|
||||||
|
- { name: linux-arm64, os: ubuntu-20.04, flags: -GNinja, target_apt_arch: ":arm64", container: arm64v8/ubuntu }
|
||||||
|
- { name: linux-arm, os: ubuntu-20.04, flags: -GNinja, target_apt_arch: ":armhf", container: arm32v7/ubuntu }
|
||||||
- { name: osx-x64, os: macos-latest, flags: -DCMAKE_OSX_ARCHITECTURES="x86_64" -DCMAKE_OSX_DEPLOYMENT_TARGET="10.14" }
|
- { name: osx-x64, os: macos-latest, flags: -DCMAKE_OSX_ARCHITECTURES="x86_64" -DCMAKE_OSX_DEPLOYMENT_TARGET="10.14" }
|
||||||
# NOTE: macOS 11.0 is the first released supported by Apple Silicon.
|
# NOTE: macOS 11.0 is the first released supported by Apple Silicon.
|
||||||
- { name: osx-arm64, os: macos-latest, flags: -DCMAKE_OSX_ARCHITECTURES="arm64" -DCMAKE_OSX_DEPLOYMENT_TARGET="11.0" }
|
- { name: osx-arm64, os: macos-latest, flags: -DCMAKE_OSX_ARCHITECTURES="arm64" -DCMAKE_OSX_DEPLOYMENT_TARGET="11.0" }
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Linux dependencies
|
|
||||||
if: runner.os == 'Linux'
|
|
||||||
run: |
|
|
||||||
if [[ ${{ matrix.platform.target_apt_arch }} == :i386 ]]; then
|
|
||||||
sudo dpkg --add-architecture i386
|
|
||||||
fi
|
|
||||||
|
|
||||||
sudo apt-get update -y -qq
|
|
||||||
|
|
||||||
if [[ ${{ matrix.platform.target_apt_arch }} == :i386 ]]; then
|
|
||||||
# Workaround GitHub's ubuntu-20.04 image issue <https://github.com/actions/virtual-environments/issues/4589>
|
|
||||||
sudo apt-get install -y --allow-downgrades libpcre2-8-0=10.34-7
|
|
||||||
fi
|
|
||||||
|
|
||||||
sudo apt-get install -y \
|
|
||||||
gcc-multilib \
|
|
||||||
g++-multilib \
|
|
||||||
cmake \
|
|
||||||
ninja-build \
|
|
||||||
wayland-scanner++ \
|
|
||||||
wayland-protocols \
|
|
||||||
pkg-config${{ matrix.platform.target_apt_arch }} \
|
|
||||||
libasound2-dev${{ matrix.platform.target_apt_arch }} \
|
|
||||||
libdbus-1-dev${{ matrix.platform.target_apt_arch }} \
|
|
||||||
libegl1-mesa-dev${{ matrix.platform.target_apt_arch }} \
|
|
||||||
libgl1-mesa-dev${{ matrix.platform.target_apt_arch }} \
|
|
||||||
libgles2-mesa-dev${{ matrix.platform.target_apt_arch }} \
|
|
||||||
libglu1-mesa-dev${{ matrix.platform.target_apt_arch }} \
|
|
||||||
libibus-1.0-dev${{ matrix.platform.target_apt_arch }} \
|
|
||||||
libpulse-dev${{ matrix.platform.target_apt_arch }} \
|
|
||||||
libsndio-dev${{ matrix.platform.target_apt_arch }} \
|
|
||||||
libudev-dev${{ matrix.platform.target_apt_arch }} \
|
|
||||||
libwayland-dev${{ matrix.platform.target_apt_arch }} \
|
|
||||||
libx11-dev${{ matrix.platform.target_apt_arch }} \
|
|
||||||
libxcursor-dev${{ matrix.platform.target_apt_arch }} \
|
|
||||||
libxext-dev${{ matrix.platform.target_apt_arch }} \
|
|
||||||
libxi-dev${{ matrix.platform.target_apt_arch }} \
|
|
||||||
libxinerama-dev${{ matrix.platform.target_apt_arch }} \
|
|
||||||
libxkbcommon-dev${{ matrix.platform.target_apt_arch }} \
|
|
||||||
libxrandr-dev${{ matrix.platform.target_apt_arch }} \
|
|
||||||
libxss-dev${{ matrix.platform.target_apt_arch }} \
|
|
||||||
libxt-dev${{ matrix.platform.target_apt_arch }} \
|
|
||||||
libxv-dev${{ matrix.platform.target_apt_arch }} \
|
|
||||||
libxxf86vm-dev${{ matrix.platform.target_apt_arch }} \
|
|
||||||
libdrm-dev${{ matrix.platform.target_apt_arch }} \
|
|
||||||
libgbm-dev${{ matrix.platform.target_apt_arch }} \
|
|
||||||
libpulse-dev${{ matrix.platform.target_apt_arch }}
|
|
||||||
|
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
repository: 'libsdl-org/SDL'
|
repository: 'libsdl-org/SDL'
|
||||||
|
|
@ -81,39 +35,35 @@ jobs:
|
||||||
with:
|
with:
|
||||||
path: 'SDL3-CS'
|
path: 'SDL3-CS'
|
||||||
|
|
||||||
- name: Configure CMake
|
- name: Set up QEMU
|
||||||
run: ${{ matrix.platform.cmake_configure_env }} cmake -B build ${{ matrix.platform.flags }} -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DSDL_SHARED_ENABLED_BY_DEFAULT=ON -DSDL_STATIC_ENABLED_BY_DEFAULT=ON
|
if: contains(matrix.platform.container, 'arm')
|
||||||
|
uses: docker/setup-qemu-action@v3
|
||||||
|
|
||||||
|
- name: Build (Linux ARM)
|
||||||
|
if: contains(matrix.platform.container, 'arm')
|
||||||
|
uses: addnab/docker-run-action@v3
|
||||||
|
with:
|
||||||
|
image: ${{ matrix.platform.container }}
|
||||||
|
options: >
|
||||||
|
-v ${{ github.workspace }}:/workspace
|
||||||
|
-e NAME=${{ matrix.platform.name }}
|
||||||
|
-e TARGET_APT_ARCH=${{ matrix.platform.target_apt_arch }}
|
||||||
|
-e RUNNER_OS=${{ runner.os }}
|
||||||
|
-e FLAGS=${{ matrix.platform.flags }}
|
||||||
|
-e BUILD_TYPE=${{ env.BUILD_TYPE }}
|
||||||
|
run: |
|
||||||
|
cd /workspace
|
||||||
|
./SDL3-CS/build.sh
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cmake --build build/ --config Release
|
if: ${{ !contains(matrix.platform.container, 'arm') }}
|
||||||
|
shell: bash
|
||||||
- name: Install (Windows)
|
env:
|
||||||
run: cmake --install build/ --prefix install_output --config Release
|
NAME: ${{ matrix.platform.name }}
|
||||||
if: runner.os == 'Windows'
|
TARGET_APT_ARCH: ${{ matrix.platform.target_apt_arch }}
|
||||||
|
RUNNER_OS: ${{ runner.os }}
|
||||||
- name: Install
|
FLAGS: ${{ matrix.platform.flags }}
|
||||||
run: sudo cmake --install build/ --prefix install_output --config Release
|
run: ./SDL3-CS/build.sh
|
||||||
if: runner.os != 'Windows'
|
|
||||||
|
|
||||||
- name: Prepare release directory (Windows)
|
|
||||||
run: mkdir -Force SDL3-CS/native/${{ matrix.platform.name }}
|
|
||||||
if: runner.os == 'Windows'
|
|
||||||
|
|
||||||
- name: Prepare release directory
|
|
||||||
run: mkdir -p SDL3-CS/native/${{ matrix.platform.name }}
|
|
||||||
if: runner.os != 'Windows'
|
|
||||||
|
|
||||||
- name: Prepare release (Windows)
|
|
||||||
run: cp install_output/bin/SDL3.dll SDL3-CS/native/${{ matrix.platform.name }}/SDL3.dll
|
|
||||||
if: runner.os == 'Windows'
|
|
||||||
|
|
||||||
- name: Prepare release (Linux)
|
|
||||||
run: cp install_output/lib/libSDL3.so SDL3-CS/native/${{ matrix.platform.name }}/libSDL3.so
|
|
||||||
if: runner.os == 'Linux'
|
|
||||||
|
|
||||||
- name: Prepare release (macOS)
|
|
||||||
run: cp install_output/lib/libSDL3.dylib SDL3-CS/native/${{ matrix.platform.name }}/libSDL3.dylib
|
|
||||||
if: runner.os == 'macOS'
|
|
||||||
|
|
||||||
- name: Create pull request
|
- name: Create pull request
|
||||||
uses: peter-evans/create-pull-request@v6
|
uses: peter-evans/create-pull-request@v6
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue