From ed354ee9b19df76dd6b174d79a2435b783e8c5de Mon Sep 17 00:00:00 2001 From: Krzysztof Jakubowski Date: Sat, 25 Nov 2023 18:47:43 +0100 Subject: [PATCH] Added linux tests action --- .github/workflows/test.yml | 53 ++++++++++++++++++++++++++------------ 1 file changed, 36 insertions(+), 17 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 42e3fa13..e39a58d3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -48,29 +48,48 @@ jobs: shell: cmd run: '"%MSBUILD_PATH%\MSBuild.exe" windows\libfwk.vcxproj /p:Platform=x64 /p:Configuration=Debug' - - name: Build test_window + - name: Build tests shell: cmd - run: '"%MSBUILD_PATH%\MSBuild.exe" windows\test_window.vcxproj /p:Platform=x64 /p:Configuration=Debug' + run: | + "%MSBUILD_PATH%\MSBuild.exe" windows\test_window.vcxproj /p:Platform=x64 /p:Configuration=Debug + "%MSBUILD_PATH%\MSBuild.exe" windows\test_stuff.vcxproj /p:Platform=x64 /p:Configuration=Debug + "%MSBUILD_PATH%\MSBuild.exe" windows\test_geom.vcxproj /p:Platform=x64 /p:Configuration=Debug + "%MSBUILD_PATH%\MSBuild.exe" windows\test_math.vcxproj /p:Platform=x64 /p:Configuration=Debug - - name: Build test_stuff + - name: Run tests shell: cmd - run: '"%MSBUILD_PATH%\MSBuild.exe" windows\test_stuff.vcxproj /p:Platform=x64 /p:Configuration=Debug' + run: | + build\test_stuff-x64-Debug\test_stuff.exe + build\test_math-x64-Debug\test_math.exe - - name: Build test_geom - shell: cmd - run: '"%MSBUILD_PATH%\MSBuild.exe" windows\test_geom.vcxproj /p:Platform=x64 /p:Configuration=Debug' - - name: Build test_math - shell: cmd - run: '"%MSBUILD_PATH%\MSBuild.exe" windows\test_math.vcxproj /p:Platform=x64 /p:Configuration=Debug' + test-linux: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v2 - - name: Test stuff - shell: cmd - run: '"build\test_stuff-x64-Debug\test_stuff.exe"' + - name: Install Dependencies + run: | + git submodule update --init + wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - + sudo apt-get install libsdl2-dev libfreetype-dev libvorbis-dev libogg-dev libopenal-dev libdwarf-dev libelf-dev + wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo tee /etc/apt/trusted.gpg.d/lunarg.asc + sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-jammy.list http://packages.lunarg.com/vulkan/lunarg-vulkan-jammy.list + sudo apt update + sudo apt install libvulkan-dev shaderc glslang-dev vulkan-headers - - name: Test math - shell: cmd - run: '"build\test_math-x64-Debug\test_math.exe"' + - name: Build libfwk + run: | + make -j8 lib + + - name: Build tests & tools + run: | + make -j8 tests tools + + - name: Run tests + run: | + tests/stuff + tests/math check-formatting: @@ -88,4 +107,4 @@ jobs: - name: Check C++ formatting run: | - python tools/format.py -c \ No newline at end of file + python tools/format.py -c \ No newline at end of file