diff --git a/.github/workflows/build-tests.yml b/.github/workflows/build-tests.yml deleted file mode 100644 index 6e17c69..0000000 --- a/.github/workflows/build-tests.yml +++ /dev/null @@ -1,86 +0,0 @@ -name: jGL build tests - -on: - push: - branches-ignore: - - 'main' - - 'docs' - paths-ignore: - - 'doc/**' - workflow_dispatch: - -jobs: - linuxXlinux: - runs-on: ubuntu-22.04 - - steps: - - uses: actions/checkout@v4 - with: - submodules: 'true' - - - 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 -e - cp -r build/Examples linux-x86_64-examples - cp LICENSE linux-x86_64-examples/ - - - name: build examples artifact - uses: actions/upload-artifact@v4 - with: - name: linux-x86_64-examples - path: linux-x86_64-examples - - linuxXwindows: - runs-on: ubuntu-22.04 - - steps: - - uses: actions/checkout@v4 - with: - submodules: 'true' - - - name: Install dependencies - run: sudo apt-get update && sudo apt-get install -y xorg-dev build-essential mesa-common-dev libx11-dev libxrandr-dev libgl1-mesa-dev libglu1-mesa-dev libfreetype6-dev libopenal-dev libsndfile1-dev libudev-dev g++-mingw-w64-x86-64-posix gcc-mingw-w64-x86-64-posix libxinerama-dev libxcursor-dev vulkan-tools libvulkan-dev vulkan-validationlayers-dev spirv-tools - - - name: linux-X-windows - run: | - ./build.sh -t -w -r -e - cp -r build/Examples windows-examples - cp LICENSE windows-examples/ - - - name: build examples artifact - uses: actions/upload-artifact@v4 - with: - name: windows-examples - path: windows-examples - - macOS: - runs-on: macos-13 - - steps: - - uses: actions/checkout@v4 - with: - submodules: 'true' - - - 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: macos-macos - run: | - ./build.sh -o -e -r - cp -r build/Examples macos-examples - cp LICENSE macos-examples/ - - - name: build examples artifact - uses: actions/upload-artifact@v4 - with: - name: macos-examples - path: macos-examples \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8725d6d..c6ae766 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,4 @@ -name: jGL release +name: jGL CI on: push: @@ -8,6 +8,7 @@ on: - 'doc/**' - '.github/**' workflow_dispatch: + pull_request: jobs: @@ -60,7 +61,7 @@ jobs: name: headers-mingw path: headers-mingw - linuxNative: + linux: runs-on: ubuntu-20.04 steps: @@ -68,7 +69,7 @@ jobs: with: submodules: 'true' - - name: Install dependencies + - 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 @@ -80,7 +81,7 @@ jobs: cp LICENSE linux-x86_64-examples/ cp LICENSE linux-x86_64/ - - name: Tests + - name: unit 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 @@ -102,7 +103,7 @@ jobs: name: linux-x86_64-examples path: linux-x86_64-examples - linuxXwindows: + windows: runs-on: ubuntu-22.04 steps: @@ -110,7 +111,7 @@ jobs: with: submodules: 'true' - - name: Install dependencies + - name: install dependencies run: sudo apt-get update && sudo apt-get install -y xorg-dev build-essential mesa-common-dev libx11-dev libxrandr-dev libgl1-mesa-dev libglu1-mesa-dev libfreetype6-dev libopenal-dev libsndfile1-dev libudev-dev g++-mingw-w64-x86-64-posix gcc-mingw-w64-x86-64-posix libxinerama-dev libxcursor-dev vulkan-tools libvulkan-dev vulkan-validationlayers-dev spirv-tools - name: linux-X-windows @@ -119,6 +120,8 @@ jobs: mkdir windows cp -r build/Examples windows-examples cp build/libjGL.a windows/libjGL-windows.a + cp build/*.dll windows/ + cp build/*.dll windows-examples/ cp LICENSE windows-examples/ cp LICENSE windows/ @@ -134,7 +137,7 @@ jobs: name: windows-examples path: windows-examples - macosNative: + macos: runs-on: macos-13 steps: @@ -142,7 +145,7 @@ jobs: with: submodules: 'true' - - name: Install dependencies + - name: install dependencies run: | wget https://sdk.lunarg.com/sdk/download/latest/mac/vulkan-sdk.zip -O vulkan-sdk.zip unzip vulkan-sdk.zip @@ -173,11 +176,11 @@ jobs: path: macos-examples linuxRun: - needs: linuxNative + needs: linux runs-on: ubuntu-22.04 steps: - - name: Install dependencies + - name: install dependencies run: sudo apt-get update && sudo apt-get install -y xvfb x11-apps imagemagick - name: get linux build @@ -205,41 +208,40 @@ jobs: name: screenshot path: Particles/screenshot.png - # wineRun: - # needs: linuxXwindows - # runs-on: ubuntu-22.04 - - # steps: - # - name: Install dependencies - # run: sudo apt-get update && sudo apt-get install -y xvfb x11-apps imagemagick wine32 wine64 - - # - name: get linux build - # uses: actions/download-artifact@v4 - # with: - # name: windows-examples - - # - name: launch and screenshot - # run: | - # ls - # cd Particles - # chmod +x Particles.exe - # export DISPLAY=:99 - # sudo Xvfb :99 -screen 0 800x600x24 & - # sleep 5 - # MESA_GL_VERSION_OVERRIDE=3.3 wine64 Particles.exe & - # 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: screenshot-wine - # path: Particles/screenshot.png + wineRun: + needs: windows + runs-on: ubuntu-22.04 + + steps: + - name: install dependencies + run: sudo apt-get update && sudo apt-get install -y xvfb x11-apps imagemagick wine32 wine64 + + - name: get linux build + uses: actions/download-artifact@v4 + with: + name: windows-examples + + - name: launch and screenshot + run: | + cd Particles + chmod +x Particles.exe + export DISPLAY=:99 + sudo Xvfb :99 -screen 0 800x600x24 & + sleep 5 + MESA_GL_VERSION_OVERRIDE=3.3 wine64 Particles.exe & + 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: screenshot-wine + path: Particles/screenshot.png test-release: - needs: [linuxNative, headers] + needs: [linux, headers] runs-on: ubuntu-22.04 steps: @@ -259,7 +261,7 @@ jobs: with: name: linux-x86_64 - - name: Install dependencies + - name: install dependencies run: sudo apt-get update && sudo apt-get install -y xorg-dev build-essential mesa-common-dev libx11-dev libxrandr-dev libgl1-mesa-dev libglu1-mesa-dev libfreetype6-dev libopenal-dev libsndfile1-dev libudev-dev g++-mingw-w64-x86-64-posix gcc-mingw-w64-x86-64-posix libxinerama-dev libxcursor-dev vulkan-tools libvulkan-dev vulkan-validationlayers-dev spirv-tools xvfb x11-apps imagemagick - name: linux lib test @@ -274,7 +276,7 @@ jobs: cmake .. && make test-release-mingw: - needs: [linuxXwindows, headers] + needs: [windows, headers] runs-on: ubuntu-22.04 steps: @@ -294,7 +296,7 @@ jobs: with: name: windows - - name: Install dependencies + - name: install dependencies run: sudo apt-get update && sudo apt-get install -y xorg-dev build-essential mesa-common-dev libx11-dev libxrandr-dev libgl1-mesa-dev libglu1-mesa-dev libfreetype6-dev libopenal-dev libsndfile1-dev libudev-dev g++-mingw-w64-x86-64-posix gcc-mingw-w64-x86-64-posix libxinerama-dev libxcursor-dev vulkan-tools libvulkan-dev vulkan-validationlayers-dev spirv-tools xvfb x11-apps imagemagick - name: mingw lib test @@ -307,7 +309,7 @@ jobs: ./build.sh test-release-macos: - needs: [macosNative, headers] + needs: [macos, headers] runs-on: macos-13 steps: @@ -327,7 +329,7 @@ jobs: with: name: macos - - name: Install dependencies + - name: install dependencies run: | wget https://sdk.lunarg.com/sdk/download/latest/mac/vulkan-sdk.zip -O vulkan-sdk.zip unzip vulkan-sdk.zip @@ -347,7 +349,7 @@ jobs: cmake .. -DCMAKE_TOOLCHAIN_FILE=../osx.cmake && make release: - needs: [linuxNative, linuxXwindows, macosNative] + needs: [linux, windows, macos] if: github.ref_type == 'tag' runs-on: ubuntu-22.04 diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml deleted file mode 100644 index 05215bf..0000000 --- a/.github/workflows/run-tests.yml +++ /dev/null @@ -1,82 +0,0 @@ -name: jGL run tests - -on: - pull_request: - workflow_dispatch: - -jobs: - linuxRunTest: - runs-on: ubuntu-22.04 - - strategy: - matrix: - example: [Particles, Sprite, Shape] - - steps: - - uses: actions/checkout@v4 - with: - submodules: 'true' - - - 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 -e - - - name: run ${{ matrix.example }} - run: | - cd build/Examples/${{ 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/Examples/${{ matrix.example }}/screenshot.png - - wineRunTest: - if: ${{ github.event_name == 'workflow_dispatch' }} - runs-on: ubuntu-22.04 - - strategy: - matrix: - example: [Particles, Sprite, Shape] - - steps: - - uses: actions/checkout@v4 - with: - submodules: 'true' - - - name: Install dependencies - run: sudo apt-get update && sudo apt-get install -y xorg-dev build-essential mesa-common-dev libx11-dev libxrandr-dev libgl1-mesa-dev libglu1-mesa-dev libfreetype6-dev libopenal-dev libsndfile1-dev libudev-dev g++-mingw-w64-x86-64-posix gcc-mingw-w64-x86-64-posix libxinerama-dev libxcursor-dev xvfb x11-apps vulkan-tools libvulkan-dev vulkan-validationlayers-dev spirv-tools wine64 - - name: linux-windows - run: | - ./build.sh -t -r -w -e - - - name: run ${{ matrix.example }} - run: | - cd build/Examples/${{ matrix.example }} - chmod +x ${{ matrix.example }}.exe - export DISPLAY=:99 - sudo Xvfb :99 -screen 0 800x600x24 & - sleep 5 - MESA_GL_VERSION_OVERRIDE=3.3 wine64 ${{ matrix.example }}.exe & - 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 }}-wine.png - path: build/Examples/${{ matrix.example }}/screenshot.png \ No newline at end of file diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml deleted file mode 100644 index 5c95df8..0000000 --- a/.github/workflows/unit-tests.yml +++ /dev/null @@ -1,59 +0,0 @@ -name: jGL unit tests - -on: - push: - branches-ignore: 'docs' - paths-ignore: - - 'doc/**' - - '.github/**' - workflow_dispatch: - -jobs: - linuxUnitTest: - runs-on: ubuntu-22.04 - - steps: - - uses: actions/checkout@v4 - with: - submodules: 'true' - - - 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 - - - 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 --exclude-regex Vulkan --extra-verbose --output-on-failure - - linuxWineUnitTest: - runs-on: ubuntu-22.04 - - steps: - - uses: actions/checkout@v4 - with: - submodules: 'true' - - - name: Install dependencies - run: sudo apt-get update && sudo apt-get install -y xorg-dev build-essential mesa-common-dev libx11-dev libxrandr-dev libgl1-mesa-dev libglu1-mesa-dev libfreetype6-dev libopenal-dev libsndfile1-dev libudev-dev g++-mingw-w64-x86-64-posix gcc-mingw-w64-x86-64-posix libxinerama-dev libxcursor-dev vulkan-tools libvulkan-dev vulkan-validationlayers-dev spirv-tools wine64 - - name: linux-windos - run: | - ./build.sh -t -r -w - - - 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 --exclude-regex Vulkan --extra-verbose --output-on-failure