Skip to content

Commit

Permalink
Update release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
NayamAmarshe authored Feb 8, 2024
1 parent d7b1ed2 commit 53be61e
Showing 1 changed file with 108 additions and 108 deletions.
216 changes: 108 additions & 108 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,51 +24,51 @@ jobs:
id: get_version
run: echo "VERSION=$(date +'%Y.%m.%d_%H%M%S')" >> "$GITHUB_OUTPUT"

# ubuntu:
# needs: [setup]
# runs-on: ubuntu-20.04
# env:
# PACKAGENAME: ${{ needs.setup.outputs.APPNAME }}-${{ needs.setup.outputs.VERSION }}-linux
# steps:
# - uses: actions/checkout@v2
# with:
# submodules: "recursive"
# - name: cache-vulkansdk
# id: cache-vulkansdk
# uses: actions/cache@v1
# with:
# path: "{{ env.VK_VERSION }}"
# key: "vulkansdk-linux-x86_64-{{ env.VK_VERSION }}"
# - name: vulkansdk
# if: steps.cache-vulkansdk.outputs.cache-hit != 'true'
# run: |
# wget https://sdk.lunarg.com/sdk/download/$VK_VERSION/linux/vulkansdk-linux-x86_64-$VK_VERSION.tar.xz?Human=true -O vulkansdk-linux-x86_64-$VK_VERSION.tar.xz
# tar -xf vulkansdk-linux-x86_64-$VK_VERSION.tar.xz
# rm -rf $VK_VERSION/source $VK_VERSION/samples
# find $VK_VERSION -type f | grep -v -E 'vulkan|glslang' | xargs rm
# - name: build
# run: |
# sudo add-apt-repository ppa:ubuntu-toolchain-r/test
# sudo apt update
# sudo apt install gcc-9 g++-9
# export CXX="g++-9" CC="gcc-9"
# export VULKAN_SDK=`pwd`/$VK_VERSION/x86_64
# mkdir build && cd build
# cmake ../src
# cmake --build . -j 2
# - name: package
# # cp -r models/* ${{ env.PACKAGENAME }}
# run: |
# mkdir -p ${{ env.PACKAGENAME }}
# cp README.md LICENSE ${{ env.PACKAGENAME }}
# cp build/${{ needs.setup.outputs.APPNAME }} ${{ env.PACKAGENAME }}
# strip -g ${{ env.PACKAGENAME }}/${{ needs.setup.outputs.APPNAME }}
# zip -9 -r ${{ env.PACKAGENAME }}.zip ${{ env.PACKAGENAME }}
# - name: upload
# uses: actions/upload-artifact@v2
# with:
# name: ${{ env.PACKAGENAME }}
# path: ${{ env.PACKAGENAME }}.zip
ubuntu:
needs: [setup]
runs-on: ubuntu-20.04
env:
PACKAGENAME: ${{ needs.setup.outputs.APPNAME }}-${{ needs.setup.outputs.VERSION }}-linux
steps:
- uses: actions/checkout@v2
with:
submodules: "recursive"
- name: cache-vulkansdk
id: cache-vulkansdk
uses: actions/cache@v1
with:
path: "{{ env.VK_VERSION }}"
key: "vulkansdk-linux-x86_64-{{ env.VK_VERSION }}"
- name: vulkansdk
if: steps.cache-vulkansdk.outputs.cache-hit != 'true'
run: |
wget https://sdk.lunarg.com/sdk/download/$VK_VERSION/linux/vulkansdk-linux-x86_64-$VK_VERSION.tar.xz?Human=true -O vulkansdk-linux-x86_64-$VK_VERSION.tar.xz
tar -xf vulkansdk-linux-x86_64-$VK_VERSION.tar.xz
rm -rf $VK_VERSION/source $VK_VERSION/samples
find $VK_VERSION -type f | grep -v -E 'vulkan|glslang' | xargs rm
- name: build
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt install gcc-9 g++-9
export CXX="g++-9" CC="gcc-9"
export VULKAN_SDK=`pwd`/$VK_VERSION/x86_64
mkdir build && cd build
cmake ../src
cmake --build . -j 2
- name: package
# cp -r models/* ${{ env.PACKAGENAME }}
run: |
mkdir -p ${{ env.PACKAGENAME }}
cp README.md LICENSE ${{ env.PACKAGENAME }}
cp build/${{ needs.setup.outputs.APPNAME }} ${{ env.PACKAGENAME }}
strip -g ${{ env.PACKAGENAME }}/${{ needs.setup.outputs.APPNAME }}
zip -9 -r ${{ env.PACKAGENAME }}.zip ${{ env.PACKAGENAME }}
- name: upload
uses: actions/upload-artifact@v2
with:
name: ${{ env.PACKAGENAME }}
path: ${{ env.PACKAGENAME }}.zip

macos:
needs: [setup]
Expand Down Expand Up @@ -149,51 +149,51 @@ jobs:
name: ${{ env.PACKAGENAME }}
path: ${{ env.PACKAGENAME }}.zip

# windows:
# needs: [setup]
# runs-on: windows-latest
# env:
# PACKAGENAME: ${{ needs.setup.outputs.APPNAME }}-${{ needs.setup.outputs.VERSION }}-windows
# steps:
# - uses: actions/checkout@v2
# with:
# submodules: "recursive"
# - name: cache-vulkansdk
# id: cache-vulkansdk
# uses: actions/cache@v1
# with:
# path: "VulkanSDK"
# key: VulkanSDK-{{ VK_VERSION }}-Installer
# - name: vulkansdk
# if: steps.cache-vulkansdk.outputs.cache-hit != 'true'
# run: |
# Invoke-WebRequest -Uri "https://sdk.lunarg.com/sdk/download/$env:VK_VERSION/windows/VulkanSDK-$env:VK_VERSION-Installer.exe?Human=true" -OutFile VulkanSDK-$env:VK_VERSION-Installer.exe
# 7z x -aoa ./VulkanSDK-$env:VK_VERSION-Installer.exe -oVulkanSDK
# - name: build
# run: |
# $env:VULKAN_SDK="$(pwd)/VulkanSDK"
# mkdir build; cd build
# cmake -A x64 ../src
# cmake --build . --config Release -j 2
# - name: package
# # Copy-Item -Verbose -Recurse -Path "models\*" -Destination "${{ env.PACKAGENAME }}"
# run: |
# mkdir ${{ env.PACKAGENAME }}
# Copy-Item -Verbose -Path "README.md" -Destination "${{ env.PACKAGENAME }}"
# Copy-Item -Verbose -Path "LICENSE" -Destination "${{ env.PACKAGENAME }}"
# Copy-Item -Verbose -Path "build\Release\${{ needs.setup.outputs.APPNAME }}.exe" -Destination "${{ env.PACKAGENAME }}"
# Copy-Item -Verbose -Path "C:\windows\system32\vcomp140.dll" -Destination "${{ env.PACKAGENAME }}"
# Copy-Item -Verbose -Path "C:\windows\system32\vcomp140d.dll" -Destination "${{ env.PACKAGENAME }}"
# 7z a -r ${{ env.PACKAGENAME }}.zip ${{ env.PACKAGENAME }}
# - name: upload
# uses: actions/upload-artifact@v2
# with:
# name: ${{ env.PACKAGENAME }}
# path: ${{ env.PACKAGENAME }}.zip
windows:
needs: [setup]
runs-on: windows-latest
env:
PACKAGENAME: ${{ needs.setup.outputs.APPNAME }}-${{ needs.setup.outputs.VERSION }}-windows
steps:
- uses: actions/checkout@v2
with:
submodules: "recursive"
- name: cache-vulkansdk
id: cache-vulkansdk
uses: actions/cache@v1
with:
path: "VulkanSDK"
key: VulkanSDK-{{ VK_VERSION }}-Installer
- name: vulkansdk
if: steps.cache-vulkansdk.outputs.cache-hit != 'true'
run: |
Invoke-WebRequest -Uri "https://sdk.lunarg.com/sdk/download/$env:VK_VERSION/windows/VulkanSDK-$env:VK_VERSION-Installer.exe?Human=true" -OutFile VulkanSDK-$env:VK_VERSION-Installer.exe
7z x -aoa ./VulkanSDK-$env:VK_VERSION-Installer.exe -oVulkanSDK
- name: build
run: |
$env:VULKAN_SDK="$(pwd)/VulkanSDK"
mkdir build; cd build
cmake -A x64 ../src
cmake --build . --config Release -j 2
- name: package
# Copy-Item -Verbose -Recurse -Path "models\*" -Destination "${{ env.PACKAGENAME }}"
run: |
mkdir ${{ env.PACKAGENAME }}
Copy-Item -Verbose -Path "README.md" -Destination "${{ env.PACKAGENAME }}"
Copy-Item -Verbose -Path "LICENSE" -Destination "${{ env.PACKAGENAME }}"
Copy-Item -Verbose -Path "build\Release\${{ needs.setup.outputs.APPNAME }}.exe" -Destination "${{ env.PACKAGENAME }}"
Copy-Item -Verbose -Path "C:\windows\system32\vcomp140.dll" -Destination "${{ env.PACKAGENAME }}"
Copy-Item -Verbose -Path "C:\windows\system32\vcomp140d.dll" -Destination "${{ env.PACKAGENAME }}"
7z a -r ${{ env.PACKAGENAME }}.zip ${{ env.PACKAGENAME }}
- name: upload
uses: actions/upload-artifact@v2
with:
name: ${{ env.PACKAGENAME }}
path: ${{ env.PACKAGENAME }}.zip

release:
# needs: [setup, ubuntu, macos, windows]
needs: [setup, macos]
needs: [setup, ubuntu, macos, windows]
# needs: [setup, macos]
runs-on: ubuntu-latest
steps:
- name: download
Expand All @@ -216,16 +216,16 @@ jobs:
draft: false
prerelease: false

# - name: upload-ubuntu
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# PACKAGENAME: ${{ needs.setup.outputs.APPNAME }}-${{ needs.setup.outputs.VERSION }}-linux
# with:
# upload_url: ${{ steps.create_release.outputs.upload_url }}
# asset_path: artifacts/${{ env.PACKAGENAME }}/${{ env.PACKAGENAME }}.zip
# asset_name: ${{ env.PACKAGENAME }}.zip
# asset_content_type: application/zip
- name: upload-ubuntu
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PACKAGENAME: ${{ needs.setup.outputs.APPNAME }}-${{ needs.setup.outputs.VERSION }}-linux
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: artifacts/${{ env.PACKAGENAME }}/${{ env.PACKAGENAME }}.zip
asset_name: ${{ env.PACKAGENAME }}.zip
asset_content_type: application/zip

- name: upload-macos
uses: actions/upload-release-asset@v1
Expand All @@ -238,13 +238,13 @@ jobs:
asset_name: ${{ env.PACKAGENAME }}.zip
asset_content_type: application/zip

# - name: upload-windows
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# PACKAGENAME: ${{ needs.setup.outputs.APPNAME }}-${{ needs.setup.outputs.VERSION }}-windows
# with:
# upload_url: ${{ steps.create_release.outputs.upload_url }}
# asset_path: artifacts/${{ env.PACKAGENAME }}/${{ env.PACKAGENAME }}.zip
# asset_name: ${{ env.PACKAGENAME }}.zip
# asset_content_type: application/zip
- name: upload-windows
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PACKAGENAME: ${{ needs.setup.outputs.APPNAME }}-${{ needs.setup.outputs.VERSION }}-windows
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: artifacts/${{ env.PACKAGENAME }}/${{ env.PACKAGENAME }}.zip
asset_name: ${{ env.PACKAGENAME }}.zip
asset_content_type: application/zip

0 comments on commit 53be61e

Please sign in to comment.