mirror of
https://github.com/HarbourMasters/SpaghettiKart
synced 2026-05-29 08:43:14 -04:00
Fix 32 bit (#697)
* try x86 * ci: uniform build-linux-release-docker and their x86 * Update main.yml * fix animation Co-Authored-By: Alessio Tosto <rinnegatamante@gmail.com> * add explanation * add windows 32 in release * Update windows-compile.yml * fix windows compilation * fix win32 windows * Update libultraship --------- Co-authored-by: Alessio Tosto <rinnegatamante@gmail.com>
This commit is contained in:
@@ -138,4 +138,75 @@ jobs:
|
||||
- name: Move cache
|
||||
run: |
|
||||
rm -rf /tmp/.buildx-cache
|
||||
mv /tmp/.buildx-cache-new /tmp/.buildx-cache || true
|
||||
mv /tmp/.buildx-cache-new /tmp/.buildx-cache || true
|
||||
|
||||
build-docker-x86:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
config: [Release]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
fetch-tags: true
|
||||
submodules: recursive
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
with:
|
||||
platforms: linux/386
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Cache Docker layers
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: /tmp/.buildx-cache-x86
|
||||
key: ${{ runner.os }}-buildx-x86-${{ hashFiles('script/Dockerfile.x86', 'vcpkg.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-buildx-x86-
|
||||
|
||||
- name: Build Docker image for x86
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: ./script/Dockerfile.x86
|
||||
platforms: linux/386
|
||||
push: false
|
||||
load: true
|
||||
tags: spaghettikart-x86:latest
|
||||
cache-from: type=local,src=/tmp/.buildx-cache-x86
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache-x86-new,mode=max
|
||||
|
||||
- name: Build project in Docker (x86)
|
||||
run: |
|
||||
docker run --rm --platform linux/386 \
|
||||
-v "${{ github.workspace }}:/project" \
|
||||
spaghettikart-x86:latest \
|
||||
bash -c "
|
||||
cmake -B build-x86 -G Ninja \
|
||||
-DCMAKE_BUILD_TYPE=${{ matrix.config }} && \
|
||||
cmake --build build-x86 --parallel
|
||||
"
|
||||
|
||||
- name: Fix permissions
|
||||
run: sudo chown -R $(id -u):$(id -g) build-x86
|
||||
|
||||
- name: Create Package
|
||||
run: |
|
||||
mkdir -p spaghetti-x86-${{ matrix.config }}
|
||||
mv build-x86/Spaghettify spaghetti-x86-${{ matrix.config }}/
|
||||
|
||||
- name: Publish packaged artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: spaghetti-linux-x86-${{ matrix.config }}
|
||||
path: spaghetti-x86-${{ matrix.config }}
|
||||
retention-days: 7
|
||||
|
||||
- name: Move cache
|
||||
run: |
|
||||
rm -rf /tmp/.buildx-cache-x86
|
||||
mv /tmp/.buildx-cache-x86-new /tmp/.buildx-cache-x86 || true
|
||||
@@ -50,6 +50,7 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
config: [Release, Debug]
|
||||
arch: [x64, Win32]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
@@ -58,7 +59,7 @@ jobs:
|
||||
submodules: recursive
|
||||
- name: Build
|
||||
run: |
|
||||
cmake -S . -B "build/x64" -G "Visual Studio 17 2022" -T v143 -A x64 -DCMAKE_BUILD_TYPE=${{ matrix.config }}
|
||||
cmake -S . -B "build/x64" -G "Visual Studio 17 2022" -T v143 -A ${{ matrix.arch }} -DCMAKE_BUILD_TYPE=${{ matrix.config }}
|
||||
cmake --build ./build/x64 --config ${{ matrix.config }} --parallel 10
|
||||
- name: Download spaghetti.o2r
|
||||
uses: actions/download-artifact@v4
|
||||
@@ -79,7 +80,7 @@ jobs:
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: spaghetti-windows
|
||||
path: spaghetti-${{ matrix.config }}
|
||||
path: spaghetti-${{ matrix.arch }}-${{ matrix.config }}
|
||||
|
||||
build-macos-arm64:
|
||||
needs: generate-port-o2r
|
||||
@@ -461,6 +462,90 @@ jobs:
|
||||
rm -rf /tmp/.buildx-cache
|
||||
mv /tmp/.buildx-cache-new /tmp/.buildx-cache || true
|
||||
|
||||
build-linux-x86-docker:
|
||||
needs: generate-port-o2r
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
config: [Release]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
fetch-tags: true
|
||||
submodules: recursive
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Cache Docker layers
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: /tmp/.buildx-cache-x86
|
||||
key: ${{ runner.os }}-buildx-x86-${{ hashFiles('script/Dockerfile.x86', 'vcpkg.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-buildx-x86-
|
||||
|
||||
- name: Build Docker image for x86
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: ./script/Dockerfile.x86
|
||||
platforms: linux/386
|
||||
push: false
|
||||
load: true
|
||||
tags: spaghettikart-x86:latest
|
||||
cache-from: type=local,src=/tmp/.buildx-cache-x86
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache-x86-new,mode=max
|
||||
|
||||
- name: Build project in Docker (x86)
|
||||
run: |
|
||||
docker run --rm --platform linux/386 \
|
||||
-v "${{ github.workspace }}:/project" \
|
||||
spaghettikart-x86:latest \
|
||||
bash -c "
|
||||
cmake -B build-x86 -G Ninja \
|
||||
-DCMAKE_BUILD_TYPE=${{ matrix.config }} && \
|
||||
cmake --build build-x86 --parallel
|
||||
"
|
||||
|
||||
- name: Fix permissions
|
||||
run: sudo chown -R $(id -u):$(id -g) build-x86
|
||||
|
||||
- name: Download spaghetti.o2r
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: spaghetti.o2r
|
||||
path: ./build-x86
|
||||
|
||||
- name: Generate AppImage
|
||||
run: |
|
||||
docker run --rm --platform linux/386 \
|
||||
-v "${{ github.workspace }}:/project" \
|
||||
spaghettikart-x86:latest \
|
||||
bash -c "
|
||||
cd /project/build-x86 && \
|
||||
cpack -G External || true
|
||||
"
|
||||
|
||||
- name: Create Package
|
||||
run: |
|
||||
mkdir -p spaghetti-x86-${{ matrix.config }}
|
||||
wget -O gamecontrollerdb.txt https://raw.githubusercontent.com/mdqinc/SDL_GameControllerDB/master/gamecontrollerdb.txt
|
||||
mv gamecontrollerdb.txt spaghetti-x86-${{ matrix.config }}/
|
||||
cp build-x86/*.appimage spaghetti-x86-${{ matrix.config }}/spaghetti.appimage 2>/dev/null || true
|
||||
|
||||
- name: Publish packaged artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: spaghetti-linux-x86
|
||||
path: spaghetti-x86-${{ matrix.config }}
|
||||
|
||||
- name: Move cache
|
||||
run: |
|
||||
rm -rf /tmp/.buildx-cache-x86
|
||||
mv /tmp/.buildx-cache-x86-new /tmp/.buildx-cache-x86 || true
|
||||
|
||||
build-switch:
|
||||
needs: generate-port-o2r
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
@@ -10,6 +10,7 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
config: [Release, Debug]
|
||||
arch: [x64, Win32]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
@@ -18,11 +19,11 @@ jobs:
|
||||
submodules: recursive
|
||||
- name: Build
|
||||
run: |
|
||||
cmake -S . -B "build/x64" -G "Visual Studio 17 2022" -T v143 -A x64 -DCMAKE_BUILD_TYPE=${{ matrix.config }}
|
||||
cmake -S . -B "build/x64" -G "Visual Studio 17 2022" -T v143 -A ${{ matrix.arch }} -DCMAKE_BUILD_TYPE=${{ matrix.config }}
|
||||
cmake --build ./build/x64 --config ${{ matrix.config }} --parallel 10
|
||||
- name: Upload build
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: spaghetti-windows-${{ matrix.config }}
|
||||
name: spaghetti-windows-${{ matrix.arch }}-${{ matrix.config }}
|
||||
path: ./build/x64/${{ matrix.config }}
|
||||
retention-days: 1
|
||||
|
||||
Reference in New Issue
Block a user