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: steps:
- name: Checkout repository - name: Checkout repository
uses: https://git.wish.moe/YourWishes/checkout@main uses: https://git.wish.moe/YourWishes/checkout@main
- name: Install dependencies - name: Install Docker
run: | uses: https://git.wish.moe/YourWishes/setup-docker-action@releases/v4
apt-get update - name: Run tests in Docker
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 run: ./scripts/test-linux-docker.sh
- name: Run tests # - name: Install dependencies
run: ./scripts/test-linux.sh # 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: # build-linux:
runs-on: ubuntu-latest # runs-on: ubuntu-latest
steps: # steps:
- name: Checkout repository # - name: Checkout repository
uses: https://git.wish.moe/YourWishes/checkout@main # uses: https://git.wish.moe/YourWishes/checkout@main
- name: Install dependencies # - name: Install dependencies
run: | # run: |
apt-get update # 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 # 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 # - name: Build Linux
run: ./scripts/build-linux.sh # run: ./scripts/build-linux.sh
- name: Upload Linux binary # - name: Upload Linux binary
uses: https://git.wish.moe/YourWishes/upload-artifact@v3/node20 # uses: https://git.wish.moe/YourWishes/upload-artifact@v3/node20
with: # with:
name: dusk-linux # name: dusk-linux
path: build-linux/Dusk # path: build-linux/Dusk
if-no-files-found: error # if-no-files-found: error
# build-psp: # build-psp:
# runs-on: ubuntu-latest # runs-on: ubuntu-latest

View File

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