diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..7d73cef --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,16 @@ +version: 2 +updates: + +- package-ecosystem: github-actions + directory: "/" + schedule: + interval: daily + time: '00:00' + timezone: UTC + open-pull-requests-limit: 10 + commit-message: + prefix: "chore" + include: "scope" + labels: + - "dependabot" + - "dependencies" diff --git a/.github/renovate.json b/.github/renovate.json new file mode 100644 index 0000000..0953819 --- /dev/null +++ b/.github/renovate.json @@ -0,0 +1,5 @@ +{ + "conan": { + "enabled": true + } +} \ No newline at end of file diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ad51300..5615270 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -4,8 +4,8 @@ on: [push, pull_request] env: # Vulkan version - UNIX_VULKAN_VERSION: 1.2.148 - WINDOWS_VULKAN_VERSION: 1.2.148.0 + UNIX_VULKAN_VERSION: 1.2.198 + WINDOWS_VULKAN_VERSION: 1.2.198.1 # Conan cache environment variables CONAN_SYSREQUIRES_MODE: enabled @@ -22,18 +22,30 @@ jobs: strategy: fail-fast: false matrix: - compiler: [ - g++-7, g++-8, g++-9, g++, - clang++-8, clang++-9, clang++ - ] - - runs-on: ubuntu-latest + include: + - compiler: g++ + version: 7 + cxx: g++-7 + - compiler: g++ + version: 8 + cxx: g++-8 + - compiler: g++ + version: 9 + cxx: g++-9 + - compiler: clang + version: 9 + cxx: clang++-9 + - compiler: clang + version: 10 + cxx: clang++-10 + + runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Cache - uses: actions/cache@v2 + uses: actions/cache@v3 env: cache-name: cache-conan-pip-chocolatey-modules with: @@ -44,34 +56,15 @@ jobs: ${{ env.CPM_SOURCE_CACHE }} key: ubuntu-${{ hashFiles('conanfile.txt') }} }} - - name: Install g++-7 - if: ${{ matrix.compiler == 'g++-7' }} - run: | - sudo apt-get update - sudo apt-get install g++-7 -y - - - name: Install g++-8 - if: ${{ matrix.compiler == 'g++-8' }} - run: | - sudo apt-get update - sudo apt-get install g++-8 -y - - - name: Install clang-8 - if: ${{ matrix.compiler == 'clang++-8' }} - run: | - sudo apt-get update - sudo apt-get install clang-8 -y - - - name: Install clang-9 - if: ${{ matrix.compiler == 'clang++-9' }} + - name: Install compiler run: | sudo apt-get update - sudo apt-get install clang-9 -y + sudo apt-get install ${{ matrix.compiler }}-${{ matrix.version }} - name: Setup Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: - python-version: 3.6 + python-version: '3.10' - name: Install Build Dependencies run: | @@ -83,22 +76,20 @@ jobs: clang --version - name: Install Conan - run: | - pip -VV - pip install --upgrade pip setuptools wheel conan + run: python -m pip install conan==1.* - name: Install Ubuntu Dependencies run: | sudo apt-get update sudo apt-get install freeglut3-dev \ - libxi-dev libxinerama-dev libxcursor-dev xorg-dev \ + libxi-dev libxinerama-dev libxcb-cursor-dev xorg-dev \ libxcb-randr0-dev libxcb-xtest0-dev libxcb-xinerama0-dev libxcb-shape0-dev libxcb-xkb-dev \ libxcb-render-util0-dev libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev \ libxcb-sync-dev libxcb-xfixes0-dev libx11-xcb-dev libxcb-dri3-dev libxcb-util-dev - name: Install Vulkan SDK run: | - wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo apt-key add - + wget -qO - http://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo apt-key add - sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-$UNIX_VULKAN_VERSION-focal.list https://packages.lunarg.com/vulkan/$UNIX_VULKAN_VERSION/lunarg-vulkan-$UNIX_VULKAN_VERSION-focal.list sudo apt update sudo apt install -f vulkan-sdk @@ -114,7 +105,7 @@ jobs: shell: bash working-directory: ${{ runner.workspace }}/build env: - CXX: ${{ matrix.compiler }} + CXX: ${{ matrix.cxx }} # Note the current convention is to use the -S and -B options here to specify source # and build directories, but this is only available with CMake 3.13 and higher. # The CMake binaries on the Github Actions machines are (as of this writing) 3.12 @@ -144,35 +135,19 @@ jobs: run: cmake --install . --strip - name: Upload - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v4 with: path: ${{ runner.workspace }}/instdir - name: ubuntu-${{ matrix.compiler }} + name: ubuntu-${{ matrix.cxx }} windows: - strategy: - fail-fast: false - matrix: - os: [windows-latest, windows-2016] - toolset: [clang-cl, default, v141] - include: - - toolset: clang-cl - toolset_option: -T"ClangCl" - - toolset: v141 - toolset_option: -T"v141" - exclude: - - os: windows-2016 - toolset: clang-cl - - os: windows-2016 - toolset: v141 - - runs-on: windows-latest + runs-on: windows-2019 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Cache - uses: actions/cache@v2 + uses: actions/cache@v3 env: cache-name: cache-conan-pip-chocolatey-modules with: @@ -190,17 +165,19 @@ jobs: ninja --version cmake --version + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: '3.10' + - name: Install Conan - run: | - python -c "import sys; print(sys.version)" - python -m pip install --upgrade pip - pip install conan + run: python -m pip install conan==1.* - name: Download Vulkan SDK run: Invoke-WebRequest "https://sdk.lunarg.com/sdk/download/$Env:WINDOWS_VULKAN_VERSION/windows/VulkanSDK-$Env:WINDOWS_VULKAN_VERSION-Installer.exe" -OutFile VulkanSDK.exe -v - name: Install Vulkan SDK - run: .\VulkanSDK.exe /S + run: .\VulkanSDK.exe --accept-licenses --default-answer --confirm-command install shell: cmd - name: Create Build Environment @@ -210,8 +187,7 @@ jobs: shell: bash working-directory: ${{runner.workspace}}/build env: - CXX: ${{ matrix.compiler }} - VULKAN_SDK: "C:\\VulkanSDK\\${{ env.WINDOWS_VULKAN_VERSION }}" + VULKAN_SDK: "C:\\VulkanSDK\\${{ env.WINDOWS_VULKAN_VERSION }}" run: | cmake \ $GITHUB_WORKSPACE \ @@ -223,13 +199,13 @@ jobs: shell: bash run: cmake --build . --config Release env: - VULKAN_SDK: "C:\\VulkanSDK\\${{ env.WINDOWS_VULKAN_VERSION }}" + VULKAN_SDK: "C:\\VulkanSDK\\${{ env.WINDOWS_VULKAN_VERSION }}" - name: Run tests working-directory: ${{ runner.workspace }}/build env: CTEST_OUTPUT_ON_FAILURE: 1 - VULKAN_SDK: "C:\\VulkanSDK\\${{ env.WINDOWS_VULKAN_VERSION }}" + VULKAN_SDK: "C:\\VulkanSDK\\${{ env.WINDOWS_VULKAN_VERSION }}" run: ctest --timeout 10 -C Release -j4 - name: Install Strip @@ -237,25 +213,25 @@ jobs: shell: bash run: cmake --install . --strip env: - VULKAN_SDK: "C:\\VulkanSDK\\${{ env.WINDOWS_VULKAN_VERSION }}" + VULKAN_SDK: "C:\\VulkanSDK\\${{ env.WINDOWS_VULKAN_VERSION }}" - name: Upload - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v4 with: path: ${{ runner.workspace }}/instdir - name: windows-${{ matrix.toolset }} + name: windows-msvc docs: name: Publish documentation - runs-on: macos-latest + runs-on: ubuntu-latest needs: linux steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v4 with: - name: ubuntu-g++ + name: ubuntu-g++-9 path: ${{ runner.workspace }} - name: Display structure of downloaded files diff --git a/README.md b/README.md index 42466d8..1b53b82 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ -![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/florianvazelle/VulkanStarter/build/main?label=Windows%20%7C%20Linux&logo=github) +![GitHub Workflow Status (branch)](https://img.shields.io/github/actions/workflow/status/florianvazelle/VulkanStarter/main.yml?branch=main&label=Windows%20%7C%20Linux&logo=github) + # VulkanStarter This is a template to setting up a new Vulkan C++ project.