Skip to content

Commit e817732

Browse files
committed
More releases and update test workflows
1 parent 07daa3b commit e817732

File tree

17 files changed

+157
-89
lines changed

17 files changed

+157
-89
lines changed

.github/workflows/releaseDeploy.yml

Lines changed: 40 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,8 @@ jobs:
1313
matrix:
1414
include:
1515
- os: windows-latest
16-
artifact-name: rayx-win64.zip
1716
build-type: Release
1817
- os: ubuntu-latest
19-
artifact-name: rayx-Linux.deb
2018
build-type: Release
2119

2220
steps:
@@ -72,6 +70,7 @@ jobs:
7270
if: matrix.os == 'windows-latest'
7371
run: cmake -B ${{github.workspace}}/build -DWERROR=YES -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -DRAYX_REQUIRE_CUDA=ON
7472

73+
# Linux-specific build steps
7574
- name: Install dependencies (Ubuntu)
7675
if: matrix.os == 'ubuntu-latest'
7776
run: |
@@ -89,45 +88,69 @@ jobs:
8988
if: matrix.os == 'ubuntu-latest'
9089
run: cmake -B ${{github.workspace}}/build -DWERROR=YES -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -DRAYX_REQUIRE_CUDA=ON
9190

91+
# Build the project
9292
- name: Build
9393
run: cmake --build ${{github.workspace}}/build --config ${{ matrix.build-type }}
9494

9595
- name: Test
9696
working-directory: ${{github.workspace}}/build/bin/release
9797
run: ./rayx-core-tst -x
9898

99-
- name: CPack (Windows)
99+
# Generate Windows artifacts (ZIP and NSIS installer)
100+
- name: CPack (Windows - ZIP)
100101
if: matrix.os == 'windows-latest'
101102
working-directory: ${{github.workspace}}/build
102103
run: cpack -G ZIP
103104

104-
- name: CPack (Ubuntu)
105+
- name: CPack (Windows - NSIS Installer)
106+
if: matrix.os == 'windows-latest'
107+
working-directory: ${{github.workspace}}/build
108+
run: cpack -G NSIS
109+
110+
# Generate Linux artifacts (DEB, RPM, TAR)
111+
- name: CPack (Ubuntu - DEB)
105112
if: matrix.os == 'ubuntu-latest'
106113
working-directory: ${{github.workspace}}/build
107114
run: cpack -G DEB
108115

109-
- name: Upload build artifact (Windows)
116+
- name: CPack (Ubuntu - RPM)
117+
if: matrix.os == 'ubuntu-latest'
118+
working-directory: ${{github.workspace}}/build
119+
run: cpack -G RPM
120+
121+
- name: CPack (Ubuntu - TAR)
122+
if: matrix.os == 'ubuntu-latest'
123+
working-directory: ${{github.workspace}}/build
124+
run: cpack -G TGZ
125+
126+
# Upload artifacts (Windows)
127+
- name: Upload build artifacts (Windows)
110128
if: matrix.os == 'windows-latest'
111129
uses: actions/upload-artifact@v4
112130
with:
113-
name: ${{ matrix.artifact-name }}
114-
path: ${{github.workspace}}/build/RAYX-*-win64.zip
131+
name: windows-artifacts
132+
path: |
133+
${{github.workspace}}/build/RAYX-*.zip
134+
${{github.workspace}}/build/RAYX-*.exe
115135
if-no-files-found: error
116-
117-
- name: Upload build artifact (Ubuntu)
136+
137+
# Upload artifacts (Ubuntu)
138+
- name: Upload build artifacts (Ubuntu)
118139
if: matrix.os == 'ubuntu-latest'
119140
uses: actions/upload-artifact@v4
120141
with:
121-
name: ${{ matrix.artifact-name }}
122-
path: ${{github.workspace}}/build/RAYX-*-Linux.deb
142+
name: ubuntu-artifacts
143+
path: |
144+
${{github.workspace}}/build/RAYX-*.deb
145+
${{github.workspace}}/build/RAYX-*.rpm
146+
${{github.workspace}}/build/RAYX-*.tar.gz
123147
if-no-files-found: error
124148

125149
release:
126150
name: Create Release
127151
needs: build-and-release
128152
runs-on: ubuntu-latest
129153
steps:
130-
# Checkout CHANGELOG.md
131154
- name: Checkout code
132155
uses: actions/checkout@v4
133156
with:
@@ -148,9 +171,10 @@ jobs:
148171
with:
149172
body_path: ${{github.workspace}}/CHANGELOG.md
150173
files: |
151-
${{github.workspace}}/artifacts/rayx-win64.zip/*.zip
152-
${{github.workspace}}/artifacts/rayx-Linux.deb/*.deb
174+
${{github.workspace}}/artifacts/windows-artifacts/*.zip
175+
${{github.workspace}}/artifacts/windows-artifacts/*.exe
176+
${{github.workspace}}/artifacts/ubuntu-artifacts/*.deb
177+
${{github.workspace}}/artifacts/ubuntu-artifacts/*.rpm
178+
${{github.workspace}}/artifacts/ubuntu-artifacts/*.tar.gz
153179
env:
154180
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
155-
156-

.github/workflows/testUbuntu.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
11
name: testUbuntu
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
branches:
6+
- '**' # Run on all branches
7+
tags-ignore:
8+
- 'v*' # Ignore tag pushes matching 'v*'
9+
pull_request:
10+
branches:
11+
- '**' # Run for all pull requests
412

513
env:
614
BUILD_TYPE: Release
715

816
jobs:
917
build:
18+
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
1019
runs-on: ubuntu-latest
1120

1221
steps:

.github/workflows/testUbuntuClang.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
11
name: testUbuntuClang
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
branches:
6+
- '**' # Run on all branches
7+
tags-ignore:
8+
- 'v*' # Ignore tag pushes matching 'v*'
9+
pull_request:
10+
branches:
11+
- '**' # Run for all pull requests
412

513
env:
614
BUILD_TYPE: Release
715

816
jobs:
917
build:
18+
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
1019
runs-on: ubuntu-latest
1120

1221
steps:

.github/workflows/testWindows.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
11
name: testWindows
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
branches:
6+
- '**' # Run on all branches
7+
tags-ignore:
8+
- 'v*' # Ignore tag pushes matching 'v*'
9+
pull_request:
10+
branches:
11+
- '**' # Run for all pull requests
412

513
env:
614
BUILD_TYPE: Release
715

816
jobs:
917
build:
18+
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
1019
runs-on: windows-latest
1120

1221
steps:
@@ -35,10 +44,10 @@ jobs:
3544
uses: MarkusJx/[email protected]
3645
id: install-boost
3746
with:
38-
boost_version: 1.84.0
39-
boost_install_dir: ${{github.workspace}}/boost
40-
platform_version: 2019
41-
toolset: msvc
47+
boost_version: 1.84.0
48+
boost_install_dir: ${{github.workspace}}/boost
49+
platform_version: 2019
50+
toolset: msvc
4251

4352
- name: Add Boost to PATH
4453
run: |
@@ -50,7 +59,7 @@ jobs:
5059
shell: pwsh
5160
run: .\Scripts\setup-cuda.ps1
5261
env:
53-
INPUT_CUDA_VERSION: 12.5.1
62+
INPUT_CUDA_VERSION: 12.5.1
5463

5564
- name: Configure CMake
5665
run: cmake -B ${{github.workspace}}/build -DWERROR=YES -DRAYX_REQUIRE_CUDA=ON

CMakeLists.txt

Lines changed: 36 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,58 @@
11
cmake_minimum_required(VERSION 3.25.2 FATAL_ERROR)
22

33
# ---- Project ----
4-
project(RAYX VERSION 0.21.2)
4+
project(RAYX VERSION 0.21.21)
55
set(CMAKE_CXX_STANDARD 23)
66
set(CMAKE_CXX_STANDARD_REQUIRED ON)
77
set(CMAKE_CUDA_STANDARD 20)
88
set(CMAKE_CUDA_STANDARD_REQUIRED ON)
9-
109
# ------------------
1110

1211
# ---- Options ----
1312
option(WERROR "add -Werror option" "NO") # inactive per default
1413
option(RAYX_ENABLE_CUDA "This option enables the search for CUDA. Project will be compiled without cuda if not found." ON)
1514
option(RAYX_REQUIRE_CUDA "If option 'RAYX_ENABLE_CUDA' is ON, this option will add the requirement that cuda must be found." OFF)
16-
1715
# ------------------
1816

19-
# ---- Subdirectories ----
20-
add_subdirectory(Extern)
21-
add_subdirectory(Intern)
22-
2317
# ---- Code Coverage ----
2418
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/Extern/cmake)
25-
2619
# ------------------
2720

2821
# ---- CPack ----
2922
set(CPACK_PROJECT_NAME ${PROJECT_NAME})
30-
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
31-
set(CPACK_PACKAGE_VENDOR "RAYX")
32-
set(CPACK_PACKAGE_CONTACT "Max Mustermann <" ${PROJECT_NAME} "@helmholtz-berlin.de>")
33-
include(CPack)
23+
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE")
24+
set(CPACK_PACKAGE_DESCRIPTION "${PROJECT_NAME} - For simulating and designing beamlines at synchrotron light sources")
25+
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PROJECT_NAME} - For simulating and designing beamlines at synchrotron light sources")
26+
set(CPACK_PACKAGE_VENDOR "Helmhotz-Zentrum Berlin")
27+
set(CPACK_PACKAGE_CONTACT "[email protected]")
28+
29+
# Disable GoogleTest installation
30+
set(INSTALL_GTEST OFF CACHE BOOL "Disable installation of GoogleTest" FORCE)
31+
set(INSTALL_GMOCK OFF CACHE BOOL "Disable installation of GoogleMock" FORCE)
32+
33+
if(APPLE)
34+
set(CMAKE_INSTALL_PREFIX "/Applications/${PROJECT_NAME}")
35+
set(CPACK_PACKAGE_INSTALL_DIRECTORY "/Applications/${PROJECT_NAME}")
36+
# macOS destinations
37+
set(INSTALL_DATA_DIR "/Library/Application Support/${PROJECT_NAME}")
38+
set(INSTALL_FONTS_DIR "/Library/Fonts/${PROJECT_NAME}")
39+
elseif(UNIX AND NOT APPLE)
40+
set(CMAKE_INSTALL_PREFIX "/usr/local")
41+
set(CPACK_PACKAGE_INSTALL_DIRECTORY "/usr/local")
42+
# Linux destinations
43+
set(INSTALL_DATA_DIR "/usr/local/share/${PROJECT_NAME}")
44+
set(INSTALL_FONTS_DIR "/usr/local/share/fonts/${PROJECT_NAME}")
45+
elseif(WIN32)
46+
set(CMAKE_INSTALL_PREFIX "${PROJECT_NAME}")
47+
set(CPACK_PACKAGE_INSTALL_DIRECTORY "${PROJECT_NAME}")
48+
# Windows destinations (inside ProgramData or another appropriate directory)
49+
set(INSTALL_DATA_DIR "ProgramData/${PROJECT_NAME}")
50+
set(INSTALL_FONTS_DIR "Windows/Fonts/${PROJECT_NAME}")
51+
endif()
3452
# ------------------
53+
54+
55+
# ---- Subdirectories ----
56+
add_subdirectory(Extern)
57+
add_subdirectory(Intern)
58+
# ------------------

Intern/rayx-core/CMakeLists.txt

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,6 @@ file(GLOB_RECURSE ALPAKA_SOURCE
6060
add_library(${PROJECT_NAME} SHARED ${SOURCE})
6161
alpaka_target(${PROJECT_NAME})
6262
alpaka_source(${ALPAKA_SOURCE})
63-
64-
install(TARGETS ${PROJECT_NAME}
65-
RUNTIME DESTINATION bin
66-
LIBRARY DESTINATION lib
67-
ARCHIVE DESTINATION lib/static)
68-
6963
# -----------------
7064

7165
# -----OpenMP--------
@@ -214,12 +208,17 @@ add_custom_command(
214208
# -----------------
215209

216210
# ---- CPack ----
217-
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE")
218-
set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
219-
set(CPACK_PACKAGE_CONTACT "Your Name <[email protected]>")
220-
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Your Project Description")
221-
install(FILES ${SCRIPT_SRC_DIR} DESTINATION bin/Scripts)
222-
211+
install(TARGETS ${PROJECT_NAME}
212+
RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin
213+
LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
214+
ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
215+
)
216+
install(DIRECTORY ${CMAKE_SOURCE_DIR}/Data
217+
DESTINATION ${INSTALL_DATA_DIR}
218+
FILES_MATCHING PATTERN "*")
219+
install(DIRECTORY ${CMAKE_SOURCE_DIR}/Scripts
220+
DESTINATION ${INSTALL_DATA_DIR}
221+
FILES_MATCHING PATTERN "*")
222+
include(InstallRequiredSystemLibraries)
223223
include(CPack)
224-
225224
# -----------------

Intern/rayx-core/src/Beamline/Objects/CircleSource.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class RAYX_API CircleSource : public LightSource {
1515

1616
private:
1717
// Geometric Params
18-
SourcePulseType m_sourceDistributionType; // TODO unused.
18+
// SourcePulseType m_sourceDistributionType; // TODO unused.
1919
Misalignment m_misalignment;
2020

2121
glm::dvec4 m_stokes;

Intern/rayx-core/src/Beamline/Objects/MatrixSource.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class RAYX_API MatrixSource : public LightSource {
1313
virtual std::vector<Ray> getRays(int thread_count = 1) const override;
1414

1515
private:
16-
SourcePulseType m_sourceDistributionType; // TODO: wo muss der name angepasst werden?
16+
// SourcePulseType m_sourceDistributionType; // TODO: wo muss der name angepasst werden?
1717

1818
glm::dvec4 m_pol;
1919

Intern/rayx-core/src/Beamline/Objects/PixelSource.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class RAYX_API PixelSource : public LightSource {
1313

1414
private:
1515
// Geometric Params
16-
SourcePulseType m_sourceDistributionType; // TODO unused.
16+
// SourcePulseType m_sourceDistributionType; // TODO unused.
1717

1818
glm::dvec4 m_pol;
1919

Intern/rayx-core/src/Beamline/Objects/PointSource.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class RAYX_API PointSource : public LightSource {
2020
SourceDist m_heightDist;
2121
SourceDist m_horDist;
2222
SourceDist m_verDist;
23-
SourcePulseType m_sourceDistributionType; // TODO unused.
23+
// SourcePulseType m_sourceDistributionType; // TODO unused.
2424

2525
glm::dvec4 m_pol;
2626

0 commit comments

Comments
 (0)