Skip to content

Update version to v0.21.2 #35

Update version to v0.21.2

Update version to v0.21.2 #35

Workflow file for this run

name: Create Release
on:
push:
tags:
- 'v*' # Triggers on tag push matching v*
jobs:
build-and-release:
name: Build and Release
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: windows-latest
artifact-name: rayx-win64.zip
build-type: Release
- os: ubuntu-latest
artifact-name: rayx-Linux.deb
build-type: Release
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Update all submodules
run: |
git submodule sync
git submodule update --init --recursive
# Prepare environment (Vulkan SDK, dependencies) based on OS
- name: Prepare environment
uses: humbletim/[email protected]
with:
vulkan-query-version: 1.3.204.0
vulkan-components: Vulkan-Headers, Vulkan-Loader, SPIRV-Tools, Glslang
vulkan-use-cache: true
- name: Install dependencies (Windows)
if: matrix.os == 'windows-latest'
run: |
vcpkg install hdf5 --triplet x64-windows
vcpkg integrate install
echo "$env:VCPKG_INSTALLATION_ROOT\installed\x64-windows\bin" >> $GITHUB_PATH
shell: powershell
- name: Install boost (Windows)
if: matrix.os == 'windows-latest'
uses: MarkusJx/[email protected]
id: install-boost
with:
boost_version: 1.84.0
boost_install_dir: ${{github.workspace}}/boost
platform_version: 2019
toolset: msvc
- name: Add Boost to PATH (Windows)
if: matrix.os == 'windows-latest'
run: |
echo "${{github.workspace}}/boost" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
echo "${{github.workspace}}/boost/boost" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Setup CUDA Toolkit
if: matrix.os == 'windows-latest'
id: cuda-toolkit
shell: pwsh
run: .\Scripts\setup-cuda.ps1
env:
INPUT_CUDA_VERSION: 12.5.1
- name: Configure CMake (Windows)
if: matrix.os == 'windows-latest'
run: cmake -B ${{github.workspace}}/build -DWERROR=YES -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -DRAYX_REQUIRE_CUDA=ON
- name: Install dependencies (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt update --yes
sudo apt install --yes xorg-dev cmake libgtk-3-dev libdbus-1-dev libhdf5-dev libboost-dev
- name: Install Cuda (Ubuntu)
if: matrix.os == 'ubuntu-latest'
uses: Jimver/[email protected]
id: cuda-toolkit-ubuntu
with:
cuda: '12.3.2'
- name: Configure CMake (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: cmake -B ${{github.workspace}}/build -DWERROR=YES -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -DRAYX_REQUIRE_CUDA=ON
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{ matrix.build-type }}
- name: Test
working-directory: ${{github.workspace}}/build/bin/release
run: ./rayx-core-tst -x
- name: CPack (Windows)
if: matrix.os == 'windows-latest'
working-directory: ${{github.workspace}}/build
run: cpack -G ZIP
- name: CPack (Ubuntu)
if: matrix.os == 'ubuntu-latest'
working-directory: ${{github.workspace}}/build
run: cpack -G DEB
- name: Upload build artifact (Windows)
if: matrix.os == 'windows-latest'
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact-name }}
path: ${{github.workspace}}/build/RAYX-*-win64.zip
if-no-files-found: error
- name: Upload build artifact (Ubuntu)
if: matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact-name }}
path: ${{github.workspace}}/build/RAYX-*-Linux.deb
if-no-files-found: error
release:
name: Create Release
needs: build-and-release
runs-on: ubuntu-latest
steps:
# Checkout CHANGELOG.md
- name: Checkout code
uses: actions/checkout@v4
with:
sparse-checkout: CHANGELOG.md
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
path: ${{github.workspace}}/artifacts
- name: Extract version from tag
id: get_version
run: echo "version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
- name: Create and Upload Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
body_path: ${{github.workspace}}/CHANGELOG.md
files: |
${{github.workspace}}/artifacts/rayx-win64.zip/*.zip
${{github.workspace}}/artifacts/rayx-Linux.deb/*.deb
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}