summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorcoco875 <59367621+coco875@users.noreply.github.com>2026-05-03 02:13:30 +0200
committerGitHub <noreply@github.com>2026-05-03 02:13:30 +0200
commite2cf6ecbb44489fd4cebdc6cdf95430338c5df15 (patch)
treeb81109d3c7d10e3bdd16a75ff47aafb51b28f3de /.github
parent40d4f12580b02fe440709f06cf6f4cbbfd48de2e (diff)
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>
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/linux-compile.yml73
-rw-r--r--.github/workflows/main.yml89
-rw-r--r--.github/workflows/windows-compile.yml5
3 files changed, 162 insertions, 5 deletions
diff --git a/.github/workflows/linux-compile.yml b/.github/workflows/linux-compile.yml
index d4f06784e..4cc3e8279 100644
--- a/.github/workflows/linux-compile.yml
+++ b/.github/workflows/linux-compile.yml
@@ -138,4 +138,75 @@ jobs:
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
- mv /tmp/.buildx-cache-new /tmp/.buildx-cache || true \ No newline at end of file
+ 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 \ No newline at end of file
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index bea0b4e06..da76a4cb6 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -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
diff --git a/.github/workflows/windows-compile.yml b/.github/workflows/windows-compile.yml
index 42258ec9c..519259aef 100644
--- a/.github/workflows/windows-compile.yml
+++ b/.github/workflows/windows-compile.yml
@@ -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