Test Docker user
Some checks failed
Build Dusk / run-tests (push) Failing after 25s

This commit is contained in:
2026-03-10 15:34:53 -05:00
parent d67ef02941
commit a2b38d3b83
5 changed files with 56 additions and 26 deletions

View File

@@ -14,30 +14,34 @@ jobs:
steps:
- name: Checkout repository
uses: https://git.wish.moe/YourWishes/checkout@main
- 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: Run tests
run: ./scripts/test-linux.sh
- name: Install Docker
uses: https://git.wish.moe/YourWishes/setup-docker-action@releases/v4
- name: Run tests in Docker
run: ./scripts/test-linux-docker.sh
# - 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: Run tests
# run: ./scripts/test-linux.sh
build-linux:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: https://git.wish.moe/YourWishes/checkout@main
- 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: 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-linux/Dusk
if-no-files-found: error
# build-linux:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout repository
# uses: https://git.wish.moe/YourWishes/checkout@main
# - 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: 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-linux/Dusk
# if-no-files-found: error
# build-psp:
# runs-on: ubuntu-latest

View File

@@ -10,7 +10,7 @@ set(CMAKE_C_STANDARD 11)
set(CMAKE_C_STANDARD_REQUIRED ON)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules)
option(ENABLE_TESTS "Enable tests" OFF)
option(DUSK_BUILD_TESTS "Enable tests" OFF)
# Prep cache
set(DUSK_CACHE_TARGET "dusk-target")
@@ -55,7 +55,7 @@ project(${DUSK_LIBRARY_TARGET_NAME}
# Binary Executable
add_executable(${DUSK_BINARY_TARGET_NAME} ${DUSK_SOURCES_DIR}/dusk/null.c)
if(ENABLE_TESTS)
if(DUSK_BUILD_TESTS)
# MainLibrary
add_library(${DUSK_LIBRARY_TARGET_NAME} STATIC)
@@ -94,7 +94,7 @@ target_include_directories(${DUSK_LIBRARY_TARGET_NAME} PUBLIC
)
# Handle tests
if(ENABLE_TESTS)
if(DUSK_BUILD_TESTS)
enable_testing()
add_subdirectory(test)
endif()

20
docker/linux/Dockerfile Normal file
View File

@@ -0,0 +1,20 @@
FROM ubuntu:latest
WORKDIR /workdir
RUN apt-get update
RUN 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 \
xz-utils \
git
VOLUME ["/workdir"]

3
scripts/build-linux-docker.sh Executable file
View File

@@ -0,0 +1,3 @@
#!/bin/bash
docker build -t dusk-linux -f docker/linux/Dockerfile .
docker run --rm -v $(pwd):/workdir dusk-linux /bin/bash -c "./scripts/build-linux.sh"

3
scripts/test-linux-docker.sh Executable file
View File

@@ -0,0 +1,3 @@
#!/bin/bash
docker build -t dusk-linux -f docker/linux/Dockerfile .
docker run --rm -v $(pwd):/workdir dusk-linux /bin/bash -c "./scripts/test-linux.sh"