Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

basic API test suite #1974

Merged
merged 57 commits into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
19df804
0.1
ellraiser Oct 4, 2023
08467cb
Update readme.md
ellraiser Oct 4, 2023
e03b2db
0.2
ellraiser Oct 5, 2023
1692f7f
Test MacOS Testing workflow
ellraiser Oct 5, 2023
db600b7
output to src
ellraiser Oct 5, 2023
fae3b6f
fix xml format
ellraiser Oct 5, 2023
6c29497
skipped format
ellraiser Oct 5, 2023
a513320
prevent empty <failure/> tag
ellraiser Oct 6, 2023
ac5f97e
Update main.yml
ellraiser Oct 6, 2023
04293d3
use love-test-report action
ellraiser Oct 6, 2023
6a0ff06
fixed test.filesystem.openFile
ellraiser Oct 6, 2023
5ac5438
try lovec instead
ellraiser Oct 6, 2023
a620910
add renderer alts.
ellraiser Oct 6, 2023
8f10ba9
check flag change
ellraiser Oct 6, 2023
e1948f6
added all graphics 'state' tests
ellraiser Oct 8, 2023
c7c8f25
added objects module placeholders
ellraiser Oct 8, 2023
add23a4
fix mesa install
ellraiser Oct 8, 2023
f477b80
finish graphics module + HTML image comparison
ellraiser Oct 9, 2023
09d0ace
finished a bunch of modules
ellraiser Oct 14, 2023
658c75b
latest from love-test
ellraiser Nov 14, 2023
1371266
update ci run
ellraiser Nov 14, 2023
a9a5507
add missing linux lib req
ellraiser Nov 14, 2023
75c2667
Update main.yml
ellraiser Nov 14, 2023
ef39fb3
Merge branch '12.0-development' into 12.0-testsuite
ellraiser Nov 14, 2023
c682ba1
use 12.0dev workflow
ellraiser Nov 14, 2023
d23c396
split workflow
ellraiser Nov 14, 2023
58fa1c8
test the test workflow
ellraiser Nov 14, 2023
0d338b0
workflow changes #1
ellraiser Nov 14, 2023
5155a96
fix upload paths
ellraiser Nov 14, 2023
38ef55e
add arch+compat to win test output
ellraiser Nov 14, 2023
46d4567
invalid lib linux
ellraiser Nov 14, 2023
b1fe623
turn off vulkan tests for now
ellraiser Nov 14, 2023
333169e
fix alsoft path
ellraiser Nov 14, 2023
c89e793
alsoft relative to checkout
ellraiser Nov 14, 2023
357b005
fix test.audio.Source
ellraiser Nov 14, 2023
af4c50a
skip test.audio.RecordingDevice on CI
ellraiser Nov 15, 2023
ad44eb4
more graphics class tests
ellraiser Nov 15, 2023
038b36a
add renderer to report md
ellraiser Nov 15, 2023
0ef417f
fix test.graphics.Canvas
ellraiser Nov 15, 2023
1323bb1
ignore setMipmapFilter on opengl ES
ellraiser Nov 15, 2023
8124804
more graphics + some physics tests
ellraiser Nov 16, 2023
adc6fbe
added test.physics.Joint
ellraiser Nov 16, 2023
37961f9
floor joint pos
ellraiser Nov 16, 2023
d130758
add graphics pixel comparison tests
ellraiser Nov 16, 2023
a8c714b
change to exact rgba comparison for visual tests
ellraiser Nov 17, 2023
89119c5
add runner exceptions to readme
ellraiser Nov 17, 2023
51c2aa8
specify write for action permission
ellraiser Nov 17, 2023
a977ad2
revert
ellraiser Nov 17, 2023
eba8ccb
Update main.yml
ellraiser Nov 17, 2023
1ef183c
Update main.yml
ellraiser Nov 17, 2023
825e466
finished obj tests
ellraiser Nov 20, 2023
63d303a
make workflow fail if tests fail
ellraiser Nov 22, 2023
f846d4a
review changes
ellraiser Nov 23, 2023
c5fb1a7
Merge remote-tracking branch 'upstream/12.0-development' into 12.0-te…
ellraiser Nov 23, 2023
d6c7796
fix some ranges for runners
ellraiser Nov 23, 2023
cc4b618
Update physics.lua
ellraiser Nov 23, 2023
13c5f7a
Merge remote-tracking branch 'upstream/12.0-development' into 12.0-te…
ellraiser Nov 28, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
234 changes: 232 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@ on: [push, pull_request]

jobs:
linux-os:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
permissions:
checks: write
pull-requests: write
env:
ALSOFT_CONF: love2d-${{ github.sha }}/testing/resources/alsoft.conf
DISPLAY: :99
steps:
- name: Update APT
run: sudo apt-get update
Expand All @@ -16,7 +22,8 @@ jobs:
libgl1-mesa-dev libdbus-1-dev libudev-dev libgles2-mesa-dev \
libegl1-mesa-dev libibus-1.0-dev fcitx-libs-dev libsamplerate0-dev \
libsndio-dev libwayland-dev libxkbcommon-dev libdrm-dev libgbm-dev \
libcurl4-openssl-dev
libcurl4-openssl-dev libfuse2 wmctrl openbox mesa-vulkan-drivers \
libvulkan1 vulkan-tools vulkan-validationlayers
- name: Checkout love-appimage-source
uses: actions/checkout@v3
with:
Expand All @@ -40,6 +47,83 @@ jobs:
run: make LOVE_BRANCH=${{ github.sha }}
- name: Print LuaJIT branch
run: git -C LuaJIT-v2.1 branch -v
# start xvfb for test running
- name: Start xvfb and openbox
run: |
echo "Starting XVFB on $DISPLAY"
Xvfb $DISPLAY -screen 0, 360x240x24 &
echo "XVFBPID=$!" >> $GITHUB_ENV
# wait for xvfb to startup (3s is the same amount xvfb-run waits by default)
sleep 3
openbox &
echo "OPENBOXPID=$!" >> $GITHUB_ENV
# linux opengl tests
- name: Run Test Suite (opengl)
run: |
chmod a+x love-${{ github.sha }}.AppImage
./love-${{ github.sha }}.AppImage love2d-${{ github.sha }}/testing/main.lua --runAllTests --isRunner
- name: Love Test Report (opengl)
id: report1
uses: ellraiser/love-test-report@main
with:
name: Love Testsuite Linux
title: test-report-linux-opengl
path: love2d-${{ github.sha }}/testing/output/lovetest_runAllTests.md
token: ${{ secrets.GITHUB_TOKEN }}
- name: Zip Test Output (opengl)
run: |
7z a -tzip test-output-linux-opengl.zip love2d-${{ github.sha }}/testing/output/
- name: Artifact Test Output (opengl)
uses: actions/upload-artifact@v3
with:
name: test-output-linux-opengl-${{ steps.report1.outputs.conclusion }}
path: test-output-linux-opengl.zip
# linux opengles tests
- name: Run Test Suite (opengles)
run: |
export LOVE_GRAPHICS_USE_OPENGLES=1
./love-${{ github.sha }}.AppImage love2d-${{ github.sha }}/testing/main.lua --runAllTests --isRunner
- name: Love Test Report (opengles)
uses: ellraiser/love-test-report@main
id: report2
with:
name: Love Testsuite Linux
title: test-report-linux-opengles
path: love2d-${{ github.sha }}/testing/output/lovetest_runAllTests.md
token: ${{ secrets.GITHUB_TOKEN }}
- name: Zip Test Output (opengles)
run: |
7z a -tzip test-output-linux-opengles.zip love2d-${{ github.sha }}/testing/output/
- name: Artifact Test Output (opengles)
uses: actions/upload-artifact@v3
with:
name: test-output-linux-opengles-${{ steps.report2.outputs.conclusion }}
path: test-output-linux-opengles.zip
# # linux vulkan tests
# - name: Run Test Suite (vulkan)
# run: |
# export LOVE_GRAPHICS_DEBUG=1
# ./love-${{ github.sha }}.AppImage love2d-${{ github.sha }}/testing/main.lua --runAllTests --isRunner --renderers vulkan
# - name: Love Test Report (vulkan)
# uses: ellraiser/love-test-report@main
# with:
# name: Love Testsuite Linux
# title: test-report-linux-vulkan
# path: love2d-${{ github.sha }}/testing/output/lovetest_runAllTests.md
# - name: Zip Test Output (vulkan)
# run: |
# 7z a -tzip test-output-linux-vulkan.zip love2d-${{ github.sha }}/testing/output/
# - name: Artifact Test Output (vulkan)
# uses: actions/upload-artifact@v3
# with:
# name: test-output-linux-vulkan
# path: test-output-linux-vulkan.zip
- name: Stop xvfb and openbox
# should always stop xvfb and openbox even if other steps failed
if: always()
run: |
kill $XVFBPID
kill $OPENBOXPID
- name: Artifact
uses: actions/upload-artifact@v3
with:
Expand All @@ -50,8 +134,21 @@ jobs:
with:
name: love-x86_64-AppImage-debug
path: love-${{ github.sha }}.AppImage-debug.tar.gz
- name: Check Tests Passing
if: steps.report1.outputs.conclusion == 'failure' || steps.report2.outputs.conclusion == 'failure'
run: |
echo "${{ steps.report1.outputs.failed }} opengl tests failed"
echo "${{ steps.report2.outputs.failed }} opengles tests failed"
exit 1
windows-os:
runs-on: windows-latest
permissions:
checks: write
pull-requests: write
env:
ALSOFT_CONF: megasource/libs/love/testing/resources/alsoft.conf
VK_ICD_FILENAMES: ${{ github.workspace }}\mesa\x64\lvp_icd.x86_64.json
VULKAN_SDK: C:/VulkanSDK/1.3.231.1
strategy:
matrix:
platform: [Win32, x64, ARM64]
Expand Down Expand Up @@ -206,8 +303,115 @@ jobs:
with:
name: love-windows-${{ steps.vars.outputs.arch }}${{ steps.vars.outputs.compatname }}-dbg
path: pdb/Release/*.pdb
# install mesa for graphic tests
- name: Install Mesa
if: steps.vars.outputs.arch != 'ARM64' && steps.vars.outputs.compatname != '-compat'
run: |
curl -L --output mesa.7z --url https://github.com/pal1000/mesa-dist-win/releases/download/23.2.1/mesa3d-23.2.1-release-msvc.7z
7z x mesa.7z -o*
powershell.exe mesa\systemwidedeploy.cmd 1
# build love to use for the tests
- name: Build Test Exe
if: steps.vars.outputs.arch != 'ARM64' && steps.vars.outputs.compatname != '-compat'
run: cmake --build build --config Release --target install
# windows opengl tests
- name: Run Tests (opengl)
if: steps.vars.outputs.arch != 'ARM64' && steps.vars.outputs.compatname != '-compat'
run: |
echo 'check dir'
ls
powershell.exe ./install/lovec.exe ./megasource/libs/love/testing/main.lua --runAllTests --isRunner
- name: Love Test Report (opengl)
id: report1
if: steps.vars.outputs.arch != 'ARM64' && steps.vars.outputs.compatname != '-compat'
uses: ellraiser/love-test-report@main
with:
name: Love Testsuite Windows ${{ steps.vars.outputs.arch }} ${{ steps.vars.outputs.compatname }} (opengl)
title: test-report-windows-${{ steps.vars.outputs.arch }}${{ steps.vars.outputs.compatname }}-opengl
path: megasource/libs/love/testing/output/lovetest_runAllTests.md
token: ${{ secrets.GITHUB_TOKEN }}
- name: Zip Test Output (opengl)
if: steps.vars.outputs.arch != 'ARM64' && steps.vars.outputs.compatname != '-compat'
run: |
7z a -tzip test-output-windows-${{ steps.vars.outputs.arch }}${{ steps.vars.outputs.compatname }}-opengl.zip megasource/libs/love/testing/output/
- name: Artifact Test Output (opengl)
if: steps.vars.outputs.arch != 'ARM64' && steps.vars.outputs.compatname != '-compat'
uses: actions/upload-artifact@v3
with:
name: test-output-windows-${{ steps.vars.outputs.arch }}-opengl-${{ steps.report1.outputs.conclusion }}
path: test-output-windows-${{ steps.vars.outputs.arch }}-opengl.zip
# windows opengles tests
- name: Run Tests (opengles)
if: steps.vars.outputs.arch != 'ARM64' && steps.vars.outputs.compatname != '-compat'
run: |
$ENV:LOVE_GRAPHICS_USE_OPENGLES=1
powershell.exe ./install/lovec.exe ./megasource/libs/love/testing/main.lua --runAllTests --isRunner
- name: Love Test Report (opengles)
id: report2
if: steps.vars.outputs.arch != 'ARM64' && steps.vars.outputs.compatname != '-compat'
uses: ellraiser/love-test-report@main
with:
name: Love Testsuite Windows ${{ steps.vars.outputs.arch }} ${{ steps.vars.outputs.compatname }} (opengles)
title: test-report-windows-${{ steps.vars.outputs.arch }}${{ steps.vars.outputs.compatname }}-opengles
path: megasource/libs/love/testing/output/lovetest_runAllTests.md
token: ${{ secrets.GITHUB_TOKEN }}
- name: Zip Test Output (opengles)
if: steps.vars.outputs.arch != 'ARM64' && steps.vars.outputs.compatname != '-compat'
run: |
7z a -tzip test-output-windows-${{ steps.vars.outputs.arch }}${{ steps.vars.outputs.compatname }}-opengles.zip megasource/libs/love/testing/output/
- name: Artifact Test Output (opengles)
if: steps.vars.outputs.arch != 'ARM64' && steps.vars.outputs.compatname != '-compat'
uses: actions/upload-artifact@v3
with:
name: test-output-windows-${{ steps.vars.outputs.arch }}-opengles-${{ steps.report2.outputs.conclusion }}
path: test-output-windows-${{ steps.vars.outputs.arch }}-opengles.zip
- name: Check Tests Passing
if: steps.report1.outputs.conclusion == 'failure' || steps.report2.outputs.conclusion == 'failure'
run: |
echo "${{ steps.report1.outputs.failed }} opengl tests failed"
echo "${{ steps.report2.outputs.failed }} opengles tests failed"
exit 1
# # install vulkan
# - name: Install Vulkan
# if: steps.vars.outputs.arch != 'ARM64'
# run: |
# curl -L --show-error --output VulkanSDK.exe https://sdk.lunarg.com/sdk/download/1.3.231.1/windows/VulkanSDK-1.3.231.1-Installer.exe
# ./VulkanSDK.exe --root C:/VulkanSDK/1.3.231.1 --accept-licenses --default-answer --confirm-command install com.lunarg.vulkan.core com.lunarg.vulkan.vma
# curl -L --show-error --output vulkan-runtime.zip https://sdk.lunarg.com/sdk/download/1.3.231.1/windows/vulkan-runtime-components.zip
# 7z e vulkan-runtime.zip -o"C:/VulkanSDK/1.3.231.1/runtime/x64" */x64
# copy "C:/VulkanSDK/1.3.231.1/runtime/x64/vulkan-1.dll" "mesa/x64"
# copy "C:/VulkanSDK/1.3.231.1/runtime/x64/vulkan-1.dll" "C:/Windows/System32"
# copy "C:/VulkanSDK/1.3.231.1/runtime/x64/vulkan-1.dll" "love-12.0-win64/love-12.0-win64"
# reg add HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\Vulkan\Drivers /v "${{ github.workspace }}\mesa\x64\lvp_icd.x86_64.json" /t REG_DWORD /d 0
# powershell.exe C:/VulkanSDK/1.3.231.1/runtime/x64/vulkaninfo.exe --summary
# # windows vulkan tests
# - name: Run Tests (vulkan)
# if: steps.vars.outputs.arch != 'ARM64'
# run: |
# $ENV:LOVE_GRAPHICS_DEBUG=1
# powershell.exe ./install/lovec.exe ./megasource/libs/love/testing/main.lua --runAllTests --isRunner --renderers vulkan
# - name: Love Test Report (vulkan)
# if: steps.vars.outputs.arch != 'ARM64'
# uses: ellraiser/love-test-report@main
# with:
# name: Love Testsuite Windows ${{ steps.vars.outputs.arch }} ${{ steps.vars.outputs.compatname }} (vulkan)
# title: test-report-windows-${{ steps.vars.outputs.arch }}${{ steps.vars.outputs.compatname }}-vulkan
# path: megasource/libs/love/testing/output/lovetest_runAllTests.md
# - name: Zip Test Output (vulkan)
# if: steps.vars.outputs.arch != 'ARM64'
# run: |
# 7z a -tzip test-output-windows-${{ steps.vars.outputs.arch }}${{ steps.vars.outputs.compatname }}-vulkan.zip megasource/libs/love/testing/output/
# - name: Artifact Test Output (vulkan)
# if: steps.vars.outputs.arch != 'ARM64'
# uses: actions/upload-artifact@v3
# with:
# name: test-output-windows-${{ steps.vars.outputs.arch }}${{ steps.vars.outputs.compatname }}-vulkan
# path: test-output-windows-${{ steps.vars.outputs.arch }}${{ steps.vars.outputs.compatname }}-vulkan.zip
macOS:
runs-on: macos-latest
permissions:
checks: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -234,6 +438,32 @@ jobs:
with:
name: love-macos
path: love-macos.zip
# macos opengl tests (metal not supported on runners)
- name: Run Test Suite
run: |
ls
love-macos/love.app/Contents/MacOS/love ./testing/main.lua --runAllTests --isRunner
- name: Love Test Report
id: report1
uses: ellraiser/love-test-report@main
with:
name: Love Testsuite MacOS
title: test-report-macos
path: testing/output/lovetest_runAllTests.md
token: ${{ secrets.GITHUB_TOKEN }}
- name: Zip Test Output
run: |
7z a -tzip test-output-macos-opengl.zip ./testing/output/
- name: Artifact Test Output
uses: actions/upload-artifact@v3
with:
name: test-output-macos-opengl-${{ steps.report1.outputs.conclusion }}
path: test-output-macos-opengl.zip
- name: Check Tests Passing
if: steps.report1.outputs.conclusion == 'failure'
run: |
echo "${{ steps.report1.outputs.failed }} opengl tests failed"
exit 1
iOS-Simulator:
runs-on: macos-latest
steps:
Expand Down
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,8 @@ stamp-h1
/src/love
/src/tags
.vs/
.vscode/
.vscode/
/testing/output/*.xml
/testing/output/*.html
/testing/output/*.md
/testing/output/actual/*.png
Loading