-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7975540
commit 7a49e22
Showing
5 changed files
with
408 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
name: Hop android tests | ||
|
||
on: | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
androidBuild: | ||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: 'recursive' | ||
|
||
- name: pack headers | ||
run: | | ||
mkdir headers | ||
for inc in include/jGL/include/jGL \ | ||
include/jGL/include/*.h \ | ||
include/jGL/include/vendored/freetype/include/* \ | ||
include/jGL/include/vendored/glew/include/GL \ | ||
include/jGL/include/vendored/glfw/include/GLFW \ | ||
include/jGL/include/vendored/glm/glm \ | ||
include/jGL/include/vendored/stduuid/include/uuid.h \ | ||
include/jGL/include/vendored/stduuid/gsl \ | ||
include/jGL/include/vendored/stb_image.h \ | ||
include/jLog \ | ||
include/jThread \ | ||
include/Collision \ | ||
include/Component \ | ||
include/Console \ | ||
include/Debug \ | ||
include/Maths \ | ||
include/Object \ | ||
include/Shader \ | ||
include/System \ | ||
include/Util \ | ||
include/World \ | ||
include/vendored/lua/src/lauxlib.h \ | ||
include/vendored/lua/src/lua.h \ | ||
include/vendored/lua/src/luaconf.h \ | ||
include/vendored/lua/src/lualib.h \ | ||
include/vendored/miniaudio \ | ||
include/vendored/json.hpp \ | ||
include/*.h \ | ||
include/vendored/vorbis/include/vorbis \ | ||
include/vendored/ogg/include/ogg \ | ||
include/vendored/sparsehash; | ||
do cp -r $inc headers; done | ||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update && sudo apt-get install -y build-essential mesa-common-dev libx11-dev libxrandr-dev libgl1-mesa-dev libglu1-mesa-dev libfreetype6-dev libopenal-dev libsndfile1-dev libudev-dev vulkan-tools libvulkan-dev vulkan-validationlayers-dev spirv-tools | ||
wget https://dl.google.com/android/repository/android-ndk-r25c-linux.zip | ||
unzip android-ndk-r25c-linux.zip | ||
wget https://dl.google.com/android/repository/commandlinetools-linux-9477386_latest.zip | ||
unzip commandlinetools-linux-9477386_latest.zip | ||
export ANDROID_SDK_ROOT=~/ | ||
mv cmdline-tools latest | ||
mkdir cmdline-tools | ||
mv latest cmdline-tools | ||
yes | ./cmdline-tools/latest/bin/sdkmanager --licenses | ||
./cmdline-tools/latest/bin/sdkmanager --channel=3 emulator | ||
./cmdline-tools/latest/bin/sdkmanager --install "system-images;android-34;google_apis;x86_64" | ||
./cmdline-tools/latest/bin/sdkmanager "platform-tools" "platforms;android-34" | ||
echo no | ./cmdline-tools/latest/bin/avdmanager create avd --name android34 --package "system-images;android-34;google_apis;x86_64" | ||
- name: build hop | ||
run: | | ||
./build.sh -r --android android-ndk-r25c | ||
- name: buildArtifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: androidbuild | ||
path: androidbuild | ||
|
||
- name: build demo | ||
run: | | ||
cp -r headers/ demo/android/perlinWorld/app/src/main/cpp/include/ | ||
cp -r build/*.a demo/android/perlinWorld/app/src/main/cpp/include/ | ||
cd demo/android/perlinWorld | ||
./gradlew assembleDebug | ||
cd ~/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
name: Hop linux | ||
|
||
on: | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
|
||
linuxBuild: | ||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: 'recursive' | ||
|
||
- name: Install dependencies | ||
run: sudo apt-get update && sudo apt-get install -y build-essential xorg-dev mesa-common-dev libx11-dev libxrandr-dev libgl1-mesa-dev libglu1-mesa-dev libfreetype6-dev libopenal-dev libsndfile1-dev libudev-dev libxinerama-dev libxcursor-dev vulkan-tools libvulkan-dev vulkan-validationlayers-dev spirv-tools | ||
|
||
- name: pack headers | ||
run: | | ||
mkdir headers | ||
for inc in include/jGL/include/jGL \ | ||
include/jGL/include/*.h \ | ||
include/jGL/include/vendored/freetype/include/* \ | ||
include/jGL/include/vendored/glew/include/GL \ | ||
include/jGL/include/vendored/glfw/include/GLFW \ | ||
include/jGL/include/vendored/glm/glm \ | ||
include/jGL/include/vendored/stduuid/include/uuid.h \ | ||
include/jGL/include/vendored/stduuid/gsl \ | ||
include/jGL/include/vendored/stb_image.h \ | ||
include/jLog \ | ||
include/jThread \ | ||
include/Collision \ | ||
include/Component \ | ||
include/Console \ | ||
include/Debug \ | ||
include/Maths \ | ||
include/Object \ | ||
include/Shader \ | ||
include/System \ | ||
include/Util \ | ||
include/World \ | ||
include/vendored/lua/src/lauxlib.h \ | ||
include/vendored/lua/src/lua.h \ | ||
include/vendored/lua/src/luaconf.h \ | ||
include/vendored/lua/src/lualib.h \ | ||
include/vendored/miniaudio \ | ||
include/vendored/json.hpp \ | ||
include/*.h \ | ||
include/vendored/vorbis/include/vorbis \ | ||
include/vendored/ogg/include/ogg \ | ||
include/vendored/sparsehash; | ||
do cp -r $inc headers; done | ||
- name: linux-linux | ||
run: ./build.sh -t -d -r | ||
|
||
- name: Tests | ||
working-directory: ${{github.workspace}}/build | ||
# Execute tests defined by the CMake configuration. | ||
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail | ||
run: | | ||
export DISPLAY=:99 | ||
sudo Xvfb :99 -screen 0 800x600x24 & | ||
sleep 5 | ||
MESA_GL_VERSION_OVERRIDE=3.3 ctest --output-on-failure --verbose | ||
linuxBuildAndRun: | ||
runs-on: ubuntu-22.04 | ||
|
||
strategy: | ||
matrix: | ||
example: [PerlinWorld, SoftBodyTetris, Sprites, MeshEditor] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: 'recursive' | ||
|
||
- name: Install dependencies | ||
run: sudo apt-get update && sudo apt-get install -y build-essential xorg-dev mesa-common-dev libx11-dev libxrandr-dev libgl1-mesa-dev libglu1-mesa-dev libfreetype6-dev libopenal-dev libsndfile1-dev libudev-dev libxinerama-dev libxcursor-dev xvfb x11-apps vulkan-tools libvulkan-dev vulkan-validationlayers-dev spirv-tools | ||
|
||
- name: linux-linux | ||
run: | | ||
./build.sh -t -r -d | ||
- name: run ${{ matrix.example }} | ||
run: | | ||
cd build/${{ matrix.example }} | ||
chmod +x ${{ matrix.example }} | ||
export DISPLAY=:99 | ||
sudo Xvfb :99 -screen 0 800x600x24 & | ||
sleep 5 | ||
MESA_GL_VERSION_OVERRIDE=3.3 ./${{ matrix.example }} & | ||
export PID=$! | ||
sleep 10 | ||
xwd -root -silent | convert xwd:- png:screenshot.png | ||
sleep 5 && kill $PID | ||
- name: upload artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ matrix.example }}.png | ||
path: build/${{ matrix.example }}/screenshot.png | ||
|
||
- name: regression | ||
run: | | ||
mkdir tests/regression/user/include/ | ||
cp build/*.a tests/regression/user/ | ||
cp -r headers/* tests/regression/user/include/ | ||
cd tests/regression/user | ||
mkdir build && cd build | ||
cmake .. && make |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
name: Hop macOS tests | ||
|
||
on: | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
macosBuild: | ||
runs-on: macos-13 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: 'recursive' | ||
|
||
- name: Install dependencies | ||
run: | | ||
wget https://sdk.lunarg.com/sdk/download/latest/mac/vulkan-sdk.zip -O vulkan-sdk.zip | ||
unzip vulkan-sdk.zip | ||
sudo ./InstallVulkan.app/Contents/macOS/InstallVulkan --root ~/vulkan --accept-licenses --default-answer --confirm-command install | ||
ls ~/vulkan | ||
cd ~/vulkan/ | ||
python install_vulkan.py | ||
- name: pack headers | ||
run: | | ||
mkdir headers | ||
for inc in include/jGL/include/jGL \ | ||
include/jGL/include/*.h \ | ||
include/jGL/include/vendored/freetype/include/* \ | ||
include/jGL/include/vendored/glew/include/GL \ | ||
include/jGL/include/vendored/glfw/include/GLFW \ | ||
include/jGL/include/vendored/glm/glm \ | ||
include/jGL/include/vendored/stduuid/include/uuid.h \ | ||
include/jGL/include/vendored/stduuid/gsl \ | ||
include/jGL/include/vendored/stb_image.h \ | ||
include/jLog \ | ||
include/jThread \ | ||
include/Collision \ | ||
include/Component \ | ||
include/Console \ | ||
include/Debug \ | ||
include/Maths \ | ||
include/Object \ | ||
include/Shader \ | ||
include/System \ | ||
include/Util \ | ||
include/World \ | ||
include/vendored/lua/src/lauxlib.h \ | ||
include/vendored/lua/src/lua.h \ | ||
include/vendored/lua/src/luaconf.h \ | ||
include/vendored/lua/src/lualib.h \ | ||
include/vendored/miniaudio \ | ||
include/vendored/json.hpp \ | ||
include/*.h \ | ||
include/vendored/vorbis/include/vorbis \ | ||
include/vendored/ogg/include/ogg \ | ||
include/vendored/sparsehash; | ||
do cp -r $inc headers; done | ||
- name: macos build | ||
run: | | ||
git submodule update --recursive | ||
./build.sh -o -d -r -t | ||
mkdir macosbuild | ||
cp build/libHop.a macosbuild/libHop-macos.a | ||
cp build/libjGL.a macosbuild/libjGL-macos.a | ||
cp LICENSE* macosbuild/ | ||
mkdir demos | ||
cp -r build/PerlinWorld demos/ | ||
cd demos && zip -r ../demos.zip * && cd .. | ||
- name: Tests | ||
working-directory: ${{github.workspace}}/build | ||
# Execute tests defined by the CMake configuration. | ||
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail | ||
run: MESA_GL_VERSION_OVERRIDE=3.3 ctest --output-on-failure --verbose --exclude-regex Vulkan --exclude-regex assetStore | ||
|
||
- name: regression | ||
run: | | ||
mkdir tests/regression/user-macos/include/ | ||
cp build/*.a tests/regression/user-macos/ | ||
cp -r headers/* tests/regression/user-macos/include/ | ||
cd tests/regression/user-macos | ||
mkdir build && cd build | ||
cmake .. -DCMAKE_TOOLCHAIN_FILE=../osx.cmake && make |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.