From efaa3f6eeaf6ac0cf40fa02eebcdf68d80c93aed Mon Sep 17 00:00:00 2001 From: Dominic Masters Date: Fri, 6 Feb 2026 16:29:12 -0600 Subject: [PATCH] Fix building on PSP --- .gitea/workflows/build.yml | 132 +++++++++++++++++++------------------ src/dusk.h | 2 +- 2 files changed, 69 insertions(+), 65 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 22300eb..3a13b06 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -9,6 +9,74 @@ on: - main jobs: + + run-tests: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v5 + - name: Install dependencies + run: | + apt-get update + apt-get install -y build-essential cmake python3 python3-pip python3-polib python3-pil libsdl2-dev libgl1-mesa-dev libzip-dev python3-dotenv python3-pyqt5 python3-opengl liblua5.3-dev + - name: Configure CMake for tests + run: cmake -S . -B build -DDUSK_BUILD_TESTS=ON -DDUSK_TARGET_SYSTEM=linux + - name: Build tests + run: cmake --build build -- -j$(nproc) + - name: Run tests + run: ctest --output-on-failure --test-dir build + + build-linux: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v5 + - name: Install dependencies + run: | + apt-get update + apt-get install -y build-essential cmake python3 python3-pip python3-polib python3-pil libsdl2-dev libgl1-mesa-dev libzip-dev python3-dotenv python3-pyqt5 python3-opengl liblua5.3-dev + - name: Configure CMake + run: cmake -S . -B build -DDUSK_TARGET_SYSTEM=linux + - name: Build + run: cmake --build build -- -j$(nproc) + - name: List build output + run: ls -lh build + - name: Fix Dusk binary name + run: | + mv build/DuskCore build/Dusk + - name: Upload Linux binary + uses: actions/upload-artifact@v3 + with: + name: dusk-linux + path: build/Dusk + if-no-files-found: error + + build-psp: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v5 + - name: Install dependencies + run: | + apt-get update + apt-get install -y build-essential cmake python3 python3-pip python3-polib python3-pil libsdl2-dev libgl1-mesa-dev libzip-dev python3-dotenv python3-pyqt5 python3-opengl liblua5.3-dev + - name: Configure CMake + run: cmake -S . -B build -DDUSK_TARGET_SYSTEM=psp -DENABLE_TESTS=OFF + - name: Build + run: cmake --build build -- -j$(nproc) + - name: Move EBOOT.PBP to Dusk subfolder + run: | + mkdir -p build/gitea/Dusk + mv build/EBOOT.PBP build/gitea/Dusk/EBOOT.PBP + - name: List build output + run: ls -lh build/gitea/Dusk + - name: Upload PSP binary + uses: actions/upload-artifact@v3 + with: + name: dusk-psp + path: build/gitea/ + if-no-files-found: error + build-dolphin: runs-on: ubuntu-latest steps: @@ -89,68 +157,4 @@ jobs: with: name: dusk-wii path: build/gitea/Wii - if-no-files-found: error - - run-tests: - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v5 - - name: Install dependencies - run: | - apt-get update - apt-get install -y build-essential cmake python3 python3-pip python3-polib python3-pil libsdl2-dev libgl1-mesa-dev libzip-dev python3-dotenv python3-pyqt5 python3-opengl liblua5.3-dev - - name: Configure CMake for tests - run: cmake -S . -B build -DDUSK_BUILD_TESTS=ON -DDUSK_TARGET_SYSTEM=linux - - name: Build tests - run: cmake --build build -- -j$(nproc) - - name: Run tests - run: ctest --output-on-failure --test-dir build - - build-linux: - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v5 - - name: Install dependencies - run: | - apt-get update - apt-get install -y build-essential cmake python3 python3-pip python3-polib python3-pil libsdl2-dev libgl1-mesa-dev libzip-dev python3-dotenv python3-pyqt5 python3-opengl liblua5.3-dev - - name: Configure CMake - run: cmake -S . -B build -DDUSK_TARGET_SYSTEM=linux - - name: Build - run: cmake --build build -- -j$(nproc) - - name: List build output - run: ls -lh build - - name: Upload Linux binary - uses: actions/upload-artifact@v3 - with: - name: dusk-linux - path: build/Dusk - if-no-files-found: error - - build-psp: - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v5 - - name: Install dependencies - run: | - apt-get update - apt-get install -y build-essential cmake python3 python3-pip python3-polib python3-pil libsdl2-dev libgl1-mesa-dev libzip-dev python3-dotenv python3-pyqt5 python3-opengl liblua5.3-dev - - name: Configure CMake - run: cmake -S . -B build -DDUSK_TARGET_SYSTEM=psp -DENABLE_TESTS=OFF - - name: Build - run: cmake --build build -- -j$(nproc) - - name: Move EBOOT.PBP to Dusk subfolder - run: | - mkdir -p build/gitea/Dusk - mv build/EBOOT.PBP build/gitea/Dusk/EBOOT.PBP - - name: List build output - run: ls -lh build/gitea/Dusk - - name: Upload PSP binary - uses: actions/upload-artifact@v3 - with: - name: dusk-psp - path: build/gitea/ if-no-files-found: error \ No newline at end of file diff --git a/src/dusk.h b/src/dusk.h index d6e80b3..d430aa7 100644 --- a/src/dusk.h +++ b/src/dusk.h @@ -35,7 +35,7 @@ #include #include #else - #include + #define le32toh(x) (x) #endif typedef bool bool_t;