Skip to content

Commit

Permalink
Fix Release.yml with latest other YML and build c hanges.
Browse files Browse the repository at this point in the history
  • Loading branch information
VocalFan authored Jan 7, 2023
1 parent 451a0aa commit 8b3cbff
Showing 1 changed file with 19 additions and 25 deletions.
44 changes: 19 additions & 25 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ jobs:
os: [windows-2019, ubuntu-20.04, macOS-12]
include:
- os: windows-2019
release_suffix: Windows
release_suffix: windows
- os: ubuntu-20.04
release_suffix: Ubuntu
release_suffix: linux
- os: macOS-12
release_suffix: Mac
release_suffix: mac
runs-on: ${{ matrix.os }}
steps:
# Checkout and Install QT (Both OSes)
Expand All @@ -34,65 +34,59 @@ jobs:
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
cache: true
cache-key-prefix: ${{ runner.os }}-install-qt-action
version: 6.2.*

# Windows Specific Setup

- name: Cache Vulkan SDK (Windows)
if: matrix.release_suffix == 'windows'
id: cache-vulkan
uses: actions/[email protected]
with:
path: C:\VulkanSDK
key: ${{ runner.os }}-vulkanSDK

- name: Install Vulkan SDK (Windows)
if: matrix.release_suffix == 'Windows'
if: matrix.release_suffix == 'windows' && ${{ steps.cache-vulkan.outputs.cache-hit != 'true' }}
run: |
Invoke-WebRequest -Uri "https://sdk.lunarg.com/sdk/download/1.3.224.1/windows/VulkanSDK-1.3.224.1-Installer.exe" -OutFile VulkanSDK.exe
.\VulkanSDK.exe --root C:\VulkanSDK --accept-licenses --default-answer --confirm-command install
echo "VULKAN_SDK=C:\VulkanSDK" >> $env:GITHUB_ENV
- name: Initialize VCPKG (Windows)
if: matrix.release_suffix == 'Windows'
run: .\vcpkg\bootstrap-vcpkg.bat

- name: Install VCPKG packages (Windows)
if: matrix.release_suffix == 'Windows'
run: .\vcpkg-restore.ps1

# Ubuntu Specific Setup

- name: Install system dependencies (Ubuntu)
if: matrix.release_suffix == 'Ubuntu'
if: matrix.release_suffix == 'linux'
run: |
wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo apt-key add -
sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-1.3.224-focal.list https://packages.lunarg.com/vulkan/1.3.224/lunarg-vulkan-1.3.224-focal.list
sudo apt-get update
sudo apt-get install -y libxkbcommon-dev vulkan-sdk
echo "VULKAN_SDK=/usr" >> $GITHUB_ENV
- name: Initialize VCPKG (Ubuntu)
if: matrix.release_suffix == 'Ubuntu'
run: ./vcpkg/bootstrap-vcpkg.sh

- name: Install VCPKG packages (Ubuntu)
if: matrix.release_suffix == 'Ubuntu'
run: ./vcpkg-restore.sh

# Build and Release (Both OSes)

- name: Run CMake
run: cmake -B build -D CMAKE_BUILD_TYPE=Release
run: cmake --preset ${{ matrix.release_suffix }}-release .

- name: Build
run: cmake --build build --config Release
run: cmake --build --preset ${{ matrix.release_suffix }}-release

- name: Export artifacts
run: cmake --install build --prefix dist

- name: ZIP Obliteration (WINDOWS ONLY | UBUNTU BROKEN)
if: matrix.release_suffix == 'Windows'
if: matrix.release_suffix == 'windows'
uses: TheDoctor0/zip-release@main
with:
type: 'zip'
path: './dist/*'
filename: Obliteration-${{ env.version }}-${{ matrix.release_suffix }}.zip

- name: Release Executable (WINDOWS ONLY | UBUNTU BROKEN)
if: matrix.release_suffix == 'Windows'
if: matrix.release_suffix == 'windows'
uses: ncipollo/[email protected]
with:
artifacts: "Obliteration-${{ env.version }}-${{ matrix.release_suffix }}.zip"
Expand Down

0 comments on commit 8b3cbff

Please sign in to comment.