-
Notifications
You must be signed in to change notification settings - Fork 6
120 lines (100 loc) · 3.59 KB
/
releaseDeploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
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 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
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DWERROR=YES -DCMAKE_BUILD_TYPE=${{ matrix.build-type }}
- 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 }}