Skip to content

Commit f6ecd66

Browse files
committed
CI: Add artifacts
1 parent 1eff23e commit f6ecd66

File tree

6 files changed

+80
-509
lines changed

6 files changed

+80
-509
lines changed

.github/workflows/main.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,22 @@ jobs:
7575
# Install
7676
- name: Install with CMake
7777
run: |
78-
cd ${{github.workspace}}/_build/${{ matrix.os.preset }}
79-
cmake --install . --prefix ${{github.workspace}}/_build/ci-install --component ${{ matrix.target }}
78+
cmake --install ${{github.workspace}}/_build/${{ matrix.os.preset }} --prefix ${{github.workspace}}/_build/ci-install --component ${{ matrix.target }}
79+
80+
# Prepare artifact
81+
- name: Prepare artifact
82+
id: prepare_artifact
83+
run: >
84+
python scripts/package_target.py
85+
--build-dir ${{github.workspace}}/_build/${{ matrix.os.preset }}
86+
--install-dir ${{github.workspace}}/_build/ci-install
87+
--artifact-dir ${{github.workspace}}/_build/ci-artifact
88+
--target ${{ matrix.target }}
89+
--suffix ${{ matrix.os.preset }}
8090
8191
# Upload result
8292
- name: Upload build result
8393
uses: actions/upload-artifact@v4
8494
with:
85-
name: bhl-cmake-install-${{ matrix.target }}-${{ matrix.os.preset }}
86-
path: ${{github.workspace}}/_build/ci-install
87-
95+
name: ${{ steps.prepare_artifact.outputs.artifact_name }}
96+
path: ${{github.workspace}}/_build/ci-artifact

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ unset( BHL_REPO_VERSION_PATCH )
5757
unset( BHL_REPO_VERSION_TAG )
5858
# Use GIT_XXX from now on
5959

60+
# This will be used by CI build scripts
61+
file( WRITE ${CMAKE_BINARY_DIR}/version.txt ${GIT_SEM_VERSION} )
62+
6063
project( BugfixedHL VERSION "${GIT_MAJOR}.${GIT_MINOR}.${GIT_PATCH}.${GIT_SKIP}" )
6164
include( PlatformInfo )
6265
include( CTest )

0 commit comments

Comments
 (0)