From d67ef029419d2adcc663bf968ab0c4ddb4122645 Mon Sep 17 00:00:00 2001 From: Dominic Masters Date: Tue, 10 Mar 2026 15:15:31 -0500 Subject: [PATCH] Use script system --- .gitea/workflows/build.yml | 16 ++++------------ scripts/build-linux.sh | 3 +++ scripts/test-linux.sh | 4 ++++ 3 files changed, 11 insertions(+), 12 deletions(-) create mode 100755 scripts/build-linux.sh create mode 100755 scripts/test-linux.sh diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 9ee049b..743fab6 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -18,12 +18,8 @@ jobs: 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 + run: ./scripts/test-linux.sh build-linux: runs-on: ubuntu-latest @@ -34,17 +30,13 @@ jobs: 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: Build Linux + run: ./scripts/build-linux.sh - name: Upload Linux binary uses: https://git.wish.moe/YourWishes/upload-artifact@v3/node20 with: name: dusk-linux - path: build/Dusk + path: build-linux/Dusk if-no-files-found: error # build-psp: diff --git a/scripts/build-linux.sh b/scripts/build-linux.sh new file mode 100755 index 0000000..f4affb2 --- /dev/null +++ b/scripts/build-linux.sh @@ -0,0 +1,3 @@ +#!/bin/bash +cmake -S . -B build-linux -DDUSK_BUILD_TESTS=ON -DDUSK_TARGET_SYSTEM=linux +cmake --build build-linux -- -j$(nproc) \ No newline at end of file diff --git a/scripts/test-linux.sh b/scripts/test-linux.sh new file mode 100755 index 0000000..977eb1a --- /dev/null +++ b/scripts/test-linux.sh @@ -0,0 +1,4 @@ +#!/bin/bash +cmake -S . -B build-tests -DDUSK_BUILD_TESTS=ON -DDUSK_TARGET_SYSTEM=linux +cmake --build build-tests -- -j$(nproc) +ctest --output-on-failure --test-dir build-tests \ No newline at end of file