From fd6c76bd74170d2da8b12bfe8fe534727b9eb24f Mon Sep 17 00:00:00 2001 From: Pascal Thomet Date: Mon, 5 Feb 2024 19:34:47 +0100 Subject: [PATCH] Debug CI --- .github/workflows/VcpkgPackage.yml | 12 +-- .github/workflows/{ => t}/Android.yml | 0 .github/workflows/{ => t}/Automate.yml | 0 .github/workflows/{ => t}/DirectX.yml | 0 .github/workflows/{ => t}/Emscripten.yml | 0 .github/workflows/{ => t}/Metal.yml | 0 .github/workflows/{ => t}/MinGW.yml | 0 .github/workflows/{ => t}/StarterTemplate.yml | 0 .github/workflows/{ => t}/TestEngine.yml | 0 .github/workflows/{ => t}/Tips.md | 0 .github/workflows/{ => t}/VcpkgDeps.yml | 0 .github/workflows/t/VcpkgPackage.yml | 86 +++++++++++++++++++ .github/workflows/{ => t}/Vulkan.yml | 0 .github/workflows/{ => t}/Win_Mac_Linux.yml | 0 .github/workflows/{ => t}/iOS.yml | 0 15 files changed, 92 insertions(+), 6 deletions(-) rename .github/workflows/{ => t}/Android.yml (100%) rename .github/workflows/{ => t}/Automate.yml (100%) rename .github/workflows/{ => t}/DirectX.yml (100%) rename .github/workflows/{ => t}/Emscripten.yml (100%) rename .github/workflows/{ => t}/Metal.yml (100%) rename .github/workflows/{ => t}/MinGW.yml (100%) rename .github/workflows/{ => t}/StarterTemplate.yml (100%) rename .github/workflows/{ => t}/TestEngine.yml (100%) rename .github/workflows/{ => t}/Tips.md (100%) rename .github/workflows/{ => t}/VcpkgDeps.yml (100%) create mode 100644 .github/workflows/t/VcpkgPackage.yml rename .github/workflows/{ => t}/Vulkan.yml (100%) rename .github/workflows/{ => t}/Win_Mac_Linux.yml (100%) rename .github/workflows/{ => t}/iOS.yml (100%) diff --git a/.github/workflows/VcpkgPackage.yml b/.github/workflows/VcpkgPackage.yml index 27740b14..68fc9a84 100644 --- a/.github/workflows/VcpkgPackage.yml +++ b/.github/workflows/VcpkgPackage.yml @@ -26,12 +26,12 @@ jobs: fail-fast: false matrix: config: - - os: ubuntu-latest - vcpkg_triplet: x64-linux-release +# - os: ubuntu-latest +# vcpkg_triplet: x64-linux-release - os: macos-latest vcpkg_triplet: x64-osx-release - - os: windows-latest - vcpkg_triplet: x64-windows-release +# - os: windows-latest +# vcpkg_triplet: x64-windows-release steps: @@ -74,8 +74,8 @@ jobs: # Extract the archive using 7-zip which is preinstalled on the GitHub Actions Windows runner 7z x mesa3d-23.1.9-release-msvc.7z -omesa3d -# - name: Setup interactive tmate session -# uses: mxschmitt/action-tmate@v3 + - name: Setup interactive tmate session + uses: mxschmitt/action-tmate@v3 # Run the test - name: run test diff --git a/.github/workflows/Android.yml b/.github/workflows/t/Android.yml similarity index 100% rename from .github/workflows/Android.yml rename to .github/workflows/t/Android.yml diff --git a/.github/workflows/Automate.yml b/.github/workflows/t/Automate.yml similarity index 100% rename from .github/workflows/Automate.yml rename to .github/workflows/t/Automate.yml diff --git a/.github/workflows/DirectX.yml b/.github/workflows/t/DirectX.yml similarity index 100% rename from .github/workflows/DirectX.yml rename to .github/workflows/t/DirectX.yml diff --git a/.github/workflows/Emscripten.yml b/.github/workflows/t/Emscripten.yml similarity index 100% rename from .github/workflows/Emscripten.yml rename to .github/workflows/t/Emscripten.yml diff --git a/.github/workflows/Metal.yml b/.github/workflows/t/Metal.yml similarity index 100% rename from .github/workflows/Metal.yml rename to .github/workflows/t/Metal.yml diff --git a/.github/workflows/MinGW.yml b/.github/workflows/t/MinGW.yml similarity index 100% rename from .github/workflows/MinGW.yml rename to .github/workflows/t/MinGW.yml diff --git a/.github/workflows/StarterTemplate.yml b/.github/workflows/t/StarterTemplate.yml similarity index 100% rename from .github/workflows/StarterTemplate.yml rename to .github/workflows/t/StarterTemplate.yml diff --git a/.github/workflows/TestEngine.yml b/.github/workflows/t/TestEngine.yml similarity index 100% rename from .github/workflows/TestEngine.yml rename to .github/workflows/t/TestEngine.yml diff --git a/.github/workflows/Tips.md b/.github/workflows/t/Tips.md similarity index 100% rename from .github/workflows/Tips.md rename to .github/workflows/t/Tips.md diff --git a/.github/workflows/VcpkgDeps.yml b/.github/workflows/t/VcpkgDeps.yml similarity index 100% rename from .github/workflows/VcpkgDeps.yml rename to .github/workflows/t/VcpkgDeps.yml diff --git a/.github/workflows/t/VcpkgPackage.yml b/.github/workflows/t/VcpkgPackage.yml new file mode 100644 index 00000000..27740b14 --- /dev/null +++ b/.github/workflows/t/VcpkgPackage.yml @@ -0,0 +1,86 @@ +name: "VcpkgPackage" + +# Tests that: +# 1. the vcpkg package build successfully +# - on all platforms +# - for all rendering bindings (opengl3-binding, metal-binding, opengl3-binding, vulkan-binding, dx11-binding, dx12-binding) +# - for all window backends (glfw-binding, sdl2-binding) +# - with all optional dependencies (freetype, freetype-lunasvg) +# 2. An app can be built with hello_imgui as a vcpkg package +# (with all combinations of rendering bindings, window backends, optional dependencies) +# 3. An app can be run +# (only on selected backends and platforms) + + +on: + workflow_dispatch: + pull_request: + push: + + +jobs: + build: + name: VcpkgPackage + runs-on: ${{ matrix.config.os }} + strategy: + fail-fast: false + matrix: + config: + - os: ubuntu-latest + vcpkg_triplet: x64-linux-release + - os: macos-latest + vcpkg_triplet: x64-osx-release + - os: windows-latest + vcpkg_triplet: x64-windows-release + + + steps: + - name: install glfw & sdl requirements + if : ${{ matrix.config.os == 'ubuntu-latest' }} + shell: bash + run: | + sudo apt-get update && sudo apt-get install -y libxinerama-dev libxcursor-dev xorg-dev libglu1-mesa-dev pkg-config libx11-dev libxft-dev libxext-dev + + - name: vcpkg install + uses: johnwason/vcpkg-action@v6 + id: vcpkg + with: + pkgs: 'nlohmann-json' # unrelated package, just to make the action happy + triplet: ${{ matrix.config.vcpkg_triplet }} + cache-key: ${{ matrix.config.os }} + revision: master + token: ${{ github.token }} + github-binarycache: true + + - uses: actions/checkout@v4 + with: + submodules: false + + # + # Install utilities to be able to run a graphical OpenGL application + # + - name: Ubuntu - Install & Start Xvfb + if: ${{ matrix.platform == 'ubuntu-latest' }} + run: | + sudo apt-get install -y xvfb + + - name: Windows - install mesa OpenGL software renderer + shell: bash + if: ${{ matrix.config.os == 'windows-latest' }} + run: | + # Download the archive + curl -L -O https://github.com/pal1000/mesa-dist-win/releases/download/23.1.9/mesa3d-23.1.9-release-msvc.7z + + # Extract the archive using 7-zip which is preinstalled on the GitHub Actions Windows runner + 7z x mesa3d-23.1.9-release-msvc.7z -omesa3d + +# - name: Setup interactive tmate session +# uses: mxschmitt/action-tmate@v3 + + # Run the test + - name: run test + shell: bash + run: | + export VCPKG_ROOT=$VCPKG_INSTALLATION_ROOT + cd .github/ci_vcpkg_package_tests + python run_ci_vcpkg_package_tests.py diff --git a/.github/workflows/Vulkan.yml b/.github/workflows/t/Vulkan.yml similarity index 100% rename from .github/workflows/Vulkan.yml rename to .github/workflows/t/Vulkan.yml diff --git a/.github/workflows/Win_Mac_Linux.yml b/.github/workflows/t/Win_Mac_Linux.yml similarity index 100% rename from .github/workflows/Win_Mac_Linux.yml rename to .github/workflows/t/Win_Mac_Linux.yml diff --git a/.github/workflows/iOS.yml b/.github/workflows/t/iOS.yml similarity index 100% rename from .github/workflows/iOS.yml rename to .github/workflows/t/iOS.yml