diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bad1769..5f53402 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,17 +4,26 @@ on: [pull_request] jobs: clang-format: - uses: ./.github/workflows/clang-format-deploy.yml + uses: engine3d-dev/ci/.github/workflows/clang-format.yml@main secrets: inherit windows: - uses: ./.github/workflows/windows.yml + uses: engine3d-dev/ci/.github/workflows/windows.yml@main + with: + package_name: "vulkan-cpp" + version: "6.0" secrets: inherit linux: - uses: ./.github/workflows/linux.yml + uses: engine3d-dev/ci/.github/workflows/linux.yml@main + with: + package_name: "vulkan-cpp" + version: "6.0" secrets: inherit mac-armv8: - uses: ./.github/workflows/mac.yml + uses: engine3d-dev/ci/.github/workflows/mac.yml@main + with: + package_name: "vulkan-cpp" + version: "6.0" secrets: inherit \ No newline at end of file diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..c7e5a61 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,31 @@ +name: 🚀 Deployment + +# Deploy to JFrog artifactory when PR successfully merges to the main branch +on: + pull_request: + types: [closed] + branches: + - main + workflow_call: + +jobs: + windows: + uses: engine3d-dev/ci/.github/workflows/deploy_windows.yml@main + with: + package_name: "vulkan-cpp" + version: "6.0" + secrets: inherit + + linux: + uses: engine3d-dev/ci/.github/workflows/deploy_linux.yml@main + with: + package_name: "vulkan-cpp" + version: "6.0" + secrets: inherit + + mac: + uses: engine3d-dev/ci/.github/workflows/deploy_mac.yml@main + with: + package_name: "vulkan-cpp" + version: "6.0" + secrets: inherit \ No newline at end of file diff --git a/.github/workflows/deploy_all.yml b/.github/workflows/deploy_all.yml deleted file mode 100644 index b027cfc..0000000 --- a/.github/workflows/deploy_all.yml +++ /dev/null @@ -1,23 +0,0 @@ - -name: 🚀 Deployment - -# Trigger deployment CI when PRs get merged to main (production branch) -on: - pull_request: - types: [closed] - branches: - - main - workflow_call: - -jobs: - windows: - uses: ./.github/workflows/deploy_windows.yml - secrets: inherit - - linux: - uses: ./.github/workflows/deploy_linux.yml - secrets: inherit - - mac-armv8: - uses: ./.github/workflows/deploy_mac.yml - secrets: inherit \ No newline at end of file diff --git a/.github/workflows/deploy_linux.yml b/.github/workflows/deploy_linux.yml deleted file mode 100644 index b4963bf..0000000 --- a/.github/workflows/deploy_linux.yml +++ /dev/null @@ -1,62 +0,0 @@ -name: Ubuntu Deployment - -on: [workflow_call] - -jobs: - linux_x86_64: - if: github.event.pull_request.merged == true - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Install LLVM's C++ Standard Library - run: sudo apt-get install libc++-20-dev libc++abi-20-dev - - - name: Installing pipx - run: sudo apt install pipx - - - name: Installing Prerequisites for Linux - run: | - sudo apt-get update - sudo apt install software-properties-common -y - sudo add-apt-repository ppa:deadsnakes/ppa - - - name: Install Vulkan SDK - uses: humbletim/setup-vulkan-sdk@v1.2.1 - with: - vulkan-query-version: 1.4.304.1 - vulkan-components: Vulkan-Headers, Vulkan-Loader - vulkan-use-cache: true - - - name: Pip installing conan - shell: pwsh - run: pipx install "conan>=2.18.1" - - - name: Setting up Conan configuration - shell: pwsh - run: conan config install -sf profiles/x86_64/linux/ -tf profiles https://github.com/engine3d-dev/conan-config.git - - - name: Setting up Conan - shell: pwsh - run: | - conan config install https://github.com/engine3d-dev/conan-config.git - conan atlas setup - - - name: Creating Release build for vulkan-cpp - shell: pwsh - run: conan atlas create . -s build_type=Release - - - name: Creating Debug build for vulkan-cpp - shell: pwsh - run: conan atlas create . -s build_type=Debug - - - name: Creating MinSizeRel build for vulkan-cpp - shell: pwsh - run: conan atlas create . -s build_type=MinSizeRel - - - name: Login to JFrog - run: conan remote login -p ${{ secrets.JFROG_USER_TOKEN_ID }} engine3d-conan ${{ secrets.JFROG_USERNAME }} - - - name: Uploading vulkan-cpp to engine3d-conan remote repositories - shell: pwsh - run: conan upload vulkan-cpp/6.0 --r=engine3d-conan --confirm \ No newline at end of file diff --git a/.github/workflows/deploy_mac.yml b/.github/workflows/deploy_mac.yml deleted file mode 100644 index 39ba0ae..0000000 --- a/.github/workflows/deploy_mac.yml +++ /dev/null @@ -1,54 +0,0 @@ -name: MacOS Armv8 Deployment - -on: [workflow_call] - -jobs: - macos_armv8: - if: github.event.pull_request.merged == true - runs-on: macos-latest - steps: - - uses: actions/checkout@v4 - - - name: Install Homebrew - run: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" - - - name: Install LLVM - run: brew install python pipx - - - name: Install Vulkan SDK - uses: humbletim/setup-vulkan-sdk@v1.2.1 - with: - vulkan-query-version: 1.4.304.1 - vulkan-components: Vulkan-Headers, Vulkan-Loader - vulkan-use-cache: true - - - name: Pipx installing conan - shell: pwsh - run: | - pipx install "conan>=2.18.2" - pipx upgrade conan - - - name: Setting up Conan configuration - shell: pwsh - run: | - conan config install https://github.com/engine3d-dev/conan-config.git - conan atlas setup - - - name: Creating Release build for vulkan-cpp - shell: pwsh - run: conan atlas create . -s build_type=Release - - - name: Creating Debug build for vulkan-cpp - shell: pwsh - run: conan atlas create . -s build_type=Debug - - - name: Creating MinSizeRel build for vulkan-cpp - shell: pwsh - run: conan atlas create . -s build_type=MinSizeRel - - - name: Login to JFrog - run: conan remote login -p ${{ secrets.JFROG_USER_TOKEN_ID }} engine3d-conan ${{ secrets.JFROG_USERNAME }} - - - name: Uploading vulkan-cpp to engine3d-conan remote repositories - shell: pwsh - run: conan upload vulkan-cpp/6.0 --r=engine3d-conan --confirm \ No newline at end of file diff --git a/.github/workflows/deploy_windows.yml b/.github/workflows/deploy_windows.yml deleted file mode 100644 index 1ccac9f..0000000 --- a/.github/workflows/deploy_windows.yml +++ /dev/null @@ -1,55 +0,0 @@ -name: Windows Deployment - - -on: [workflow_call] - -jobs: - windows_x86_64: - if: github.event.pull_request.merged == true - runs-on: windows-latest - steps: - - uses: actions/checkout@v4 - - name: Installing Choco - shell: pwsh - run: Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')) - - - name: Install Git - shell: pwsh - run: choco install git - - - name: Install Vulkan SDK - uses: humbletim/setup-vulkan-sdk@v1.2.1 - with: - vulkan-query-version: 1.4.304.1 - vulkan-components: Vulkan-Headers, Vulkan-Loader - vulkan-use-cache: true - - - - name: Pip installing conan - shell: pwsh - run: pip install conan - - - name: Setting up Conan configuration - shell: pwsh - run: | - conan config install https://github.com/engine3d-dev/conan-config.git - conan atlas setup - - - name: Creating Release build for vulkan-cpp - shell: pwsh - run: conan atlas create . -s build_type=Release - - - name: Creating Debug build for vulkan-cpp - shell: pwsh - run: conan atlas create . -s build_type=Debug - - - name: Creating MinSizeRel build for vulkan-cpp - shell: pwsh - run: conan atlas create . -s build_type=MinSizeRel - - - name: Login to JFrog - run: conan remote login -p ${{ secrets.JFROG_USER_TOKEN_ID }} engine3d-conan ${{ secrets.JFROG_USERNAME }} - - - name: Uploading vulkan-cpp to engine3d-conan remote repositories - shell: pwsh - run: conan upload vulkan-cpp/6.0 --r=engine3d-conan --confirm \ No newline at end of file diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml deleted file mode 100644 index bbb3af9..0000000 --- a/.github/workflows/linux.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: Linux - -# workflow_call to have linux.yml be able to be invoked by ci.yml -on: [workflow_call] - - -jobs: - linux-build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Install LLVM's C++ Standard Library - run: sudo apt-get install libc++-20-dev libc++abi-20-dev - - - name: Installing pipx - run: sudo apt install pipx - - - name: Installing Prerequisites for Linux - run: | - sudo apt-get update - sudo apt install software-properties-common -y - sudo add-apt-repository ppa:deadsnakes/ppa - - - name: Install Vulkan SDK - uses: humbletim/setup-vulkan-sdk@v1.2.1 - with: - vulkan-query-version: 1.4.304.1 - vulkan-components: Vulkan-Headers, Vulkan-Loader - vulkan-use-cache: true - - - name: Installing Conan - run: pipx install "conan>=2.18.1" - - - name: Setting up Conan Profiles - run: conan config install -sf profiles/x86_64/linux/ -tf profiles https://github.com/engine3d-dev/conan-config.git - - - name: Setting up Conan - run: | - conan config install https://github.com/engine3d-dev/conan-config.git - conan atlas setup - - - name: Creating Release build for vulkan-cpp - run: conan atlas create . -s build_type=Release - - - name: Creating Debug build for vulkan-cpp - run: conan atlas create . -s build_type=Debug - - - name: Creating MinSizeRel build for vulkan-cpp - run: conan atlas create . -s build_type=MinSizeRel \ No newline at end of file diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml deleted file mode 100644 index 3bbe4d3..0000000 --- a/.github/workflows/mac.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: Macos Armv8 - -# workflow_call to have mac.yml be able to be invoked by ci.yml -on: [workflow_call] - -jobs: - macos-build: - runs-on: macos-latest - steps: - - uses: actions/checkout@v4 - - - name: Install Homebrew - run: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" - - - name: Install LLVM - run: | - brew install python pipx - - - name: Install Vulkan SDK - uses: humbletim/setup-vulkan-sdk@v1.2.1 - with: - vulkan-query-version: 1.4.304.1 - vulkan-components: Vulkan-Headers, Vulkan-Loader - vulkan-use-cache: true - - - - name: Installing conan - run: | - pipx install "conan>=2.18.2" - pipx upgrade conan - - - name: Installing clang-tidy - run: sudo ln -s $(brew --prefix llvm)/bin/clang-tidy /usr/local/bin/ - - - name: Install Rosetta - run: /usr/sbin/softwareupdate --install-rosetta --agree-to-license - - - name: Setting up Conan configuration - run: | - conan config install https://github.com/engine3d-dev/conan-config.git - conan atlas setup - - - name: Creating Release build for vulkan-cpp - run: conan atlas create . -s build_type=Release - - - name: Creating Debug build for vulkan-cpp - run: conan atlas create . -s build_type=Debug - - - name: Creating MinSizeRel build for vulkan-cpp - run: conan atlas create . -s build_type=MinSizeRel \ No newline at end of file diff --git a/.github/workflows/platform-config.yml b/.github/workflows/platform-config.yml deleted file mode 100644 index 53cc206..0000000 --- a/.github/workflows/platform-config.yml +++ /dev/null @@ -1,226 +0,0 @@ -name: Platform Configuration - -on: - workflow_call: - outputs: - cache-key-windows: - description: "Cached Key for the Windows Environment" - value: ${{ jobs.windows-setup.outputs.job-cache-key }} - # cache-key-linux: - # description: "Cached Key for the Ubuntu Environment" - # value: ${{ jobs.ubuntu-setup.outputs.cache-key }} - # cache-key-mac: - # description: "Cached Key for the Apple Silicon Armv8 Environment" - # value: ${{ jobs.armv8-setup.outputs.cache-key }} - -jobs: - windows-setup: - runs-on: windows-latest - # outputs: - # cache-key: ${{ steps.cache-info.outputs.key }} - outputs: - job-cache-key: ${{ steps.cache-info.outputs.key }} - steps: - - uses: actions/checkout@v4 - - - name: Generate Cache Key Info - id: cache-info - shell: pwsh - run: echo "key=windows-setup-${{ runner.os }}-${{ github.run_id }}" >> $ENV:GITHUB_OUTPUT - - - name: Check Cache - id: cache-env - uses: actions/cache@v4 - with: - path: | - ~\AppData\Local\Packages\PythonSoftwareFoundation* - ~\AppData\Local\Programs\Python* - ~\.conan2 - ${{ github.workspace }}\vulkan_sdk - key: ${{ steps.cache-info.outputs.key }} - restore-keys: | - windows-setup-${{ runner.os }}- - - - name: Install Vulkan SDK - if: steps.cache-env.outputs.cache-hit != 'true' - uses: humbletim/setup-vulkan-sdk@v1.2.1 - with: - vulkan-query-version: 1.4.304.1 - vulkan-components: Vulkan-Headers, Vulkan-Loader - destination: ${{ github.workspace }}\vulkan_sdk - - - name: Pip installing conan - if: steps.cache-env.outputs.cache-hit != 'true' - shell: pwsh - run: | - python -m pip install --upgrade pip - pip install conan - # Find out exactly where conan.exe was installed and write it to a marker file - $ConanPath = (Get-Command conan.exe -ErrorAction SilentlyContinue).Source - if (-not $ConanPath) { - $ConanPath = (Get-ChildItem -Path ~\AppData\Local -Filter conan.exe -Recurse -ErrorAction SilentlyContinue | Select-Object -First 1).FullName - } - $ConanDir = Split-Path -Path $ConanPath -Parent - New-Item -ItemType Directory -Force -Path .github\artifacts - Out-File -FilePath .github\artifacts\conan_path.txt -InputObject $ConanDir - - - name: Setting up Conan configuration - if: steps.cache-env.outputs.cache-hit != 'true' - shell: pwsh - run: | - $ConanPath = Get-Content -Path .github\artifacts\conan_path.txt - & "$ConanPath\conan" config install https://github.com/engine3d-dev/conan-config.git - & "$ConanPath\conan" atlas setup - -# jobs: -# windows-setup: -# runs-on: windows-latest -# outputs: -# cache-key: ${{ steps.cache-info.outputs.key }} -# steps: -# - uses: actions/checkout@v4 - -# # Windows runners use PowerShell (pwsh) by default, using the $ENV:GITHUB_OUTPUT syntax -# - name: Generate Cache Key Info -# id: cache-info -# shell: pwsh -# run: echo "key=windows-setup-${{ runner.os }}-${{ github.run_id }}" >> $ENV:GITHUB_OUTPUT - -# - name: Check Cache -# id: cache-env -# uses: actions/cache@v4 -# with: -# path: | -# AppData\Local\pip\Cache -# .conan2 -# vulkan_sdk -# key: ${{ steps.cache-info.outputs.key }} -# restore-keys: | -# windows-setup-${{ runner.os }}- - -# - name: Installing Choco & Git -# if: steps.cache-env.outputs.cache-hit != 'true' -# shell: pwsh -# run: | -# Set-ExecutionPolicy Bypass -Scope Process -Force -# [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072 -# iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')) -# choco install git -y - -# - name: Install Vulkan SDK -# if: steps.cache-env.outputs.cache-hit != 'true' -# uses: humbletim/setup-vulkan-sdk@v1.2.1 -# with: -# vulkan-query-version: 1.4.304.1 -# vulkan-components: Vulkan-Headers, Vulkan-Loader -# destination: ${{ github.workspace }}\vulkan_sdk - -# - name: Pip installing conan -# if: steps.cache-env.outputs.cache-hit != 'true' -# shell: pwsh -# run: pip install conan - -# - name: Setting up Conan configuration -# if: steps.cache-env.outputs.cache-hit != 'true' -# shell: pwsh -# run: | -# conan config install https://github.com/engine3d-dev/conan-config.git -# conan atlas setup - # ubuntu-setup: - # runs-on: ubuntu-latest - # outputs: - # cache-key: ${{ steps.cache-info.outputs.key }} - # steps: - # - uses: actions/checkout@v4 - - # # Note: We append a hardcoded version or file hash to trigger rebuilds when configs change - # - name: Generate Cache Key Info - # id: cache-info - # run: echo "key=ubuntu-setup-${{ runner.os }}-${{ github.run_id }}" >> $GITHUB_OUTPUT - - # - name: Check Cache - # id: cache-env - # uses: actions/cache@v4 - # with: - # path: | - # ~/.local/share/pipx - # ~/.conan2 - # ${{ github.workspace }}/vulkan_sdk - # key: ${{ steps.cache-info.outputs.key }} - # restore-keys: | - # ubuntu-setup-${{ runner.os }}- - - # - name: Install System Prerequisites - # if: steps.cache-env.outputs.cache-hit != 'true' - # run: | - # sudo apt-get update - # sudo apt-get install -y libc++-20-dev libc++abi-20-dev pipx software-properties-common - # sudo add-apt-repository ppa:deadsnakes/ppa -y - - # - name: Install Vulkan SDK - # if: steps.cache-env.outputs.cache-hit != 'true' - # uses: humbletim/setup-vulkan-sdk@v1.2.1 - # with: - # vulkan-query-version: 1.4.304.1 - # vulkan-components: Vulkan-Headers, Vulkan-Loader - # destination: ${{ github.workspace }}/vulkan_sdk - - # - name: Install and Configure Conan - # if: steps.cache-env.outputs.cache-hit != 'true' - # run: | - # pipx install "conan>=2.18.1" - # export PATH="$HOME/.local/bin:$PATH" - # conan config install https://github.com/engine3d-dev/conan-config.git - # conan atlas setup - - # armv8-setup: - # runs-on: macos-latest - # outputs: - # cache-key: ${{ steps.cache-info.outputs.key }} - # steps: - # - uses: actions/checkout@v4 - - # - name: Generate Cache Key Info - # id: cache-info - # run: echo "key=armv8-setup-${{ runner.os }}-${{ github.run_id }}" >> $GITHUB_OUTPUT - - # - name: Check Cache - # id: cache-env - # uses: actions/cache@v4 - # with: - # path: | - # ~/.local/share/pipx - # ~/.conan2 - # ${{ github.workspace }}/vulkan_sdk - # key: ${{ steps.cache-info.outputs.key }} - # restore-keys: | - # armv8-setup-${{ runner.os }}- - - # - name: Install Homebrew & Core Tooling - # if: steps.cache-env.outputs.cache-hit != 'true' - # run: | - # /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" - # brew install python pipx - - # - name: Install Vulkan SDK - # if: steps.cache-env.outputs.cache-hit != 'true' - # uses: humbletim/setup-vulkan-sdk@v1.2.1 - # with: - # vulkan-query-version: 1.4.304.1 - # vulkan-components: Vulkan-Headers, Vulkan-Loader - # destination: ${{ github.workspace }}/vulkan_sdk - - # - name: Installing conan & clang-tidy - # if: steps.cache-env.outputs.cache-hit != 'true' - # run: | - # pipx install "conan>=2.18.2" - # pipx upgrade conan - # sudo ln -s $(brew --prefix llvm)/bin/clang-tidy /usr/local/bin/ - # /usr/sbin/softwareupdate --install-rosetta --agree-to-license - - # - name: Setting up Conan configuration - # if: steps.cache-env.outputs.cache-hit != 'true' - # run: | - # export PATH="$HOME/.local/bin:$PATH" - # conan config install https://github.com/engine3d-dev/conan-config.git - # conan atlas setup \ No newline at end of file diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml deleted file mode 100644 index f48b736..0000000 --- a/.github/workflows/windows.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: Windows - -# workflow_call to have linux.yml be able to be invoked by ci.yml -on: [workflow_call] - - -jobs: - windows-build: - runs-on: windows-latest - steps: - - uses: actions/checkout@v4 - - - name: Installing Choco - shell: pwsh - run: Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')) - - - name: Installing Git - shell: pwsh - run: choco install git - - - name: Install Vulkan SDK - uses: humbletim/setup-vulkan-sdk@v1.2.1 - with: - vulkan-query-version: 1.4.304.1 - vulkan-components: Vulkan-Headers, Vulkan-Loader - vulkan-use-cache: true - - - name: Pip installing conan - shell: pwsh - run: pip install conan - - - name: Setting up Conan configuration - shell: pwsh - run: | - conan config install https://github.com/engine3d-dev/conan-config.git - conan atlas setup - - - name: Creating Release build for vulkan-cpp - shell: pwsh - run: conan atlas create . -s build_type=Release - - - name: Creating Debug build for vulkan-cpp - shell: pwsh - run: conan atlas create . -s build_type=Debug - - - name: Creating MinSizeRel build for vulkan-cpp - shell: pwsh - run: conan atlas create . -s build_type=MinSizeRel \ No newline at end of file